Subversion Repositories SmartDukaan

Rev

Rev 1133 | Rev 1209 | 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
 
1133 chandransh 49
    /**
50
     * Returns orders within a range of their billing dates
51
     * 
52
     * @param status
53
     * @param start_billing_date
54
     * @param end_billing_date
55
     * @param warehouse_id
56
     */
1022 varun.gupt 57
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
58
 
483 rajveer 59
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 60
 
1148 chandransh 61
    /**
62
     * Add billing details such as the bill number and the biller to the Order.
63
     * 
64
     * @param orderId
65
     * @param invoice_number
66
     * @param billed_by
67
     */
68
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 69
 
1148 chandransh 70
    /**
71
     * Adds jacket number to the order. Return false if it doesn't find the order with the given ID.
72
     * 
73
     * @param orderId
74
     * @param jacketNumber
75
     */
76
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
77
 
923 rajveer 78
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
79
 
80
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
81
 
483 rajveer 82
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 83
 
483 rajveer 84
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 85
 
483 rajveer 86
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 87
 
483 rajveer 88
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 89
 
483 rajveer 90
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 91
 
758 chandransh 92
    /**
93
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
94
     * 
95
     * @param warehouseId
96
     * @param providerId
97
     */
98
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
99
 
1114 chandransh 100
    /**
101
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
102
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
103
     * Raises an exception if we encounter report for an AWB number that we did not ship.
104
     * 
105
     * @param providerId
106
     * @param pickupDetails
107
     */
108
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException;
109
 
1133 chandransh 110
    /**
111
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
112
     * the name of the receiver.
113
     * Raises an exception if we encounter report for an AWB number that we did not ship.
114
     * 
115
     * @param providerId
116
     * @param deliveredOrders
117
     */
118
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
119
 
120
    /**
121
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
122
     * Raises an exception if we encounter report for an AWB number that we did not ship.
123
     * 
124
     * @param providerId
125
     * @param returnedOrders
126
     */
127
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
128
 
483 rajveer 129
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 130
 
483 rajveer 131
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 132
 
133
  }
134
 
135
  public static class Client implements Iface {
136
    public Client(TProtocol prot)
137
    {
138
      this(prot, prot);
139
    }
140
 
141
    public Client(TProtocol iprot, TProtocol oprot)
142
    {
143
      iprot_ = iprot;
144
      oprot_ = oprot;
145
    }
146
 
147
    protected TProtocol iprot_;
148
    protected TProtocol oprot_;
149
 
150
    protected int seqid_;
151
 
152
    public TProtocol getInputProtocol()
153
    {
154
      return this.iprot_;
155
    }
156
 
157
    public TProtocol getOutputProtocol()
158
    {
159
      return this.oprot_;
160
    }
161
 
764 rajveer 162
    public void closeSession() throws TException
163
    {
164
      send_closeSession();
165
      recv_closeSession();
166
    }
167
 
168
    public void send_closeSession() throws TException
169
    {
170
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
171
      closeSession_args args = new closeSession_args();
172
      args.write(oprot_);
173
      oprot_.writeMessageEnd();
174
      oprot_.getTransport().flush();
175
    }
176
 
177
    public void recv_closeSession() throws TException
178
    {
179
      TMessage msg = iprot_.readMessageBegin();
180
      if (msg.type == TMessageType.EXCEPTION) {
181
        TApplicationException x = TApplicationException.read(iprot_);
182
        iprot_.readMessageEnd();
183
        throw x;
184
      }
185
      closeSession_result result = new closeSession_result();
186
      result.read(iprot_);
187
      iprot_.readMessageEnd();
188
      return;
189
    }
190
 
132 ashish 191
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 192
    {
193
      send_createTransaction(transaction);
132 ashish 194
      return recv_createTransaction();
68 ashish 195
    }
196
 
197
    public void send_createTransaction(Transaction transaction) throws TException
198
    {
199
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
200
      createTransaction_args args = new createTransaction_args();
201
      args.transaction = transaction;
202
      args.write(oprot_);
203
      oprot_.writeMessageEnd();
204
      oprot_.getTransport().flush();
205
    }
206
 
132 ashish 207
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 208
    {
209
      TMessage msg = iprot_.readMessageBegin();
210
      if (msg.type == TMessageType.EXCEPTION) {
211
        TApplicationException x = TApplicationException.read(iprot_);
212
        iprot_.readMessageEnd();
213
        throw x;
214
      }
215
      createTransaction_result result = new createTransaction_result();
216
      result.read(iprot_);
217
      iprot_.readMessageEnd();
132 ashish 218
      if (result.isSetSuccess()) {
219
        return result.success;
220
      }
68 ashish 221
      if (result.ex != null) {
222
        throw result.ex;
223
      }
132 ashish 224
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 225
    }
226
 
227
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
228
    {
229
      send_getTransaction(id);
230
      return recv_getTransaction();
231
    }
232
 
233
    public void send_getTransaction(long id) throws TException
234
    {
235
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
236
      getTransaction_args args = new getTransaction_args();
237
      args.id = id;
238
      args.write(oprot_);
239
      oprot_.writeMessageEnd();
240
      oprot_.getTransport().flush();
241
    }
242
 
243
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
244
    {
245
      TMessage msg = iprot_.readMessageBegin();
246
      if (msg.type == TMessageType.EXCEPTION) {
247
        TApplicationException x = TApplicationException.read(iprot_);
248
        iprot_.readMessageEnd();
249
        throw x;
250
      }
251
      getTransaction_result result = new getTransaction_result();
252
      result.read(iprot_);
253
      iprot_.readMessageEnd();
254
      if (result.isSetSuccess()) {
255
        return result.success;
256
      }
257
      if (result.ex != null) {
258
        throw result.ex;
259
      }
260
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
261
    }
262
 
132 ashish 263
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 264
    {
132 ashish 265
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 266
      return recv_getTransactionsForCustomer();
267
    }
268
 
132 ashish 269
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 270
    {
271
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
272
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
273
      args.customerId = customerId;
132 ashish 274
      args.from_date = from_date;
275
      args.to_date = to_date;
68 ashish 276
      args.status = status;
277
      args.write(oprot_);
278
      oprot_.writeMessageEnd();
279
      oprot_.getTransport().flush();
280
    }
281
 
282
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
283
    {
284
      TMessage msg = iprot_.readMessageBegin();
285
      if (msg.type == TMessageType.EXCEPTION) {
286
        TApplicationException x = TApplicationException.read(iprot_);
287
        iprot_.readMessageEnd();
288
        throw x;
289
      }
290
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
291
      result.read(iprot_);
292
      iprot_.readMessageEnd();
293
      if (result.isSetSuccess()) {
294
        return result.success;
295
      }
296
      if (result.ex != null) {
297
        throw result.ex;
298
      }
299
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
300
    }
301
 
132 ashish 302
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
303
    {
304
      send_getTransactionsForShoppingCartId(shoppingCartId);
305
      return recv_getTransactionsForShoppingCartId();
306
    }
307
 
308
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
309
    {
310
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
311
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
312
      args.shoppingCartId = shoppingCartId;
313
      args.write(oprot_);
314
      oprot_.writeMessageEnd();
315
      oprot_.getTransport().flush();
316
    }
317
 
318
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
319
    {
320
      TMessage msg = iprot_.readMessageBegin();
321
      if (msg.type == TMessageType.EXCEPTION) {
322
        TApplicationException x = TApplicationException.read(iprot_);
323
        iprot_.readMessageEnd();
324
        throw x;
325
      }
326
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
327
      result.read(iprot_);
328
      iprot_.readMessageEnd();
329
      if (result.isSetSuccess()) {
330
        return result.success;
331
      }
332
      if (result.ex != null) {
333
        throw result.ex;
334
      }
335
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
336
    }
337
 
68 ashish 338
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
339
    {
340
      send_getTransactionStatus(transactionId);
341
      return recv_getTransactionStatus();
342
    }
343
 
344
    public void send_getTransactionStatus(long transactionId) throws TException
345
    {
346
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
347
      getTransactionStatus_args args = new getTransactionStatus_args();
348
      args.transactionId = transactionId;
349
      args.write(oprot_);
350
      oprot_.writeMessageEnd();
351
      oprot_.getTransport().flush();
352
    }
353
 
354
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
355
    {
356
      TMessage msg = iprot_.readMessageBegin();
357
      if (msg.type == TMessageType.EXCEPTION) {
358
        TApplicationException x = TApplicationException.read(iprot_);
359
        iprot_.readMessageEnd();
360
        throw x;
361
      }
362
      getTransactionStatus_result result = new getTransactionStatus_result();
363
      result.read(iprot_);
364
      iprot_.readMessageEnd();
365
      if (result.isSetSuccess()) {
366
        return result.success;
367
      }
368
      if (result.ex != null) {
369
        throw result.ex;
370
      }
371
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
372
    }
373
 
374
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
375
    {
376
      send_changeTransactionStatus(transactionId, status, description);
377
      return recv_changeTransactionStatus();
378
    }
379
 
380
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
381
    {
382
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
383
      changeTransactionStatus_args args = new changeTransactionStatus_args();
384
      args.transactionId = transactionId;
385
      args.status = status;
386
      args.description = description;
387
      args.write(oprot_);
388
      oprot_.writeMessageEnd();
389
      oprot_.getTransport().flush();
390
    }
391
 
392
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
393
    {
394
      TMessage msg = iprot_.readMessageBegin();
395
      if (msg.type == TMessageType.EXCEPTION) {
396
        TApplicationException x = TApplicationException.read(iprot_);
397
        iprot_.readMessageEnd();
398
        throw x;
399
      }
400
      changeTransactionStatus_result result = new changeTransactionStatus_result();
401
      result.read(iprot_);
402
      iprot_.readMessageEnd();
403
      if (result.isSetSuccess()) {
404
        return result.success;
405
      }
406
      if (result.ex != null) {
407
        throw result.ex;
408
      }
409
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
410
    }
411
 
483 rajveer 412
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 413
    {
483 rajveer 414
      send_getAllOrders(status, from_date, to_date, warehouse_id);
415
      return recv_getAllOrders();
68 ashish 416
    }
417
 
483 rajveer 418
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 419
    {
483 rajveer 420
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
421
      getAllOrders_args args = new getAllOrders_args();
422
      args.status = status;
423
      args.from_date = from_date;
424
      args.to_date = to_date;
425
      args.warehouse_id = warehouse_id;
68 ashish 426
      args.write(oprot_);
427
      oprot_.writeMessageEnd();
428
      oprot_.getTransport().flush();
429
    }
430
 
483 rajveer 431
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 432
    {
433
      TMessage msg = iprot_.readMessageBegin();
434
      if (msg.type == TMessageType.EXCEPTION) {
435
        TApplicationException x = TApplicationException.read(iprot_);
436
        iprot_.readMessageEnd();
437
        throw x;
438
      }
483 rajveer 439
      getAllOrders_result result = new getAllOrders_result();
68 ashish 440
      result.read(iprot_);
441
      iprot_.readMessageEnd();
442
      if (result.isSetSuccess()) {
443
        return result.success;
444
      }
445
      if (result.ex != null) {
446
        throw result.ex;
447
      }
483 rajveer 448
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 449
    }
450
 
1022 varun.gupt 451
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
452
    {
453
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
454
      return recv_getOrdersByBillingDate();
455
    }
456
 
457
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
458
    {
459
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
460
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
461
      args.status = status;
462
      args.start_billing_date = start_billing_date;
463
      args.end_billing_date = end_billing_date;
464
      args.warehouse_id = warehouse_id;
465
      args.write(oprot_);
466
      oprot_.writeMessageEnd();
467
      oprot_.getTransport().flush();
468
    }
469
 
470
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
471
    {
472
      TMessage msg = iprot_.readMessageBegin();
473
      if (msg.type == TMessageType.EXCEPTION) {
474
        TApplicationException x = TApplicationException.read(iprot_);
475
        iprot_.readMessageEnd();
476
        throw x;
477
      }
478
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
479
      result.read(iprot_);
480
      iprot_.readMessageEnd();
481
      if (result.isSetSuccess()) {
482
        return result.success;
483
      }
484
      if (result.ex != null) {
485
        throw result.ex;
486
      }
487
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
488
    }
489
 
483 rajveer 490
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 491
    {
483 rajveer 492
      send_changeOrderStatus(orderId, status, description);
493
      return recv_changeOrderStatus();
68 ashish 494
    }
495
 
483 rajveer 496
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 497
    {
483 rajveer 498
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
499
      changeOrderStatus_args args = new changeOrderStatus_args();
500
      args.orderId = orderId;
501
      args.status = status;
502
      args.description = description;
68 ashish 503
      args.write(oprot_);
504
      oprot_.writeMessageEnd();
505
      oprot_.getTransport().flush();
506
    }
507
 
483 rajveer 508
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 509
    {
510
      TMessage msg = iprot_.readMessageBegin();
511
      if (msg.type == TMessageType.EXCEPTION) {
512
        TApplicationException x = TApplicationException.read(iprot_);
513
        iprot_.readMessageEnd();
514
        throw x;
515
      }
483 rajveer 516
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 517
      result.read(iprot_);
518
      iprot_.readMessageEnd();
519
      if (result.isSetSuccess()) {
520
        return result.success;
521
      }
522
      if (result.ex != null) {
523
        throw result.ex;
524
      }
483 rajveer 525
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 526
    }
527
 
1148 chandransh 528
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 529
    {
1148 chandransh 530
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 531
      return recv_addBillingDetails();
532
    }
533
 
1148 chandransh 534
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 535
    {
536
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
537
      addBillingDetails_args args = new addBillingDetails_args();
538
      args.orderId = orderId;
539
      args.invoice_number = invoice_number;
540
      args.billed_by = billed_by;
541
      args.write(oprot_);
542
      oprot_.writeMessageEnd();
543
      oprot_.getTransport().flush();
544
    }
545
 
546
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
547
    {
548
      TMessage msg = iprot_.readMessageBegin();
549
      if (msg.type == TMessageType.EXCEPTION) {
550
        TApplicationException x = TApplicationException.read(iprot_);
551
        iprot_.readMessageEnd();
552
        throw x;
553
      }
554
      addBillingDetails_result result = new addBillingDetails_result();
555
      result.read(iprot_);
556
      iprot_.readMessageEnd();
557
      if (result.isSetSuccess()) {
558
        return result.success;
559
      }
560
      if (result.ex != null) {
561
        throw result.ex;
562
      }
563
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
564
    }
565
 
1148 chandransh 566
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
567
    {
568
      send_addJacketNumber(orderId, jacketNumber);
569
      return recv_addJacketNumber();
570
    }
571
 
572
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
573
    {
574
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
575
      addJacketNumber_args args = new addJacketNumber_args();
576
      args.orderId = orderId;
577
      args.jacketNumber = jacketNumber;
578
      args.write(oprot_);
579
      oprot_.writeMessageEnd();
580
      oprot_.getTransport().flush();
581
    }
582
 
583
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
584
    {
585
      TMessage msg = iprot_.readMessageBegin();
586
      if (msg.type == TMessageType.EXCEPTION) {
587
        TApplicationException x = TApplicationException.read(iprot_);
588
        iprot_.readMessageEnd();
589
        throw x;
590
      }
591
      addJacketNumber_result result = new addJacketNumber_result();
592
      result.read(iprot_);
593
      iprot_.readMessageEnd();
594
      if (result.isSetSuccess()) {
595
        return result.success;
596
      }
597
      if (result.ex != null) {
598
        throw result.ex;
599
      }
600
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
601
    }
602
 
923 rajveer 603
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
604
    {
605
      send_acceptOrder(orderId);
606
      return recv_acceptOrder();
607
    }
608
 
609
    public void send_acceptOrder(long orderId) throws TException
610
    {
611
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
612
      acceptOrder_args args = new acceptOrder_args();
613
      args.orderId = orderId;
614
      args.write(oprot_);
615
      oprot_.writeMessageEnd();
616
      oprot_.getTransport().flush();
617
    }
618
 
619
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
620
    {
621
      TMessage msg = iprot_.readMessageBegin();
622
      if (msg.type == TMessageType.EXCEPTION) {
623
        TApplicationException x = TApplicationException.read(iprot_);
624
        iprot_.readMessageEnd();
625
        throw x;
626
      }
627
      acceptOrder_result result = new acceptOrder_result();
628
      result.read(iprot_);
629
      iprot_.readMessageEnd();
630
      if (result.isSetSuccess()) {
631
        return result.success;
632
      }
633
      if (result.ex != null) {
634
        throw result.ex;
635
      }
636
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
637
    }
638
 
639
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
640
    {
641
      send_billOrder(orderId);
642
      return recv_billOrder();
643
    }
644
 
645
    public void send_billOrder(long orderId) throws TException
646
    {
647
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
648
      billOrder_args args = new billOrder_args();
649
      args.orderId = orderId;
650
      args.write(oprot_);
651
      oprot_.writeMessageEnd();
652
      oprot_.getTransport().flush();
653
    }
654
 
655
    public boolean recv_billOrder() throws TransactionServiceException, TException
656
    {
657
      TMessage msg = iprot_.readMessageBegin();
658
      if (msg.type == TMessageType.EXCEPTION) {
659
        TApplicationException x = TApplicationException.read(iprot_);
660
        iprot_.readMessageEnd();
661
        throw x;
662
      }
663
      billOrder_result result = new billOrder_result();
664
      result.read(iprot_);
665
      iprot_.readMessageEnd();
666
      if (result.isSetSuccess()) {
667
        return result.success;
668
      }
669
      if (result.ex != null) {
670
        throw result.ex;
671
      }
672
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
673
    }
674
 
483 rajveer 675
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 676
    {
483 rajveer 677
      send_getOrdersForTransaction(transactionId);
678
      return recv_getOrdersForTransaction();
68 ashish 679
    }
680
 
483 rajveer 681
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 682
    {
483 rajveer 683
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
684
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 685
      args.transactionId = transactionId;
686
      args.write(oprot_);
687
      oprot_.writeMessageEnd();
688
      oprot_.getTransport().flush();
689
    }
690
 
483 rajveer 691
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 692
    {
693
      TMessage msg = iprot_.readMessageBegin();
694
      if (msg.type == TMessageType.EXCEPTION) {
695
        TApplicationException x = TApplicationException.read(iprot_);
696
        iprot_.readMessageEnd();
697
        throw x;
698
      }
483 rajveer 699
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 700
      result.read(iprot_);
701
      iprot_.readMessageEnd();
702
      if (result.isSetSuccess()) {
703
        return result.success;
704
      }
705
      if (result.ex != null) {
706
        throw result.ex;
707
      }
483 rajveer 708
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 709
    }
710
 
483 rajveer 711
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 712
    {
483 rajveer 713
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
714
      return recv_getOrdersForCustomer();
68 ashish 715
    }
716
 
483 rajveer 717
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 718
    {
483 rajveer 719
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
720
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
721
      args.customerId = customerId;
722
      args.from_date = from_date;
723
      args.to_date = to_date;
724
      args.status = status;
68 ashish 725
      args.write(oprot_);
726
      oprot_.writeMessageEnd();
727
      oprot_.getTransport().flush();
728
    }
729
 
483 rajveer 730
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 731
    {
732
      TMessage msg = iprot_.readMessageBegin();
733
      if (msg.type == TMessageType.EXCEPTION) {
734
        TApplicationException x = TApplicationException.read(iprot_);
735
        iprot_.readMessageEnd();
736
        throw x;
737
      }
483 rajveer 738
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 739
      result.read(iprot_);
740
      iprot_.readMessageEnd();
741
      if (result.isSetSuccess()) {
742
        return result.success;
743
      }
744
      if (result.ex != null) {
745
        throw result.ex;
746
      }
483 rajveer 747
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 748
    }
749
 
483 rajveer 750
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 751
    {
483 rajveer 752
      send_createOrder(order);
753
      return recv_createOrder();
68 ashish 754
    }
755
 
483 rajveer 756
    public void send_createOrder(Order order) throws TException
68 ashish 757
    {
483 rajveer 758
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
759
      createOrder_args args = new createOrder_args();
760
      args.order = order;
68 ashish 761
      args.write(oprot_);
762
      oprot_.writeMessageEnd();
763
      oprot_.getTransport().flush();
764
    }
765
 
483 rajveer 766
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 767
    {
768
      TMessage msg = iprot_.readMessageBegin();
769
      if (msg.type == TMessageType.EXCEPTION) {
770
        TApplicationException x = TApplicationException.read(iprot_);
771
        iprot_.readMessageEnd();
772
        throw x;
773
      }
483 rajveer 774
      createOrder_result result = new createOrder_result();
68 ashish 775
      result.read(iprot_);
776
      iprot_.readMessageEnd();
777
      if (result.isSetSuccess()) {
778
        return result.success;
779
      }
780
      if (result.ex != null) {
781
        throw result.ex;
782
      }
483 rajveer 783
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 784
    }
785
 
483 rajveer 786
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 787
    {
483 rajveer 788
      send_getOrder(id);
789
      return recv_getOrder();
68 ashish 790
    }
791
 
483 rajveer 792
    public void send_getOrder(long id) throws TException
68 ashish 793
    {
483 rajveer 794
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
795
      getOrder_args args = new getOrder_args();
796
      args.id = id;
68 ashish 797
      args.write(oprot_);
798
      oprot_.writeMessageEnd();
799
      oprot_.getTransport().flush();
800
    }
801
 
483 rajveer 802
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 803
    {
804
      TMessage msg = iprot_.readMessageBegin();
805
      if (msg.type == TMessageType.EXCEPTION) {
806
        TApplicationException x = TApplicationException.read(iprot_);
807
        iprot_.readMessageEnd();
808
        throw x;
809
      }
483 rajveer 810
      getOrder_result result = new getOrder_result();
68 ashish 811
      result.read(iprot_);
812
      iprot_.readMessageEnd();
813
      if (result.isSetSuccess()) {
814
        return result.success;
815
      }
816
      if (result.ex != null) {
817
        throw result.ex;
818
      }
483 rajveer 819
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 820
    }
821
 
483 rajveer 822
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 823
    {
483 rajveer 824
      send_getLineItemsForOrder(orderId);
825
      return recv_getLineItemsForOrder();
68 ashish 826
    }
827
 
483 rajveer 828
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 829
    {
483 rajveer 830
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
831
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
832
      args.orderId = orderId;
68 ashish 833
      args.write(oprot_);
834
      oprot_.writeMessageEnd();
835
      oprot_.getTransport().flush();
836
    }
837
 
483 rajveer 838
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 839
    {
840
      TMessage msg = iprot_.readMessageBegin();
841
      if (msg.type == TMessageType.EXCEPTION) {
842
        TApplicationException x = TApplicationException.read(iprot_);
843
        iprot_.readMessageEnd();
844
        throw x;
845
      }
483 rajveer 846
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 847
      result.read(iprot_);
848
      iprot_.readMessageEnd();
849
      if (result.isSetSuccess()) {
850
        return result.success;
851
      }
852
      if (result.ex != null) {
853
        throw result.ex;
854
      }
483 rajveer 855
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 856
    }
857
 
758 chandransh 858
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
859
    {
860
      send_markOrdersAsManifested(warehouseId, providerId);
861
      return recv_markOrdersAsManifested();
862
    }
863
 
864
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
865
    {
866
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
867
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
868
      args.warehouseId = warehouseId;
869
      args.providerId = providerId;
870
      args.write(oprot_);
871
      oprot_.writeMessageEnd();
872
      oprot_.getTransport().flush();
873
    }
874
 
875
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
876
    {
877
      TMessage msg = iprot_.readMessageBegin();
878
      if (msg.type == TMessageType.EXCEPTION) {
879
        TApplicationException x = TApplicationException.read(iprot_);
880
        iprot_.readMessageEnd();
881
        throw x;
882
      }
883
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
884
      result.read(iprot_);
885
      iprot_.readMessageEnd();
886
      if (result.isSetSuccess()) {
887
        return result.success;
888
      }
889
      if (result.ex != null) {
890
        throw result.ex;
891
      }
892
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
893
    }
894
 
1114 chandransh 895
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException
896
    {
897
      send_markOrdersAsPickedUp(providerId, pickupDetails);
898
      return recv_markOrdersAsPickedUp();
899
    }
900
 
901
    public void send_markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TException
902
    {
903
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
904
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
905
      args.providerId = providerId;
906
      args.pickupDetails = pickupDetails;
907
      args.write(oprot_);
908
      oprot_.writeMessageEnd();
909
      oprot_.getTransport().flush();
910
    }
911
 
912
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
913
    {
914
      TMessage msg = iprot_.readMessageBegin();
915
      if (msg.type == TMessageType.EXCEPTION) {
916
        TApplicationException x = TApplicationException.read(iprot_);
917
        iprot_.readMessageEnd();
918
        throw x;
919
      }
920
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
921
      result.read(iprot_);
922
      iprot_.readMessageEnd();
923
      if (result.isSetSuccess()) {
924
        return result.success;
925
      }
926
      if (result.ex != null) {
927
        throw result.ex;
928
      }
929
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
930
    }
931
 
1133 chandransh 932
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
933
    {
934
      send_markOrdersAsDelivered(providerId, deliveredOrders);
935
      recv_markOrdersAsDelivered();
936
    }
937
 
938
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
939
    {
940
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
941
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
942
      args.providerId = providerId;
943
      args.deliveredOrders = deliveredOrders;
944
      args.write(oprot_);
945
      oprot_.writeMessageEnd();
946
      oprot_.getTransport().flush();
947
    }
948
 
949
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
950
    {
951
      TMessage msg = iprot_.readMessageBegin();
952
      if (msg.type == TMessageType.EXCEPTION) {
953
        TApplicationException x = TApplicationException.read(iprot_);
954
        iprot_.readMessageEnd();
955
        throw x;
956
      }
957
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
958
      result.read(iprot_);
959
      iprot_.readMessageEnd();
960
      if (result.ex != null) {
961
        throw result.ex;
962
      }
963
      return;
964
    }
965
 
966
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
967
    {
968
      send_markOrdersAsFailed(providerId, returnedOrders);
969
      recv_markOrdersAsFailed();
970
    }
971
 
972
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
973
    {
974
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
975
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
976
      args.providerId = providerId;
977
      args.returnedOrders = returnedOrders;
978
      args.write(oprot_);
979
      oprot_.writeMessageEnd();
980
      oprot_.getTransport().flush();
981
    }
982
 
983
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
984
    {
985
      TMessage msg = iprot_.readMessageBegin();
986
      if (msg.type == TMessageType.EXCEPTION) {
987
        TApplicationException x = TApplicationException.read(iprot_);
988
        iprot_.readMessageEnd();
989
        throw x;
990
      }
991
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
992
      result.read(iprot_);
993
      iprot_.readMessageEnd();
994
      if (result.ex != null) {
995
        throw result.ex;
996
      }
997
      return;
998
    }
999
 
483 rajveer 1000
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1001
    {
483 rajveer 1002
      send_getAlerts(orderId, valid);
305 ashish 1003
      return recv_getAlerts();
1004
    }
1005
 
483 rajveer 1006
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1007
    {
1008
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1009
      getAlerts_args args = new getAlerts_args();
483 rajveer 1010
      args.orderId = orderId;
305 ashish 1011
      args.valid = valid;
1012
      args.write(oprot_);
1013
      oprot_.writeMessageEnd();
1014
      oprot_.getTransport().flush();
1015
    }
1016
 
1017
    public List<Alert> recv_getAlerts() throws TException
1018
    {
1019
      TMessage msg = iprot_.readMessageBegin();
1020
      if (msg.type == TMessageType.EXCEPTION) {
1021
        TApplicationException x = TApplicationException.read(iprot_);
1022
        iprot_.readMessageEnd();
1023
        throw x;
1024
      }
1025
      getAlerts_result result = new getAlerts_result();
1026
      result.read(iprot_);
1027
      iprot_.readMessageEnd();
1028
      if (result.isSetSuccess()) {
1029
        return result.success;
1030
      }
1031
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1032
    }
1033
 
483 rajveer 1034
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1035
    {
483 rajveer 1036
      send_setAlert(orderId, unset, type, comment);
305 ashish 1037
      recv_setAlert();
1038
    }
1039
 
483 rajveer 1040
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1041
    {
1042
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1043
      setAlert_args args = new setAlert_args();
483 rajveer 1044
      args.orderId = orderId;
305 ashish 1045
      args.unset = unset;
1046
      args.type = type;
1047
      args.comment = comment;
1048
      args.write(oprot_);
1049
      oprot_.writeMessageEnd();
1050
      oprot_.getTransport().flush();
1051
    }
1052
 
1053
    public void recv_setAlert() throws TException
1054
    {
1055
      TMessage msg = iprot_.readMessageBegin();
1056
      if (msg.type == TMessageType.EXCEPTION) {
1057
        TApplicationException x = TApplicationException.read(iprot_);
1058
        iprot_.readMessageEnd();
1059
        throw x;
1060
      }
1061
      setAlert_result result = new setAlert_result();
1062
      result.read(iprot_);
1063
      iprot_.readMessageEnd();
1064
      return;
1065
    }
1066
 
68 ashish 1067
  }
1068
  public static class Processor implements TProcessor {
1069
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1070
    public Processor(Iface iface)
1071
    {
1072
      iface_ = iface;
764 rajveer 1073
      processMap_.put("closeSession", new closeSession());
68 ashish 1074
      processMap_.put("createTransaction", new createTransaction());
1075
      processMap_.put("getTransaction", new getTransaction());
1076
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1077
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1078
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1079
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 1080
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1081
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
483 rajveer 1082
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1083
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1084
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1085
      processMap_.put("acceptOrder", new acceptOrder());
1086
      processMap_.put("billOrder", new billOrder());
483 rajveer 1087
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1088
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1089
      processMap_.put("createOrder", new createOrder());
1090
      processMap_.put("getOrder", new getOrder());
1091
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
758 chandransh 1092
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1093
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1094
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1095
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
305 ashish 1096
      processMap_.put("getAlerts", new getAlerts());
1097
      processMap_.put("setAlert", new setAlert());
68 ashish 1098
    }
1099
 
1100
    protected static interface ProcessFunction {
1101
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1102
    }
1103
 
1104
    private Iface iface_;
1105
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1106
 
1107
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1108
    {
1109
      TMessage msg = iprot.readMessageBegin();
1110
      ProcessFunction fn = processMap_.get(msg.name);
1111
      if (fn == null) {
1112
        TProtocolUtil.skip(iprot, TType.STRUCT);
1113
        iprot.readMessageEnd();
1114
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1115
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1116
        x.write(oprot);
1117
        oprot.writeMessageEnd();
1118
        oprot.getTransport().flush();
1119
        return true;
1120
      }
1121
      fn.process(msg.seqid, iprot, oprot);
1122
      return true;
1123
    }
1124
 
764 rajveer 1125
    private class closeSession implements ProcessFunction {
1126
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1127
      {
1128
        closeSession_args args = new closeSession_args();
1129
        args.read(iprot);
1130
        iprot.readMessageEnd();
1131
        closeSession_result result = new closeSession_result();
1132
        iface_.closeSession();
1133
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1134
        result.write(oprot);
1135
        oprot.writeMessageEnd();
1136
        oprot.getTransport().flush();
1137
      }
1138
 
1139
    }
1140
 
68 ashish 1141
    private class createTransaction implements ProcessFunction {
1142
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1143
      {
1144
        createTransaction_args args = new createTransaction_args();
1145
        args.read(iprot);
1146
        iprot.readMessageEnd();
1147
        createTransaction_result result = new createTransaction_result();
1148
        try {
132 ashish 1149
          result.success = iface_.createTransaction(args.transaction);
1150
          result.setSuccessIsSet(true);
68 ashish 1151
        } catch (TransactionServiceException ex) {
1152
          result.ex = ex;
1153
        } catch (Throwable th) {
1154
          LOGGER.error("Internal error processing createTransaction", th);
1155
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1156
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1157
          x.write(oprot);
1158
          oprot.writeMessageEnd();
1159
          oprot.getTransport().flush();
1160
          return;
1161
        }
1162
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1163
        result.write(oprot);
1164
        oprot.writeMessageEnd();
1165
        oprot.getTransport().flush();
1166
      }
1167
 
1168
    }
1169
 
1170
    private class getTransaction implements ProcessFunction {
1171
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1172
      {
1173
        getTransaction_args args = new getTransaction_args();
1174
        args.read(iprot);
1175
        iprot.readMessageEnd();
1176
        getTransaction_result result = new getTransaction_result();
1177
        try {
1178
          result.success = iface_.getTransaction(args.id);
1179
        } catch (TransactionServiceException ex) {
1180
          result.ex = ex;
1181
        } catch (Throwable th) {
1182
          LOGGER.error("Internal error processing getTransaction", th);
1183
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1184
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1185
          x.write(oprot);
1186
          oprot.writeMessageEnd();
1187
          oprot.getTransport().flush();
1188
          return;
1189
        }
1190
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1191
        result.write(oprot);
1192
        oprot.writeMessageEnd();
1193
        oprot.getTransport().flush();
1194
      }
1195
 
1196
    }
1197
 
1198
    private class getTransactionsForCustomer implements ProcessFunction {
1199
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1200
      {
1201
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1202
        args.read(iprot);
1203
        iprot.readMessageEnd();
1204
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1205
        try {
132 ashish 1206
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1207
        } catch (TransactionServiceException ex) {
1208
          result.ex = ex;
1209
        } catch (Throwable th) {
1210
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1211
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1212
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1213
          x.write(oprot);
1214
          oprot.writeMessageEnd();
1215
          oprot.getTransport().flush();
1216
          return;
1217
        }
1218
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1219
        result.write(oprot);
1220
        oprot.writeMessageEnd();
1221
        oprot.getTransport().flush();
1222
      }
1223
 
1224
    }
1225
 
132 ashish 1226
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1227
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1228
      {
1229
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1230
        args.read(iprot);
1231
        iprot.readMessageEnd();
1232
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1233
        try {
1234
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1235
        } catch (TransactionServiceException ex) {
1236
          result.ex = ex;
1237
        } catch (Throwable th) {
1238
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1239
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1240
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1241
          x.write(oprot);
1242
          oprot.writeMessageEnd();
1243
          oprot.getTransport().flush();
1244
          return;
1245
        }
1246
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1247
        result.write(oprot);
1248
        oprot.writeMessageEnd();
1249
        oprot.getTransport().flush();
1250
      }
1251
 
1252
    }
1253
 
68 ashish 1254
    private class getTransactionStatus implements ProcessFunction {
1255
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1256
      {
1257
        getTransactionStatus_args args = new getTransactionStatus_args();
1258
        args.read(iprot);
1259
        iprot.readMessageEnd();
1260
        getTransactionStatus_result result = new getTransactionStatus_result();
1261
        try {
1262
          result.success = iface_.getTransactionStatus(args.transactionId);
1263
        } catch (TransactionServiceException ex) {
1264
          result.ex = ex;
1265
        } catch (Throwable th) {
1266
          LOGGER.error("Internal error processing getTransactionStatus", th);
1267
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1268
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1269
          x.write(oprot);
1270
          oprot.writeMessageEnd();
1271
          oprot.getTransport().flush();
1272
          return;
1273
        }
1274
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1275
        result.write(oprot);
1276
        oprot.writeMessageEnd();
1277
        oprot.getTransport().flush();
1278
      }
1279
 
1280
    }
1281
 
1282
    private class changeTransactionStatus implements ProcessFunction {
1283
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1284
      {
1285
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1286
        args.read(iprot);
1287
        iprot.readMessageEnd();
1288
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1289
        try {
1290
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1291
          result.setSuccessIsSet(true);
1292
        } catch (TransactionServiceException ex) {
1293
          result.ex = ex;
1294
        } catch (Throwable th) {
1295
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1296
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1297
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1298
          x.write(oprot);
1299
          oprot.writeMessageEnd();
1300
          oprot.getTransport().flush();
1301
          return;
1302
        }
1303
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1304
        result.write(oprot);
1305
        oprot.writeMessageEnd();
1306
        oprot.getTransport().flush();
1307
      }
1308
 
1309
    }
1310
 
483 rajveer 1311
    private class getAllOrders implements ProcessFunction {
68 ashish 1312
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1313
      {
483 rajveer 1314
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1315
        args.read(iprot);
1316
        iprot.readMessageEnd();
483 rajveer 1317
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1318
        try {
483 rajveer 1319
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1320
        } catch (TransactionServiceException ex) {
1321
          result.ex = ex;
1322
        } catch (Throwable th) {
483 rajveer 1323
          LOGGER.error("Internal error processing getAllOrders", th);
1324
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1325
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1326
          x.write(oprot);
1327
          oprot.writeMessageEnd();
1328
          oprot.getTransport().flush();
1329
          return;
1330
        }
483 rajveer 1331
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1332
        result.write(oprot);
1333
        oprot.writeMessageEnd();
1334
        oprot.getTransport().flush();
1335
      }
1336
 
1337
    }
1338
 
1022 varun.gupt 1339
    private class getOrdersByBillingDate implements ProcessFunction {
1340
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1341
      {
1342
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1343
        args.read(iprot);
1344
        iprot.readMessageEnd();
1345
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1346
        try {
1347
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1348
        } catch (TransactionServiceException ex) {
1349
          result.ex = ex;
1350
        } catch (Throwable th) {
1351
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1352
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1353
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1354
          x.write(oprot);
1355
          oprot.writeMessageEnd();
1356
          oprot.getTransport().flush();
1357
          return;
1358
        }
1359
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1360
        result.write(oprot);
1361
        oprot.writeMessageEnd();
1362
        oprot.getTransport().flush();
1363
      }
1364
 
1365
    }
1366
 
483 rajveer 1367
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1368
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1369
      {
483 rajveer 1370
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1371
        args.read(iprot);
1372
        iprot.readMessageEnd();
483 rajveer 1373
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1374
        try {
483 rajveer 1375
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1376
          result.setSuccessIsSet(true);
1377
        } catch (TransactionServiceException ex) {
1378
          result.ex = ex;
1379
        } catch (Throwable th) {
483 rajveer 1380
          LOGGER.error("Internal error processing changeOrderStatus", th);
1381
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1382
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1383
          x.write(oprot);
1384
          oprot.writeMessageEnd();
1385
          oprot.getTransport().flush();
1386
          return;
1387
        }
483 rajveer 1388
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1389
        result.write(oprot);
1390
        oprot.writeMessageEnd();
1391
        oprot.getTransport().flush();
1392
      }
1393
 
1394
    }
1395
 
495 rajveer 1396
    private class addBillingDetails implements ProcessFunction {
1397
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1398
      {
1399
        addBillingDetails_args args = new addBillingDetails_args();
1400
        args.read(iprot);
1401
        iprot.readMessageEnd();
1402
        addBillingDetails_result result = new addBillingDetails_result();
1403
        try {
1148 chandransh 1404
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1405
          result.setSuccessIsSet(true);
1406
        } catch (TransactionServiceException ex) {
1407
          result.ex = ex;
1408
        } catch (Throwable th) {
1409
          LOGGER.error("Internal error processing addBillingDetails", th);
1410
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1411
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1412
          x.write(oprot);
1413
          oprot.writeMessageEnd();
1414
          oprot.getTransport().flush();
1415
          return;
1416
        }
1417
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1418
        result.write(oprot);
1419
        oprot.writeMessageEnd();
1420
        oprot.getTransport().flush();
1421
      }
1422
 
1423
    }
1424
 
1148 chandransh 1425
    private class addJacketNumber implements ProcessFunction {
1426
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1427
      {
1428
        addJacketNumber_args args = new addJacketNumber_args();
1429
        args.read(iprot);
1430
        iprot.readMessageEnd();
1431
        addJacketNumber_result result = new addJacketNumber_result();
1432
        try {
1433
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1434
          result.setSuccessIsSet(true);
1435
        } catch (TransactionServiceException ex) {
1436
          result.ex = ex;
1437
        } catch (Throwable th) {
1438
          LOGGER.error("Internal error processing addJacketNumber", th);
1439
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1440
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1441
          x.write(oprot);
1442
          oprot.writeMessageEnd();
1443
          oprot.getTransport().flush();
1444
          return;
1445
        }
1446
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1447
        result.write(oprot);
1448
        oprot.writeMessageEnd();
1449
        oprot.getTransport().flush();
1450
      }
1451
 
1452
    }
1453
 
923 rajveer 1454
    private class acceptOrder implements ProcessFunction {
1455
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1456
      {
1457
        acceptOrder_args args = new acceptOrder_args();
1458
        args.read(iprot);
1459
        iprot.readMessageEnd();
1460
        acceptOrder_result result = new acceptOrder_result();
1461
        try {
1462
          result.success = iface_.acceptOrder(args.orderId);
1463
          result.setSuccessIsSet(true);
1464
        } catch (TransactionServiceException ex) {
1465
          result.ex = ex;
1466
        } catch (Throwable th) {
1467
          LOGGER.error("Internal error processing acceptOrder", th);
1468
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1469
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1470
          x.write(oprot);
1471
          oprot.writeMessageEnd();
1472
          oprot.getTransport().flush();
1473
          return;
1474
        }
1475
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1476
        result.write(oprot);
1477
        oprot.writeMessageEnd();
1478
        oprot.getTransport().flush();
1479
      }
1480
 
1481
    }
1482
 
1483
    private class billOrder implements ProcessFunction {
1484
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1485
      {
1486
        billOrder_args args = new billOrder_args();
1487
        args.read(iprot);
1488
        iprot.readMessageEnd();
1489
        billOrder_result result = new billOrder_result();
1490
        try {
1491
          result.success = iface_.billOrder(args.orderId);
1492
          result.setSuccessIsSet(true);
1493
        } catch (TransactionServiceException ex) {
1494
          result.ex = ex;
1495
        } catch (Throwable th) {
1496
          LOGGER.error("Internal error processing billOrder", th);
1497
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1498
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1499
          x.write(oprot);
1500
          oprot.writeMessageEnd();
1501
          oprot.getTransport().flush();
1502
          return;
1503
        }
1504
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1505
        result.write(oprot);
1506
        oprot.writeMessageEnd();
1507
        oprot.getTransport().flush();
1508
      }
1509
 
1510
    }
1511
 
483 rajveer 1512
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1513
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1514
      {
483 rajveer 1515
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1516
        args.read(iprot);
1517
        iprot.readMessageEnd();
483 rajveer 1518
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1519
        try {
483 rajveer 1520
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1521
        } catch (TransactionServiceException ex) {
1522
          result.ex = ex;
1523
        } catch (Throwable th) {
483 rajveer 1524
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1525
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1526
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1527
          x.write(oprot);
1528
          oprot.writeMessageEnd();
1529
          oprot.getTransport().flush();
1530
          return;
1531
        }
483 rajveer 1532
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1533
        result.write(oprot);
1534
        oprot.writeMessageEnd();
1535
        oprot.getTransport().flush();
1536
      }
1537
 
1538
    }
1539
 
483 rajveer 1540
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1541
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1542
      {
483 rajveer 1543
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1544
        args.read(iprot);
1545
        iprot.readMessageEnd();
483 rajveer 1546
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1547
        try {
483 rajveer 1548
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1549
        } catch (TransactionServiceException ex) {
1550
          result.ex = ex;
1551
        } catch (Throwable th) {
483 rajveer 1552
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1553
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1554
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1555
          x.write(oprot);
1556
          oprot.writeMessageEnd();
1557
          oprot.getTransport().flush();
1558
          return;
1559
        }
483 rajveer 1560
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1561
        result.write(oprot);
1562
        oprot.writeMessageEnd();
1563
        oprot.getTransport().flush();
1564
      }
1565
 
1566
    }
1567
 
483 rajveer 1568
    private class createOrder implements ProcessFunction {
68 ashish 1569
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1570
      {
483 rajveer 1571
        createOrder_args args = new createOrder_args();
68 ashish 1572
        args.read(iprot);
1573
        iprot.readMessageEnd();
483 rajveer 1574
        createOrder_result result = new createOrder_result();
68 ashish 1575
        try {
483 rajveer 1576
          result.success = iface_.createOrder(args.order);
68 ashish 1577
          result.setSuccessIsSet(true);
1578
        } catch (TransactionServiceException ex) {
1579
          result.ex = ex;
1580
        } catch (Throwable th) {
483 rajveer 1581
          LOGGER.error("Internal error processing createOrder", th);
1582
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1583
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1584
          x.write(oprot);
1585
          oprot.writeMessageEnd();
1586
          oprot.getTransport().flush();
1587
          return;
1588
        }
483 rajveer 1589
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1590
        result.write(oprot);
1591
        oprot.writeMessageEnd();
1592
        oprot.getTransport().flush();
1593
      }
1594
 
1595
    }
1596
 
483 rajveer 1597
    private class getOrder implements ProcessFunction {
68 ashish 1598
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1599
      {
483 rajveer 1600
        getOrder_args args = new getOrder_args();
68 ashish 1601
        args.read(iprot);
1602
        iprot.readMessageEnd();
483 rajveer 1603
        getOrder_result result = new getOrder_result();
68 ashish 1604
        try {
483 rajveer 1605
          result.success = iface_.getOrder(args.id);
68 ashish 1606
        } catch (TransactionServiceException ex) {
1607
          result.ex = ex;
1608
        } catch (Throwable th) {
483 rajveer 1609
          LOGGER.error("Internal error processing getOrder", th);
1610
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1611
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1612
          x.write(oprot);
1613
          oprot.writeMessageEnd();
1614
          oprot.getTransport().flush();
1615
          return;
1616
        }
483 rajveer 1617
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1618
        result.write(oprot);
1619
        oprot.writeMessageEnd();
1620
        oprot.getTransport().flush();
1621
      }
1622
 
1623
    }
1624
 
483 rajveer 1625
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1626
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1627
      {
483 rajveer 1628
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1629
        args.read(iprot);
1630
        iprot.readMessageEnd();
483 rajveer 1631
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1632
        try {
483 rajveer 1633
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1634
        } catch (TransactionServiceException ex) {
1635
          result.ex = ex;
1636
        } catch (Throwable th) {
483 rajveer 1637
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1638
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1639
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1640
          x.write(oprot);
1641
          oprot.writeMessageEnd();
1642
          oprot.getTransport().flush();
1643
          return;
1644
        }
483 rajveer 1645
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1646
        result.write(oprot);
1647
        oprot.writeMessageEnd();
1648
        oprot.getTransport().flush();
1649
      }
1650
 
1651
    }
1652
 
758 chandransh 1653
    private class markOrdersAsManifested implements ProcessFunction {
1654
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1655
      {
1656
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1657
        args.read(iprot);
1658
        iprot.readMessageEnd();
1659
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1660
        try {
1661
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1662
          result.setSuccessIsSet(true);
1663
        } catch (TransactionServiceException ex) {
1664
          result.ex = ex;
1665
        } catch (Throwable th) {
1666
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1667
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1668
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1669
          x.write(oprot);
1670
          oprot.writeMessageEnd();
1671
          oprot.getTransport().flush();
1672
          return;
1673
        }
1674
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1675
        result.write(oprot);
1676
        oprot.writeMessageEnd();
1677
        oprot.getTransport().flush();
1678
      }
1679
 
1680
    }
1681
 
1114 chandransh 1682
    private class markOrdersAsPickedUp implements ProcessFunction {
1683
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1684
      {
1685
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1686
        args.read(iprot);
1687
        iprot.readMessageEnd();
1688
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1689
        try {
1690
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
1691
        } catch (TransactionServiceException ex) {
1692
          result.ex = ex;
1693
        } catch (Throwable th) {
1694
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
1695
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
1696
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
1697
          x.write(oprot);
1698
          oprot.writeMessageEnd();
1699
          oprot.getTransport().flush();
1700
          return;
1701
        }
1702
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
1703
        result.write(oprot);
1704
        oprot.writeMessageEnd();
1705
        oprot.getTransport().flush();
1706
      }
1707
 
1708
    }
1709
 
1133 chandransh 1710
    private class markOrdersAsDelivered implements ProcessFunction {
1711
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1712
      {
1713
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1714
        args.read(iprot);
1715
        iprot.readMessageEnd();
1716
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1717
        try {
1718
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
1719
        } catch (TransactionServiceException ex) {
1720
          result.ex = ex;
1721
        } catch (Throwable th) {
1722
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
1723
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
1724
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
1725
          x.write(oprot);
1726
          oprot.writeMessageEnd();
1727
          oprot.getTransport().flush();
1728
          return;
1729
        }
1730
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
1731
        result.write(oprot);
1732
        oprot.writeMessageEnd();
1733
        oprot.getTransport().flush();
1734
      }
1735
 
1736
    }
1737
 
1738
    private class markOrdersAsFailed implements ProcessFunction {
1739
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1740
      {
1741
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1742
        args.read(iprot);
1743
        iprot.readMessageEnd();
1744
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1745
        try {
1746
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
1747
        } catch (TransactionServiceException ex) {
1748
          result.ex = ex;
1749
        } catch (Throwable th) {
1750
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
1751
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
1752
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
1753
          x.write(oprot);
1754
          oprot.writeMessageEnd();
1755
          oprot.getTransport().flush();
1756
          return;
1757
        }
1758
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
1759
        result.write(oprot);
1760
        oprot.writeMessageEnd();
1761
        oprot.getTransport().flush();
1762
      }
1763
 
1764
    }
1765
 
305 ashish 1766
    private class getAlerts implements ProcessFunction {
1767
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1768
      {
1769
        getAlerts_args args = new getAlerts_args();
1770
        args.read(iprot);
1771
        iprot.readMessageEnd();
1772
        getAlerts_result result = new getAlerts_result();
483 rajveer 1773
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1774
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1775
        result.write(oprot);
1776
        oprot.writeMessageEnd();
1777
        oprot.getTransport().flush();
1778
      }
1779
 
1780
    }
1781
 
1782
    private class setAlert implements ProcessFunction {
1783
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1784
      {
1785
        setAlert_args args = new setAlert_args();
1786
        args.read(iprot);
1787
        iprot.readMessageEnd();
1788
        setAlert_result result = new setAlert_result();
483 rajveer 1789
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 1790
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1791
        result.write(oprot);
1792
        oprot.writeMessageEnd();
1793
        oprot.getTransport().flush();
1794
      }
1795
 
1796
    }
1797
 
68 ashish 1798
  }
1799
 
764 rajveer 1800
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1801
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1802
 
1803
 
1804
 
1805
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1806
    public enum _Fields implements TFieldIdEnum {
1807
;
1808
 
1809
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1810
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1811
 
1812
      static {
1813
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1814
          byId.put((int)field._thriftId, field);
1815
          byName.put(field.getFieldName(), field);
1816
        }
1817
      }
1818
 
1819
      /**
1820
       * Find the _Fields constant that matches fieldId, or null if its not found.
1821
       */
1822
      public static _Fields findByThriftId(int fieldId) {
1823
        return byId.get(fieldId);
1824
      }
1825
 
1826
      /**
1827
       * Find the _Fields constant that matches fieldId, throwing an exception
1828
       * if it is not found.
1829
       */
1830
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1831
        _Fields fields = findByThriftId(fieldId);
1832
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1833
        return fields;
1834
      }
1835
 
1836
      /**
1837
       * Find the _Fields constant that matches name, or null if its not found.
1838
       */
1839
      public static _Fields findByName(String name) {
1840
        return byName.get(name);
1841
      }
1842
 
1843
      private final short _thriftId;
1844
      private final String _fieldName;
1845
 
1846
      _Fields(short thriftId, String fieldName) {
1847
        _thriftId = thriftId;
1848
        _fieldName = fieldName;
1849
      }
1850
 
1851
      public short getThriftFieldId() {
1852
        return _thriftId;
1853
      }
1854
 
1855
      public String getFieldName() {
1856
        return _fieldName;
1857
      }
1858
    }
1859
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1860
    }});
1861
 
1862
    static {
1863
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1864
    }
1865
 
1866
    public closeSession_args() {
1867
    }
1868
 
1869
    /**
1870
     * Performs a deep copy on <i>other</i>.
1871
     */
1872
    public closeSession_args(closeSession_args other) {
1873
    }
1874
 
1875
    public closeSession_args deepCopy() {
1876
      return new closeSession_args(this);
1877
    }
1878
 
1879
    @Deprecated
1880
    public closeSession_args clone() {
1881
      return new closeSession_args(this);
1882
    }
1883
 
1884
    public void setFieldValue(_Fields field, Object value) {
1885
      switch (field) {
1886
      }
1887
    }
1888
 
1889
    public void setFieldValue(int fieldID, Object value) {
1890
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1891
    }
1892
 
1893
    public Object getFieldValue(_Fields field) {
1894
      switch (field) {
1895
      }
1896
      throw new IllegalStateException();
1897
    }
1898
 
1899
    public Object getFieldValue(int fieldId) {
1900
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1901
    }
1902
 
1903
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1904
    public boolean isSet(_Fields field) {
1905
      switch (field) {
1906
      }
1907
      throw new IllegalStateException();
1908
    }
1909
 
1910
    public boolean isSet(int fieldID) {
1911
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1912
    }
1913
 
1914
    @Override
1915
    public boolean equals(Object that) {
1916
      if (that == null)
1917
        return false;
1918
      if (that instanceof closeSession_args)
1919
        return this.equals((closeSession_args)that);
1920
      return false;
1921
    }
1922
 
1923
    public boolean equals(closeSession_args that) {
1924
      if (that == null)
1925
        return false;
1926
 
1927
      return true;
1928
    }
1929
 
1930
    @Override
1931
    public int hashCode() {
1932
      return 0;
1933
    }
1934
 
1935
    public int compareTo(closeSession_args other) {
1936
      if (!getClass().equals(other.getClass())) {
1937
        return getClass().getName().compareTo(other.getClass().getName());
1938
      }
1939
 
1940
      int lastComparison = 0;
1941
      closeSession_args typedOther = (closeSession_args)other;
1942
 
1943
      return 0;
1944
    }
1945
 
1946
    public void read(TProtocol iprot) throws TException {
1947
      TField field;
1948
      iprot.readStructBegin();
1949
      while (true)
1950
      {
1951
        field = iprot.readFieldBegin();
1952
        if (field.type == TType.STOP) { 
1953
          break;
1954
        }
1955
        _Fields fieldId = _Fields.findByThriftId(field.id);
1956
        if (fieldId == null) {
1957
          TProtocolUtil.skip(iprot, field.type);
1958
        } else {
1959
          switch (fieldId) {
1960
          }
1961
          iprot.readFieldEnd();
1962
        }
1963
      }
1964
      iprot.readStructEnd();
1965
      validate();
1966
    }
1967
 
1968
    public void write(TProtocol oprot) throws TException {
1969
      validate();
1970
 
1971
      oprot.writeStructBegin(STRUCT_DESC);
1972
      oprot.writeFieldStop();
1973
      oprot.writeStructEnd();
1974
    }
1975
 
1976
    @Override
1977
    public String toString() {
1978
      StringBuilder sb = new StringBuilder("closeSession_args(");
1979
      boolean first = true;
1980
 
1981
      sb.append(")");
1982
      return sb.toString();
1983
    }
1984
 
1985
    public void validate() throws TException {
1986
      // check for required fields
1987
    }
1988
 
1989
  }
1990
 
1991
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1992
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1993
 
1994
 
1995
 
1996
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1997
    public enum _Fields implements TFieldIdEnum {
1998
;
1999
 
2000
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2001
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2002
 
2003
      static {
2004
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2005
          byId.put((int)field._thriftId, field);
2006
          byName.put(field.getFieldName(), field);
2007
        }
2008
      }
2009
 
2010
      /**
2011
       * Find the _Fields constant that matches fieldId, or null if its not found.
2012
       */
2013
      public static _Fields findByThriftId(int fieldId) {
2014
        return byId.get(fieldId);
2015
      }
2016
 
2017
      /**
2018
       * Find the _Fields constant that matches fieldId, throwing an exception
2019
       * if it is not found.
2020
       */
2021
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2022
        _Fields fields = findByThriftId(fieldId);
2023
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2024
        return fields;
2025
      }
2026
 
2027
      /**
2028
       * Find the _Fields constant that matches name, or null if its not found.
2029
       */
2030
      public static _Fields findByName(String name) {
2031
        return byName.get(name);
2032
      }
2033
 
2034
      private final short _thriftId;
2035
      private final String _fieldName;
2036
 
2037
      _Fields(short thriftId, String fieldName) {
2038
        _thriftId = thriftId;
2039
        _fieldName = fieldName;
2040
      }
2041
 
2042
      public short getThriftFieldId() {
2043
        return _thriftId;
2044
      }
2045
 
2046
      public String getFieldName() {
2047
        return _fieldName;
2048
      }
2049
    }
2050
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2051
    }});
2052
 
2053
    static {
2054
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2055
    }
2056
 
2057
    public closeSession_result() {
2058
    }
2059
 
2060
    /**
2061
     * Performs a deep copy on <i>other</i>.
2062
     */
2063
    public closeSession_result(closeSession_result other) {
2064
    }
2065
 
2066
    public closeSession_result deepCopy() {
2067
      return new closeSession_result(this);
2068
    }
2069
 
2070
    @Deprecated
2071
    public closeSession_result clone() {
2072
      return new closeSession_result(this);
2073
    }
2074
 
2075
    public void setFieldValue(_Fields field, Object value) {
2076
      switch (field) {
2077
      }
2078
    }
2079
 
2080
    public void setFieldValue(int fieldID, Object value) {
2081
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2082
    }
2083
 
2084
    public Object getFieldValue(_Fields field) {
2085
      switch (field) {
2086
      }
2087
      throw new IllegalStateException();
2088
    }
2089
 
2090
    public Object getFieldValue(int fieldId) {
2091
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2092
    }
2093
 
2094
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2095
    public boolean isSet(_Fields field) {
2096
      switch (field) {
2097
      }
2098
      throw new IllegalStateException();
2099
    }
2100
 
2101
    public boolean isSet(int fieldID) {
2102
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2103
    }
2104
 
2105
    @Override
2106
    public boolean equals(Object that) {
2107
      if (that == null)
2108
        return false;
2109
      if (that instanceof closeSession_result)
2110
        return this.equals((closeSession_result)that);
2111
      return false;
2112
    }
2113
 
2114
    public boolean equals(closeSession_result that) {
2115
      if (that == null)
2116
        return false;
2117
 
2118
      return true;
2119
    }
2120
 
2121
    @Override
2122
    public int hashCode() {
2123
      return 0;
2124
    }
2125
 
2126
    public int compareTo(closeSession_result other) {
2127
      if (!getClass().equals(other.getClass())) {
2128
        return getClass().getName().compareTo(other.getClass().getName());
2129
      }
2130
 
2131
      int lastComparison = 0;
2132
      closeSession_result typedOther = (closeSession_result)other;
2133
 
2134
      return 0;
2135
    }
2136
 
2137
    public void read(TProtocol iprot) throws TException {
2138
      TField field;
2139
      iprot.readStructBegin();
2140
      while (true)
2141
      {
2142
        field = iprot.readFieldBegin();
2143
        if (field.type == TType.STOP) { 
2144
          break;
2145
        }
2146
        _Fields fieldId = _Fields.findByThriftId(field.id);
2147
        if (fieldId == null) {
2148
          TProtocolUtil.skip(iprot, field.type);
2149
        } else {
2150
          switch (fieldId) {
2151
          }
2152
          iprot.readFieldEnd();
2153
        }
2154
      }
2155
      iprot.readStructEnd();
2156
      validate();
2157
    }
2158
 
2159
    public void write(TProtocol oprot) throws TException {
2160
      oprot.writeStructBegin(STRUCT_DESC);
2161
 
2162
      oprot.writeFieldStop();
2163
      oprot.writeStructEnd();
2164
    }
2165
 
2166
    @Override
2167
    public String toString() {
2168
      StringBuilder sb = new StringBuilder("closeSession_result(");
2169
      boolean first = true;
2170
 
2171
      sb.append(")");
2172
      return sb.toString();
2173
    }
2174
 
2175
    public void validate() throws TException {
2176
      // check for required fields
2177
    }
2178
 
2179
  }
2180
 
684 chandransh 2181
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2182
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2183
 
2184
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2185
 
2186
    private Transaction transaction;
2187
 
2188
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2189
    public enum _Fields implements TFieldIdEnum {
2190
      TRANSACTION((short)1, "transaction");
2191
 
2192
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2193
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2194
 
2195
      static {
2196
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2197
          byId.put((int)field._thriftId, field);
2198
          byName.put(field.getFieldName(), field);
2199
        }
2200
      }
2201
 
2202
      /**
2203
       * Find the _Fields constant that matches fieldId, or null if its not found.
2204
       */
2205
      public static _Fields findByThriftId(int fieldId) {
2206
        return byId.get(fieldId);
2207
      }
2208
 
2209
      /**
2210
       * Find the _Fields constant that matches fieldId, throwing an exception
2211
       * if it is not found.
2212
       */
2213
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2214
        _Fields fields = findByThriftId(fieldId);
2215
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2216
        return fields;
2217
      }
2218
 
2219
      /**
2220
       * Find the _Fields constant that matches name, or null if its not found.
2221
       */
2222
      public static _Fields findByName(String name) {
2223
        return byName.get(name);
2224
      }
2225
 
2226
      private final short _thriftId;
2227
      private final String _fieldName;
2228
 
2229
      _Fields(short thriftId, String fieldName) {
2230
        _thriftId = thriftId;
2231
        _fieldName = fieldName;
2232
      }
2233
 
2234
      public short getThriftFieldId() {
2235
        return _thriftId;
2236
      }
2237
 
2238
      public String getFieldName() {
2239
        return _fieldName;
2240
      }
2241
    }
2242
 
2243
    // isset id assignments
2244
 
2245
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2246
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2247
          new StructMetaData(TType.STRUCT, Transaction.class)));
2248
    }});
2249
 
2250
    static {
2251
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2252
    }
2253
 
2254
    public createTransaction_args() {
2255
    }
2256
 
2257
    public createTransaction_args(
2258
      Transaction transaction)
2259
    {
2260
      this();
2261
      this.transaction = transaction;
2262
    }
2263
 
2264
    /**
2265
     * Performs a deep copy on <i>other</i>.
2266
     */
2267
    public createTransaction_args(createTransaction_args other) {
2268
      if (other.isSetTransaction()) {
2269
        this.transaction = new Transaction(other.transaction);
2270
      }
2271
    }
2272
 
2273
    public createTransaction_args deepCopy() {
2274
      return new createTransaction_args(this);
2275
    }
2276
 
2277
    @Deprecated
2278
    public createTransaction_args clone() {
2279
      return new createTransaction_args(this);
2280
    }
2281
 
2282
    public Transaction getTransaction() {
2283
      return this.transaction;
2284
    }
2285
 
2286
    public createTransaction_args setTransaction(Transaction transaction) {
2287
      this.transaction = transaction;
2288
      return this;
2289
    }
2290
 
2291
    public void unsetTransaction() {
2292
      this.transaction = null;
2293
    }
2294
 
2295
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2296
    public boolean isSetTransaction() {
2297
      return this.transaction != null;
2298
    }
2299
 
2300
    public void setTransactionIsSet(boolean value) {
2301
      if (!value) {
2302
        this.transaction = null;
2303
      }
2304
    }
2305
 
2306
    public void setFieldValue(_Fields field, Object value) {
2307
      switch (field) {
2308
      case TRANSACTION:
2309
        if (value == null) {
2310
          unsetTransaction();
2311
        } else {
2312
          setTransaction((Transaction)value);
2313
        }
2314
        break;
2315
 
2316
      }
2317
    }
2318
 
2319
    public void setFieldValue(int fieldID, Object value) {
2320
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2321
    }
2322
 
2323
    public Object getFieldValue(_Fields field) {
2324
      switch (field) {
2325
      case TRANSACTION:
2326
        return getTransaction();
2327
 
2328
      }
2329
      throw new IllegalStateException();
2330
    }
2331
 
2332
    public Object getFieldValue(int fieldId) {
2333
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2334
    }
2335
 
2336
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2337
    public boolean isSet(_Fields field) {
2338
      switch (field) {
2339
      case TRANSACTION:
2340
        return isSetTransaction();
2341
      }
2342
      throw new IllegalStateException();
2343
    }
2344
 
2345
    public boolean isSet(int fieldID) {
2346
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2347
    }
2348
 
2349
    @Override
2350
    public boolean equals(Object that) {
2351
      if (that == null)
2352
        return false;
2353
      if (that instanceof createTransaction_args)
2354
        return this.equals((createTransaction_args)that);
2355
      return false;
2356
    }
2357
 
2358
    public boolean equals(createTransaction_args that) {
2359
      if (that == null)
2360
        return false;
2361
 
2362
      boolean this_present_transaction = true && this.isSetTransaction();
2363
      boolean that_present_transaction = true && that.isSetTransaction();
2364
      if (this_present_transaction || that_present_transaction) {
2365
        if (!(this_present_transaction && that_present_transaction))
2366
          return false;
2367
        if (!this.transaction.equals(that.transaction))
2368
          return false;
2369
      }
2370
 
2371
      return true;
2372
    }
2373
 
2374
    @Override
2375
    public int hashCode() {
2376
      return 0;
2377
    }
2378
 
684 chandransh 2379
    public int compareTo(createTransaction_args other) {
2380
      if (!getClass().equals(other.getClass())) {
2381
        return getClass().getName().compareTo(other.getClass().getName());
2382
      }
2383
 
2384
      int lastComparison = 0;
2385
      createTransaction_args typedOther = (createTransaction_args)other;
2386
 
2387
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2388
      if (lastComparison != 0) {
2389
        return lastComparison;
2390
      }
2391
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2392
      if (lastComparison != 0) {
2393
        return lastComparison;
2394
      }
2395
      return 0;
2396
    }
2397
 
68 ashish 2398
    public void read(TProtocol iprot) throws TException {
2399
      TField field;
2400
      iprot.readStructBegin();
2401
      while (true)
2402
      {
2403
        field = iprot.readFieldBegin();
2404
        if (field.type == TType.STOP) { 
2405
          break;
2406
        }
2407
        _Fields fieldId = _Fields.findByThriftId(field.id);
2408
        if (fieldId == null) {
2409
          TProtocolUtil.skip(iprot, field.type);
2410
        } else {
2411
          switch (fieldId) {
2412
            case TRANSACTION:
2413
              if (field.type == TType.STRUCT) {
2414
                this.transaction = new Transaction();
2415
                this.transaction.read(iprot);
2416
              } else { 
2417
                TProtocolUtil.skip(iprot, field.type);
2418
              }
2419
              break;
2420
          }
2421
          iprot.readFieldEnd();
2422
        }
2423
      }
2424
      iprot.readStructEnd();
2425
      validate();
2426
    }
2427
 
2428
    public void write(TProtocol oprot) throws TException {
2429
      validate();
2430
 
2431
      oprot.writeStructBegin(STRUCT_DESC);
2432
      if (this.transaction != null) {
2433
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2434
        this.transaction.write(oprot);
2435
        oprot.writeFieldEnd();
2436
      }
2437
      oprot.writeFieldStop();
2438
      oprot.writeStructEnd();
2439
    }
2440
 
2441
    @Override
2442
    public String toString() {
2443
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2444
      boolean first = true;
2445
 
2446
      sb.append("transaction:");
2447
      if (this.transaction == null) {
2448
        sb.append("null");
2449
      } else {
2450
        sb.append(this.transaction);
2451
      }
2452
      first = false;
2453
      sb.append(")");
2454
      return sb.toString();
2455
    }
2456
 
2457
    public void validate() throws TException {
2458
      // check for required fields
2459
    }
2460
 
2461
  }
2462
 
2463
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2464
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2465
 
132 ashish 2466
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2467
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2468
 
132 ashish 2469
    private long success;
68 ashish 2470
    private TransactionServiceException ex;
2471
 
2472
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2473
    public enum _Fields implements TFieldIdEnum {
132 ashish 2474
      SUCCESS((short)0, "success"),
68 ashish 2475
      EX((short)1, "ex");
2476
 
2477
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2478
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2479
 
2480
      static {
2481
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2482
          byId.put((int)field._thriftId, field);
2483
          byName.put(field.getFieldName(), field);
2484
        }
2485
      }
2486
 
2487
      /**
2488
       * Find the _Fields constant that matches fieldId, or null if its not found.
2489
       */
2490
      public static _Fields findByThriftId(int fieldId) {
2491
        return byId.get(fieldId);
2492
      }
2493
 
2494
      /**
2495
       * Find the _Fields constant that matches fieldId, throwing an exception
2496
       * if it is not found.
2497
       */
2498
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2499
        _Fields fields = findByThriftId(fieldId);
2500
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2501
        return fields;
2502
      }
2503
 
2504
      /**
2505
       * Find the _Fields constant that matches name, or null if its not found.
2506
       */
2507
      public static _Fields findByName(String name) {
2508
        return byName.get(name);
2509
      }
2510
 
2511
      private final short _thriftId;
2512
      private final String _fieldName;
2513
 
2514
      _Fields(short thriftId, String fieldName) {
2515
        _thriftId = thriftId;
2516
        _fieldName = fieldName;
2517
      }
2518
 
2519
      public short getThriftFieldId() {
2520
        return _thriftId;
2521
      }
2522
 
2523
      public String getFieldName() {
2524
        return _fieldName;
2525
      }
2526
    }
2527
 
2528
    // isset id assignments
132 ashish 2529
    private static final int __SUCCESS_ISSET_ID = 0;
2530
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2531
 
2532
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2533
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2534
          new FieldValueMetaData(TType.I64)));
68 ashish 2535
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2536
          new FieldValueMetaData(TType.STRUCT)));
2537
    }});
2538
 
2539
    static {
2540
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2541
    }
2542
 
2543
    public createTransaction_result() {
2544
    }
2545
 
2546
    public createTransaction_result(
132 ashish 2547
      long success,
68 ashish 2548
      TransactionServiceException ex)
2549
    {
2550
      this();
132 ashish 2551
      this.success = success;
2552
      setSuccessIsSet(true);
68 ashish 2553
      this.ex = ex;
2554
    }
2555
 
2556
    /**
2557
     * Performs a deep copy on <i>other</i>.
2558
     */
2559
    public createTransaction_result(createTransaction_result other) {
132 ashish 2560
      __isset_bit_vector.clear();
2561
      __isset_bit_vector.or(other.__isset_bit_vector);
2562
      this.success = other.success;
68 ashish 2563
      if (other.isSetEx()) {
2564
        this.ex = new TransactionServiceException(other.ex);
2565
      }
2566
    }
2567
 
2568
    public createTransaction_result deepCopy() {
2569
      return new createTransaction_result(this);
2570
    }
2571
 
2572
    @Deprecated
2573
    public createTransaction_result clone() {
2574
      return new createTransaction_result(this);
2575
    }
2576
 
132 ashish 2577
    public long getSuccess() {
2578
      return this.success;
2579
    }
2580
 
2581
    public createTransaction_result setSuccess(long success) {
2582
      this.success = success;
2583
      setSuccessIsSet(true);
2584
      return this;
2585
    }
2586
 
2587
    public void unsetSuccess() {
2588
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2589
    }
2590
 
2591
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2592
    public boolean isSetSuccess() {
2593
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2594
    }
2595
 
2596
    public void setSuccessIsSet(boolean value) {
2597
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2598
    }
2599
 
68 ashish 2600
    public TransactionServiceException getEx() {
2601
      return this.ex;
2602
    }
2603
 
2604
    public createTransaction_result setEx(TransactionServiceException ex) {
2605
      this.ex = ex;
2606
      return this;
2607
    }
2608
 
2609
    public void unsetEx() {
2610
      this.ex = null;
2611
    }
2612
 
2613
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2614
    public boolean isSetEx() {
2615
      return this.ex != null;
2616
    }
2617
 
2618
    public void setExIsSet(boolean value) {
2619
      if (!value) {
2620
        this.ex = null;
2621
      }
2622
    }
2623
 
2624
    public void setFieldValue(_Fields field, Object value) {
2625
      switch (field) {
132 ashish 2626
      case SUCCESS:
2627
        if (value == null) {
2628
          unsetSuccess();
2629
        } else {
2630
          setSuccess((Long)value);
2631
        }
2632
        break;
2633
 
68 ashish 2634
      case EX:
2635
        if (value == null) {
2636
          unsetEx();
2637
        } else {
2638
          setEx((TransactionServiceException)value);
2639
        }
2640
        break;
2641
 
2642
      }
2643
    }
2644
 
2645
    public void setFieldValue(int fieldID, Object value) {
2646
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2647
    }
2648
 
2649
    public Object getFieldValue(_Fields field) {
2650
      switch (field) {
132 ashish 2651
      case SUCCESS:
2652
        return new Long(getSuccess());
2653
 
68 ashish 2654
      case EX:
2655
        return getEx();
2656
 
2657
      }
2658
      throw new IllegalStateException();
2659
    }
2660
 
2661
    public Object getFieldValue(int fieldId) {
2662
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2663
    }
2664
 
2665
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2666
    public boolean isSet(_Fields field) {
2667
      switch (field) {
132 ashish 2668
      case SUCCESS:
2669
        return isSetSuccess();
68 ashish 2670
      case EX:
2671
        return isSetEx();
2672
      }
2673
      throw new IllegalStateException();
2674
    }
2675
 
2676
    public boolean isSet(int fieldID) {
2677
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2678
    }
2679
 
2680
    @Override
2681
    public boolean equals(Object that) {
2682
      if (that == null)
2683
        return false;
2684
      if (that instanceof createTransaction_result)
2685
        return this.equals((createTransaction_result)that);
2686
      return false;
2687
    }
2688
 
2689
    public boolean equals(createTransaction_result that) {
2690
      if (that == null)
2691
        return false;
2692
 
132 ashish 2693
      boolean this_present_success = true;
2694
      boolean that_present_success = true;
2695
      if (this_present_success || that_present_success) {
2696
        if (!(this_present_success && that_present_success))
2697
          return false;
2698
        if (this.success != that.success)
2699
          return false;
2700
      }
2701
 
68 ashish 2702
      boolean this_present_ex = true && this.isSetEx();
2703
      boolean that_present_ex = true && that.isSetEx();
2704
      if (this_present_ex || that_present_ex) {
2705
        if (!(this_present_ex && that_present_ex))
2706
          return false;
2707
        if (!this.ex.equals(that.ex))
2708
          return false;
2709
      }
2710
 
2711
      return true;
2712
    }
2713
 
2714
    @Override
2715
    public int hashCode() {
2716
      return 0;
2717
    }
2718
 
2719
    public int compareTo(createTransaction_result other) {
2720
      if (!getClass().equals(other.getClass())) {
2721
        return getClass().getName().compareTo(other.getClass().getName());
2722
      }
2723
 
2724
      int lastComparison = 0;
2725
      createTransaction_result typedOther = (createTransaction_result)other;
2726
 
132 ashish 2727
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2728
      if (lastComparison != 0) {
2729
        return lastComparison;
2730
      }
2731
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2732
      if (lastComparison != 0) {
2733
        return lastComparison;
2734
      }
68 ashish 2735
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2736
      if (lastComparison != 0) {
2737
        return lastComparison;
2738
      }
2739
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2740
      if (lastComparison != 0) {
2741
        return lastComparison;
2742
      }
2743
      return 0;
2744
    }
2745
 
2746
    public void read(TProtocol iprot) throws TException {
2747
      TField field;
2748
      iprot.readStructBegin();
2749
      while (true)
2750
      {
2751
        field = iprot.readFieldBegin();
2752
        if (field.type == TType.STOP) { 
2753
          break;
2754
        }
2755
        _Fields fieldId = _Fields.findByThriftId(field.id);
2756
        if (fieldId == null) {
2757
          TProtocolUtil.skip(iprot, field.type);
2758
        } else {
2759
          switch (fieldId) {
132 ashish 2760
            case SUCCESS:
2761
              if (field.type == TType.I64) {
2762
                this.success = iprot.readI64();
2763
                setSuccessIsSet(true);
2764
              } else { 
2765
                TProtocolUtil.skip(iprot, field.type);
2766
              }
2767
              break;
68 ashish 2768
            case EX:
2769
              if (field.type == TType.STRUCT) {
2770
                this.ex = new TransactionServiceException();
2771
                this.ex.read(iprot);
2772
              } else { 
2773
                TProtocolUtil.skip(iprot, field.type);
2774
              }
2775
              break;
2776
          }
2777
          iprot.readFieldEnd();
2778
        }
2779
      }
2780
      iprot.readStructEnd();
2781
      validate();
2782
    }
2783
 
2784
    public void write(TProtocol oprot) throws TException {
2785
      oprot.writeStructBegin(STRUCT_DESC);
2786
 
132 ashish 2787
      if (this.isSetSuccess()) {
2788
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2789
        oprot.writeI64(this.success);
2790
        oprot.writeFieldEnd();
2791
      } else if (this.isSetEx()) {
68 ashish 2792
        oprot.writeFieldBegin(EX_FIELD_DESC);
2793
        this.ex.write(oprot);
2794
        oprot.writeFieldEnd();
2795
      }
2796
      oprot.writeFieldStop();
2797
      oprot.writeStructEnd();
2798
    }
2799
 
2800
    @Override
2801
    public String toString() {
2802
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2803
      boolean first = true;
2804
 
132 ashish 2805
      sb.append("success:");
2806
      sb.append(this.success);
2807
      first = false;
2808
      if (!first) sb.append(", ");
68 ashish 2809
      sb.append("ex:");
2810
      if (this.ex == null) {
2811
        sb.append("null");
2812
      } else {
2813
        sb.append(this.ex);
2814
      }
2815
      first = false;
2816
      sb.append(")");
2817
      return sb.toString();
2818
    }
2819
 
2820
    public void validate() throws TException {
2821
      // check for required fields
2822
    }
2823
 
2824
  }
2825
 
2826
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2827
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2828
 
2829
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2830
 
2831
    private long id;
2832
 
2833
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2834
    public enum _Fields implements TFieldIdEnum {
2835
      ID((short)1, "id");
2836
 
2837
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2838
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2839
 
2840
      static {
2841
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2842
          byId.put((int)field._thriftId, field);
2843
          byName.put(field.getFieldName(), field);
2844
        }
2845
      }
2846
 
2847
      /**
2848
       * Find the _Fields constant that matches fieldId, or null if its not found.
2849
       */
2850
      public static _Fields findByThriftId(int fieldId) {
2851
        return byId.get(fieldId);
2852
      }
2853
 
2854
      /**
2855
       * Find the _Fields constant that matches fieldId, throwing an exception
2856
       * if it is not found.
2857
       */
2858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2859
        _Fields fields = findByThriftId(fieldId);
2860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2861
        return fields;
2862
      }
2863
 
2864
      /**
2865
       * Find the _Fields constant that matches name, or null if its not found.
2866
       */
2867
      public static _Fields findByName(String name) {
2868
        return byName.get(name);
2869
      }
2870
 
2871
      private final short _thriftId;
2872
      private final String _fieldName;
2873
 
2874
      _Fields(short thriftId, String fieldName) {
2875
        _thriftId = thriftId;
2876
        _fieldName = fieldName;
2877
      }
2878
 
2879
      public short getThriftFieldId() {
2880
        return _thriftId;
2881
      }
2882
 
2883
      public String getFieldName() {
2884
        return _fieldName;
2885
      }
2886
    }
2887
 
2888
    // isset id assignments
2889
    private static final int __ID_ISSET_ID = 0;
2890
    private BitSet __isset_bit_vector = new BitSet(1);
2891
 
2892
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2893
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2894
          new FieldValueMetaData(TType.I64)));
2895
    }});
2896
 
2897
    static {
2898
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2899
    }
2900
 
2901
    public getTransaction_args() {
2902
    }
2903
 
2904
    public getTransaction_args(
2905
      long id)
2906
    {
2907
      this();
2908
      this.id = id;
2909
      setIdIsSet(true);
2910
    }
2911
 
2912
    /**
2913
     * Performs a deep copy on <i>other</i>.
2914
     */
2915
    public getTransaction_args(getTransaction_args other) {
2916
      __isset_bit_vector.clear();
2917
      __isset_bit_vector.or(other.__isset_bit_vector);
2918
      this.id = other.id;
2919
    }
2920
 
2921
    public getTransaction_args deepCopy() {
2922
      return new getTransaction_args(this);
2923
    }
2924
 
2925
    @Deprecated
2926
    public getTransaction_args clone() {
2927
      return new getTransaction_args(this);
2928
    }
2929
 
2930
    public long getId() {
2931
      return this.id;
2932
    }
2933
 
2934
    public getTransaction_args setId(long id) {
2935
      this.id = id;
2936
      setIdIsSet(true);
2937
      return this;
2938
    }
2939
 
2940
    public void unsetId() {
2941
      __isset_bit_vector.clear(__ID_ISSET_ID);
2942
    }
2943
 
2944
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2945
    public boolean isSetId() {
2946
      return __isset_bit_vector.get(__ID_ISSET_ID);
2947
    }
2948
 
2949
    public void setIdIsSet(boolean value) {
2950
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2951
    }
2952
 
2953
    public void setFieldValue(_Fields field, Object value) {
2954
      switch (field) {
2955
      case ID:
2956
        if (value == null) {
2957
          unsetId();
2958
        } else {
2959
          setId((Long)value);
2960
        }
2961
        break;
2962
 
2963
      }
2964
    }
2965
 
2966
    public void setFieldValue(int fieldID, Object value) {
2967
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2968
    }
2969
 
2970
    public Object getFieldValue(_Fields field) {
2971
      switch (field) {
2972
      case ID:
2973
        return new Long(getId());
2974
 
2975
      }
2976
      throw new IllegalStateException();
2977
    }
2978
 
2979
    public Object getFieldValue(int fieldId) {
2980
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2981
    }
2982
 
2983
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2984
    public boolean isSet(_Fields field) {
2985
      switch (field) {
2986
      case ID:
2987
        return isSetId();
2988
      }
2989
      throw new IllegalStateException();
2990
    }
2991
 
2992
    public boolean isSet(int fieldID) {
2993
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2994
    }
2995
 
2996
    @Override
2997
    public boolean equals(Object that) {
2998
      if (that == null)
2999
        return false;
3000
      if (that instanceof getTransaction_args)
3001
        return this.equals((getTransaction_args)that);
3002
      return false;
3003
    }
3004
 
3005
    public boolean equals(getTransaction_args that) {
3006
      if (that == null)
3007
        return false;
3008
 
3009
      boolean this_present_id = true;
3010
      boolean that_present_id = true;
3011
      if (this_present_id || that_present_id) {
3012
        if (!(this_present_id && that_present_id))
3013
          return false;
3014
        if (this.id != that.id)
3015
          return false;
3016
      }
3017
 
3018
      return true;
3019
    }
3020
 
3021
    @Override
3022
    public int hashCode() {
3023
      return 0;
3024
    }
3025
 
3026
    public int compareTo(getTransaction_args other) {
3027
      if (!getClass().equals(other.getClass())) {
3028
        return getClass().getName().compareTo(other.getClass().getName());
3029
      }
3030
 
3031
      int lastComparison = 0;
3032
      getTransaction_args typedOther = (getTransaction_args)other;
3033
 
3034
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3035
      if (lastComparison != 0) {
3036
        return lastComparison;
3037
      }
3038
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3039
      if (lastComparison != 0) {
3040
        return lastComparison;
3041
      }
3042
      return 0;
3043
    }
3044
 
3045
    public void read(TProtocol iprot) throws TException {
3046
      TField field;
3047
      iprot.readStructBegin();
3048
      while (true)
3049
      {
3050
        field = iprot.readFieldBegin();
3051
        if (field.type == TType.STOP) { 
3052
          break;
3053
        }
3054
        _Fields fieldId = _Fields.findByThriftId(field.id);
3055
        if (fieldId == null) {
3056
          TProtocolUtil.skip(iprot, field.type);
3057
        } else {
3058
          switch (fieldId) {
3059
            case ID:
3060
              if (field.type == TType.I64) {
3061
                this.id = iprot.readI64();
3062
                setIdIsSet(true);
3063
              } else { 
3064
                TProtocolUtil.skip(iprot, field.type);
3065
              }
3066
              break;
3067
          }
3068
          iprot.readFieldEnd();
3069
        }
3070
      }
3071
      iprot.readStructEnd();
3072
      validate();
3073
    }
3074
 
3075
    public void write(TProtocol oprot) throws TException {
3076
      validate();
3077
 
3078
      oprot.writeStructBegin(STRUCT_DESC);
3079
      oprot.writeFieldBegin(ID_FIELD_DESC);
3080
      oprot.writeI64(this.id);
3081
      oprot.writeFieldEnd();
3082
      oprot.writeFieldStop();
3083
      oprot.writeStructEnd();
3084
    }
3085
 
3086
    @Override
3087
    public String toString() {
3088
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3089
      boolean first = true;
3090
 
3091
      sb.append("id:");
3092
      sb.append(this.id);
3093
      first = false;
3094
      sb.append(")");
3095
      return sb.toString();
3096
    }
3097
 
3098
    public void validate() throws TException {
3099
      // check for required fields
3100
    }
3101
 
3102
  }
3103
 
684 chandransh 3104
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3105
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3106
 
3107
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3108
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3109
 
3110
    private Transaction success;
3111
    private TransactionServiceException ex;
3112
 
3113
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3114
    public enum _Fields implements TFieldIdEnum {
3115
      SUCCESS((short)0, "success"),
3116
      EX((short)1, "ex");
3117
 
3118
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3119
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3120
 
3121
      static {
3122
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3123
          byId.put((int)field._thriftId, field);
3124
          byName.put(field.getFieldName(), field);
3125
        }
3126
      }
3127
 
3128
      /**
3129
       * Find the _Fields constant that matches fieldId, or null if its not found.
3130
       */
3131
      public static _Fields findByThriftId(int fieldId) {
3132
        return byId.get(fieldId);
3133
      }
3134
 
3135
      /**
3136
       * Find the _Fields constant that matches fieldId, throwing an exception
3137
       * if it is not found.
3138
       */
3139
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3140
        _Fields fields = findByThriftId(fieldId);
3141
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3142
        return fields;
3143
      }
3144
 
3145
      /**
3146
       * Find the _Fields constant that matches name, or null if its not found.
3147
       */
3148
      public static _Fields findByName(String name) {
3149
        return byName.get(name);
3150
      }
3151
 
3152
      private final short _thriftId;
3153
      private final String _fieldName;
3154
 
3155
      _Fields(short thriftId, String fieldName) {
3156
        _thriftId = thriftId;
3157
        _fieldName = fieldName;
3158
      }
3159
 
3160
      public short getThriftFieldId() {
3161
        return _thriftId;
3162
      }
3163
 
3164
      public String getFieldName() {
3165
        return _fieldName;
3166
      }
3167
    }
3168
 
3169
    // isset id assignments
3170
 
3171
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3172
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3173
          new StructMetaData(TType.STRUCT, Transaction.class)));
3174
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3175
          new FieldValueMetaData(TType.STRUCT)));
3176
    }});
3177
 
3178
    static {
3179
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3180
    }
3181
 
3182
    public getTransaction_result() {
3183
    }
3184
 
3185
    public getTransaction_result(
3186
      Transaction success,
3187
      TransactionServiceException ex)
3188
    {
3189
      this();
3190
      this.success = success;
3191
      this.ex = ex;
3192
    }
3193
 
3194
    /**
3195
     * Performs a deep copy on <i>other</i>.
3196
     */
3197
    public getTransaction_result(getTransaction_result other) {
3198
      if (other.isSetSuccess()) {
3199
        this.success = new Transaction(other.success);
3200
      }
3201
      if (other.isSetEx()) {
3202
        this.ex = new TransactionServiceException(other.ex);
3203
      }
3204
    }
3205
 
3206
    public getTransaction_result deepCopy() {
3207
      return new getTransaction_result(this);
3208
    }
3209
 
3210
    @Deprecated
3211
    public getTransaction_result clone() {
3212
      return new getTransaction_result(this);
3213
    }
3214
 
3215
    public Transaction getSuccess() {
3216
      return this.success;
3217
    }
3218
 
3219
    public getTransaction_result setSuccess(Transaction success) {
3220
      this.success = success;
3221
      return this;
3222
    }
3223
 
3224
    public void unsetSuccess() {
3225
      this.success = null;
3226
    }
3227
 
3228
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3229
    public boolean isSetSuccess() {
3230
      return this.success != null;
3231
    }
3232
 
3233
    public void setSuccessIsSet(boolean value) {
3234
      if (!value) {
3235
        this.success = null;
3236
      }
3237
    }
3238
 
3239
    public TransactionServiceException getEx() {
3240
      return this.ex;
3241
    }
3242
 
3243
    public getTransaction_result setEx(TransactionServiceException ex) {
3244
      this.ex = ex;
3245
      return this;
3246
    }
3247
 
3248
    public void unsetEx() {
3249
      this.ex = null;
3250
    }
3251
 
3252
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3253
    public boolean isSetEx() {
3254
      return this.ex != null;
3255
    }
3256
 
3257
    public void setExIsSet(boolean value) {
3258
      if (!value) {
3259
        this.ex = null;
3260
      }
3261
    }
3262
 
3263
    public void setFieldValue(_Fields field, Object value) {
3264
      switch (field) {
3265
      case SUCCESS:
3266
        if (value == null) {
3267
          unsetSuccess();
3268
        } else {
3269
          setSuccess((Transaction)value);
3270
        }
3271
        break;
3272
 
3273
      case EX:
3274
        if (value == null) {
3275
          unsetEx();
3276
        } else {
3277
          setEx((TransactionServiceException)value);
3278
        }
3279
        break;
3280
 
3281
      }
3282
    }
3283
 
3284
    public void setFieldValue(int fieldID, Object value) {
3285
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3286
    }
3287
 
3288
    public Object getFieldValue(_Fields field) {
3289
      switch (field) {
3290
      case SUCCESS:
3291
        return getSuccess();
3292
 
3293
      case EX:
3294
        return getEx();
3295
 
3296
      }
3297
      throw new IllegalStateException();
3298
    }
3299
 
3300
    public Object getFieldValue(int fieldId) {
3301
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3302
    }
3303
 
3304
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3305
    public boolean isSet(_Fields field) {
3306
      switch (field) {
3307
      case SUCCESS:
3308
        return isSetSuccess();
3309
      case EX:
3310
        return isSetEx();
3311
      }
3312
      throw new IllegalStateException();
3313
    }
3314
 
3315
    public boolean isSet(int fieldID) {
3316
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3317
    }
3318
 
3319
    @Override
3320
    public boolean equals(Object that) {
3321
      if (that == null)
3322
        return false;
3323
      if (that instanceof getTransaction_result)
3324
        return this.equals((getTransaction_result)that);
3325
      return false;
3326
    }
3327
 
3328
    public boolean equals(getTransaction_result that) {
3329
      if (that == null)
3330
        return false;
3331
 
3332
      boolean this_present_success = true && this.isSetSuccess();
3333
      boolean that_present_success = true && that.isSetSuccess();
3334
      if (this_present_success || that_present_success) {
3335
        if (!(this_present_success && that_present_success))
3336
          return false;
3337
        if (!this.success.equals(that.success))
3338
          return false;
3339
      }
3340
 
3341
      boolean this_present_ex = true && this.isSetEx();
3342
      boolean that_present_ex = true && that.isSetEx();
3343
      if (this_present_ex || that_present_ex) {
3344
        if (!(this_present_ex && that_present_ex))
3345
          return false;
3346
        if (!this.ex.equals(that.ex))
3347
          return false;
3348
      }
3349
 
3350
      return true;
3351
    }
3352
 
3353
    @Override
3354
    public int hashCode() {
3355
      return 0;
3356
    }
3357
 
684 chandransh 3358
    public int compareTo(getTransaction_result other) {
3359
      if (!getClass().equals(other.getClass())) {
3360
        return getClass().getName().compareTo(other.getClass().getName());
3361
      }
3362
 
3363
      int lastComparison = 0;
3364
      getTransaction_result typedOther = (getTransaction_result)other;
3365
 
3366
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3367
      if (lastComparison != 0) {
3368
        return lastComparison;
3369
      }
3370
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3371
      if (lastComparison != 0) {
3372
        return lastComparison;
3373
      }
3374
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3375
      if (lastComparison != 0) {
3376
        return lastComparison;
3377
      }
3378
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3379
      if (lastComparison != 0) {
3380
        return lastComparison;
3381
      }
3382
      return 0;
3383
    }
3384
 
68 ashish 3385
    public void read(TProtocol iprot) throws TException {
3386
      TField field;
3387
      iprot.readStructBegin();
3388
      while (true)
3389
      {
3390
        field = iprot.readFieldBegin();
3391
        if (field.type == TType.STOP) { 
3392
          break;
3393
        }
3394
        _Fields fieldId = _Fields.findByThriftId(field.id);
3395
        if (fieldId == null) {
3396
          TProtocolUtil.skip(iprot, field.type);
3397
        } else {
3398
          switch (fieldId) {
3399
            case SUCCESS:
3400
              if (field.type == TType.STRUCT) {
3401
                this.success = new Transaction();
3402
                this.success.read(iprot);
3403
              } else { 
3404
                TProtocolUtil.skip(iprot, field.type);
3405
              }
3406
              break;
3407
            case EX:
3408
              if (field.type == TType.STRUCT) {
3409
                this.ex = new TransactionServiceException();
3410
                this.ex.read(iprot);
3411
              } else { 
3412
                TProtocolUtil.skip(iprot, field.type);
3413
              }
3414
              break;
3415
          }
3416
          iprot.readFieldEnd();
3417
        }
3418
      }
3419
      iprot.readStructEnd();
3420
      validate();
3421
    }
3422
 
3423
    public void write(TProtocol oprot) throws TException {
3424
      oprot.writeStructBegin(STRUCT_DESC);
3425
 
3426
      if (this.isSetSuccess()) {
3427
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3428
        this.success.write(oprot);
3429
        oprot.writeFieldEnd();
3430
      } else if (this.isSetEx()) {
3431
        oprot.writeFieldBegin(EX_FIELD_DESC);
3432
        this.ex.write(oprot);
3433
        oprot.writeFieldEnd();
3434
      }
3435
      oprot.writeFieldStop();
3436
      oprot.writeStructEnd();
3437
    }
3438
 
3439
    @Override
3440
    public String toString() {
3441
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3442
      boolean first = true;
3443
 
3444
      sb.append("success:");
3445
      if (this.success == null) {
3446
        sb.append("null");
3447
      } else {
3448
        sb.append(this.success);
3449
      }
3450
      first = false;
3451
      if (!first) sb.append(", ");
3452
      sb.append("ex:");
3453
      if (this.ex == null) {
3454
        sb.append("null");
3455
      } else {
3456
        sb.append(this.ex);
3457
      }
3458
      first = false;
3459
      sb.append(")");
3460
      return sb.toString();
3461
    }
3462
 
3463
    public void validate() throws TException {
3464
      // check for required fields
3465
    }
3466
 
3467
  }
3468
 
3469
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3470
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3471
 
3472
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3473
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3474
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3475
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3476
 
3477
    private long customerId;
132 ashish 3478
    private long from_date;
3479
    private long to_date;
68 ashish 3480
    private TransactionStatus status;
3481
 
3482
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3483
    public enum _Fields implements TFieldIdEnum {
3484
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3485
      FROM_DATE((short)2, "from_date"),
3486
      TO_DATE((short)3, "to_date"),
68 ashish 3487
      /**
3488
       * 
3489
       * @see TransactionStatus
3490
       */
3491
      STATUS((short)4, "status");
3492
 
3493
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3494
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3495
 
3496
      static {
3497
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3498
          byId.put((int)field._thriftId, field);
3499
          byName.put(field.getFieldName(), field);
3500
        }
3501
      }
3502
 
3503
      /**
3504
       * Find the _Fields constant that matches fieldId, or null if its not found.
3505
       */
3506
      public static _Fields findByThriftId(int fieldId) {
3507
        return byId.get(fieldId);
3508
      }
3509
 
3510
      /**
3511
       * Find the _Fields constant that matches fieldId, throwing an exception
3512
       * if it is not found.
3513
       */
3514
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3515
        _Fields fields = findByThriftId(fieldId);
3516
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3517
        return fields;
3518
      }
3519
 
3520
      /**
3521
       * Find the _Fields constant that matches name, or null if its not found.
3522
       */
3523
      public static _Fields findByName(String name) {
3524
        return byName.get(name);
3525
      }
3526
 
3527
      private final short _thriftId;
3528
      private final String _fieldName;
3529
 
3530
      _Fields(short thriftId, String fieldName) {
3531
        _thriftId = thriftId;
3532
        _fieldName = fieldName;
3533
      }
3534
 
3535
      public short getThriftFieldId() {
3536
        return _thriftId;
3537
      }
3538
 
3539
      public String getFieldName() {
3540
        return _fieldName;
3541
      }
3542
    }
3543
 
3544
    // isset id assignments
3545
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3546
    private static final int __FROM_DATE_ISSET_ID = 1;
3547
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3548
    private BitSet __isset_bit_vector = new BitSet(3);
3549
 
3550
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3551
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3552
          new FieldValueMetaData(TType.I64)));
132 ashish 3553
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3554
          new FieldValueMetaData(TType.I64)));
132 ashish 3555
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3556
          new FieldValueMetaData(TType.I64)));
3557
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3558
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3559
    }});
3560
 
3561
    static {
3562
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3563
    }
3564
 
3565
    public getTransactionsForCustomer_args() {
3566
    }
3567
 
3568
    public getTransactionsForCustomer_args(
3569
      long customerId,
132 ashish 3570
      long from_date,
3571
      long to_date,
68 ashish 3572
      TransactionStatus status)
3573
    {
3574
      this();
3575
      this.customerId = customerId;
3576
      setCustomerIdIsSet(true);
132 ashish 3577
      this.from_date = from_date;
3578
      setFrom_dateIsSet(true);
3579
      this.to_date = to_date;
3580
      setTo_dateIsSet(true);
68 ashish 3581
      this.status = status;
3582
    }
3583
 
3584
    /**
3585
     * Performs a deep copy on <i>other</i>.
3586
     */
3587
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3588
      __isset_bit_vector.clear();
3589
      __isset_bit_vector.or(other.__isset_bit_vector);
3590
      this.customerId = other.customerId;
132 ashish 3591
      this.from_date = other.from_date;
3592
      this.to_date = other.to_date;
68 ashish 3593
      if (other.isSetStatus()) {
3594
        this.status = other.status;
3595
      }
3596
    }
3597
 
3598
    public getTransactionsForCustomer_args deepCopy() {
3599
      return new getTransactionsForCustomer_args(this);
3600
    }
3601
 
3602
    @Deprecated
3603
    public getTransactionsForCustomer_args clone() {
3604
      return new getTransactionsForCustomer_args(this);
3605
    }
3606
 
3607
    public long getCustomerId() {
3608
      return this.customerId;
3609
    }
3610
 
3611
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3612
      this.customerId = customerId;
3613
      setCustomerIdIsSet(true);
3614
      return this;
3615
    }
3616
 
3617
    public void unsetCustomerId() {
3618
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3619
    }
3620
 
3621
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3622
    public boolean isSetCustomerId() {
3623
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3624
    }
3625
 
3626
    public void setCustomerIdIsSet(boolean value) {
3627
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3628
    }
3629
 
132 ashish 3630
    public long getFrom_date() {
3631
      return this.from_date;
68 ashish 3632
    }
3633
 
132 ashish 3634
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3635
      this.from_date = from_date;
3636
      setFrom_dateIsSet(true);
68 ashish 3637
      return this;
3638
    }
3639
 
132 ashish 3640
    public void unsetFrom_date() {
3641
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3642
    }
3643
 
132 ashish 3644
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3645
    public boolean isSetFrom_date() {
3646
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3647
    }
3648
 
132 ashish 3649
    public void setFrom_dateIsSet(boolean value) {
3650
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3651
    }
3652
 
132 ashish 3653
    public long getTo_date() {
3654
      return this.to_date;
68 ashish 3655
    }
3656
 
132 ashish 3657
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3658
      this.to_date = to_date;
3659
      setTo_dateIsSet(true);
68 ashish 3660
      return this;
3661
    }
3662
 
132 ashish 3663
    public void unsetTo_date() {
3664
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3665
    }
3666
 
132 ashish 3667
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3668
    public boolean isSetTo_date() {
3669
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3670
    }
3671
 
132 ashish 3672
    public void setTo_dateIsSet(boolean value) {
3673
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3674
    }
3675
 
3676
    /**
3677
     * 
3678
     * @see TransactionStatus
3679
     */
3680
    public TransactionStatus getStatus() {
3681
      return this.status;
3682
    }
3683
 
3684
    /**
3685
     * 
3686
     * @see TransactionStatus
3687
     */
3688
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3689
      this.status = status;
3690
      return this;
3691
    }
3692
 
3693
    public void unsetStatus() {
3694
      this.status = null;
3695
    }
3696
 
3697
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3698
    public boolean isSetStatus() {
3699
      return this.status != null;
3700
    }
3701
 
3702
    public void setStatusIsSet(boolean value) {
3703
      if (!value) {
3704
        this.status = null;
3705
      }
3706
    }
3707
 
3708
    public void setFieldValue(_Fields field, Object value) {
3709
      switch (field) {
3710
      case CUSTOMER_ID:
3711
        if (value == null) {
3712
          unsetCustomerId();
3713
        } else {
3714
          setCustomerId((Long)value);
3715
        }
3716
        break;
3717
 
132 ashish 3718
      case FROM_DATE:
68 ashish 3719
        if (value == null) {
132 ashish 3720
          unsetFrom_date();
68 ashish 3721
        } else {
132 ashish 3722
          setFrom_date((Long)value);
68 ashish 3723
        }
3724
        break;
3725
 
132 ashish 3726
      case TO_DATE:
68 ashish 3727
        if (value == null) {
132 ashish 3728
          unsetTo_date();
68 ashish 3729
        } else {
132 ashish 3730
          setTo_date((Long)value);
68 ashish 3731
        }
3732
        break;
3733
 
3734
      case STATUS:
3735
        if (value == null) {
3736
          unsetStatus();
3737
        } else {
3738
          setStatus((TransactionStatus)value);
3739
        }
3740
        break;
3741
 
3742
      }
3743
    }
3744
 
3745
    public void setFieldValue(int fieldID, Object value) {
3746
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3747
    }
3748
 
3749
    public Object getFieldValue(_Fields field) {
3750
      switch (field) {
3751
      case CUSTOMER_ID:
3752
        return new Long(getCustomerId());
3753
 
132 ashish 3754
      case FROM_DATE:
3755
        return new Long(getFrom_date());
68 ashish 3756
 
132 ashish 3757
      case TO_DATE:
3758
        return new Long(getTo_date());
68 ashish 3759
 
3760
      case STATUS:
3761
        return getStatus();
3762
 
3763
      }
3764
      throw new IllegalStateException();
3765
    }
3766
 
3767
    public Object getFieldValue(int fieldId) {
3768
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3769
    }
3770
 
3771
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3772
    public boolean isSet(_Fields field) {
3773
      switch (field) {
3774
      case CUSTOMER_ID:
3775
        return isSetCustomerId();
132 ashish 3776
      case FROM_DATE:
3777
        return isSetFrom_date();
3778
      case TO_DATE:
3779
        return isSetTo_date();
68 ashish 3780
      case STATUS:
3781
        return isSetStatus();
3782
      }
3783
      throw new IllegalStateException();
3784
    }
3785
 
3786
    public boolean isSet(int fieldID) {
3787
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3788
    }
3789
 
3790
    @Override
3791
    public boolean equals(Object that) {
3792
      if (that == null)
3793
        return false;
3794
      if (that instanceof getTransactionsForCustomer_args)
3795
        return this.equals((getTransactionsForCustomer_args)that);
3796
      return false;
3797
    }
3798
 
3799
    public boolean equals(getTransactionsForCustomer_args that) {
3800
      if (that == null)
3801
        return false;
3802
 
3803
      boolean this_present_customerId = true;
3804
      boolean that_present_customerId = true;
3805
      if (this_present_customerId || that_present_customerId) {
3806
        if (!(this_present_customerId && that_present_customerId))
3807
          return false;
3808
        if (this.customerId != that.customerId)
3809
          return false;
3810
      }
3811
 
132 ashish 3812
      boolean this_present_from_date = true;
3813
      boolean that_present_from_date = true;
3814
      if (this_present_from_date || that_present_from_date) {
3815
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3816
          return false;
132 ashish 3817
        if (this.from_date != that.from_date)
68 ashish 3818
          return false;
3819
      }
3820
 
132 ashish 3821
      boolean this_present_to_date = true;
3822
      boolean that_present_to_date = true;
3823
      if (this_present_to_date || that_present_to_date) {
3824
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3825
          return false;
132 ashish 3826
        if (this.to_date != that.to_date)
68 ashish 3827
          return false;
3828
      }
3829
 
3830
      boolean this_present_status = true && this.isSetStatus();
3831
      boolean that_present_status = true && that.isSetStatus();
3832
      if (this_present_status || that_present_status) {
3833
        if (!(this_present_status && that_present_status))
3834
          return false;
3835
        if (!this.status.equals(that.status))
3836
          return false;
3837
      }
3838
 
3839
      return true;
3840
    }
3841
 
3842
    @Override
3843
    public int hashCode() {
3844
      return 0;
3845
    }
3846
 
3847
    public int compareTo(getTransactionsForCustomer_args other) {
3848
      if (!getClass().equals(other.getClass())) {
3849
        return getClass().getName().compareTo(other.getClass().getName());
3850
      }
3851
 
3852
      int lastComparison = 0;
3853
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
3854
 
3855
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
3856
      if (lastComparison != 0) {
3857
        return lastComparison;
3858
      }
3859
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
3860
      if (lastComparison != 0) {
3861
        return lastComparison;
3862
      }
132 ashish 3863
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3864
      if (lastComparison != 0) {
3865
        return lastComparison;
3866
      }
132 ashish 3867
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3868
      if (lastComparison != 0) {
3869
        return lastComparison;
3870
      }
132 ashish 3871
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3872
      if (lastComparison != 0) {
3873
        return lastComparison;
3874
      }
132 ashish 3875
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3876
      if (lastComparison != 0) {
3877
        return lastComparison;
3878
      }
3879
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3880
      if (lastComparison != 0) {
3881
        return lastComparison;
3882
      }
3883
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3884
      if (lastComparison != 0) {
3885
        return lastComparison;
3886
      }
3887
      return 0;
3888
    }
3889
 
3890
    public void read(TProtocol iprot) throws TException {
3891
      TField field;
3892
      iprot.readStructBegin();
3893
      while (true)
3894
      {
3895
        field = iprot.readFieldBegin();
3896
        if (field.type == TType.STOP) { 
3897
          break;
3898
        }
3899
        _Fields fieldId = _Fields.findByThriftId(field.id);
3900
        if (fieldId == null) {
3901
          TProtocolUtil.skip(iprot, field.type);
3902
        } else {
3903
          switch (fieldId) {
3904
            case CUSTOMER_ID:
3905
              if (field.type == TType.I64) {
3906
                this.customerId = iprot.readI64();
3907
                setCustomerIdIsSet(true);
3908
              } else { 
3909
                TProtocolUtil.skip(iprot, field.type);
3910
              }
3911
              break;
132 ashish 3912
            case FROM_DATE:
68 ashish 3913
              if (field.type == TType.I64) {
132 ashish 3914
                this.from_date = iprot.readI64();
3915
                setFrom_dateIsSet(true);
68 ashish 3916
              } else { 
3917
                TProtocolUtil.skip(iprot, field.type);
3918
              }
3919
              break;
132 ashish 3920
            case TO_DATE:
68 ashish 3921
              if (field.type == TType.I64) {
132 ashish 3922
                this.to_date = iprot.readI64();
3923
                setTo_dateIsSet(true);
68 ashish 3924
              } else { 
3925
                TProtocolUtil.skip(iprot, field.type);
3926
              }
3927
              break;
3928
            case STATUS:
3929
              if (field.type == TType.I32) {
3930
                this.status = TransactionStatus.findByValue(iprot.readI32());
3931
              } else { 
3932
                TProtocolUtil.skip(iprot, field.type);
3933
              }
3934
              break;
3935
          }
3936
          iprot.readFieldEnd();
3937
        }
3938
      }
3939
      iprot.readStructEnd();
3940
      validate();
3941
    }
3942
 
3943
    public void write(TProtocol oprot) throws TException {
3944
      validate();
3945
 
3946
      oprot.writeStructBegin(STRUCT_DESC);
3947
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
3948
      oprot.writeI64(this.customerId);
3949
      oprot.writeFieldEnd();
132 ashish 3950
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
3951
      oprot.writeI64(this.from_date);
68 ashish 3952
      oprot.writeFieldEnd();
132 ashish 3953
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
3954
      oprot.writeI64(this.to_date);
68 ashish 3955
      oprot.writeFieldEnd();
3956
      if (this.status != null) {
3957
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3958
        oprot.writeI32(this.status.getValue());
3959
        oprot.writeFieldEnd();
3960
      }
3961
      oprot.writeFieldStop();
3962
      oprot.writeStructEnd();
3963
    }
3964
 
3965
    @Override
3966
    public String toString() {
3967
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
3968
      boolean first = true;
3969
 
3970
      sb.append("customerId:");
3971
      sb.append(this.customerId);
3972
      first = false;
3973
      if (!first) sb.append(", ");
132 ashish 3974
      sb.append("from_date:");
3975
      sb.append(this.from_date);
68 ashish 3976
      first = false;
3977
      if (!first) sb.append(", ");
132 ashish 3978
      sb.append("to_date:");
3979
      sb.append(this.to_date);
68 ashish 3980
      first = false;
3981
      if (!first) sb.append(", ");
3982
      sb.append("status:");
3983
      if (this.status == null) {
3984
        sb.append("null");
3985
      } else {
3986
        String status_name = status.name();
3987
        if (status_name != null) {
3988
          sb.append(status_name);
3989
          sb.append(" (");
3990
        }
3991
        sb.append(this.status);
3992
        if (status_name != null) {
3993
          sb.append(")");
3994
        }
3995
      }
3996
      first = false;
3997
      sb.append(")");
3998
      return sb.toString();
3999
    }
4000
 
4001
    public void validate() throws TException {
4002
      // check for required fields
4003
    }
4004
 
4005
  }
4006
 
684 chandransh 4007
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4008
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4009
 
4010
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4011
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4012
 
4013
    private List<Transaction> success;
4014
    private TransactionServiceException ex;
4015
 
4016
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4017
    public enum _Fields implements TFieldIdEnum {
4018
      SUCCESS((short)0, "success"),
4019
      EX((short)1, "ex");
4020
 
4021
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4022
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4023
 
4024
      static {
4025
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4026
          byId.put((int)field._thriftId, field);
4027
          byName.put(field.getFieldName(), field);
4028
        }
4029
      }
4030
 
4031
      /**
4032
       * Find the _Fields constant that matches fieldId, or null if its not found.
4033
       */
4034
      public static _Fields findByThriftId(int fieldId) {
4035
        return byId.get(fieldId);
4036
      }
4037
 
4038
      /**
4039
       * Find the _Fields constant that matches fieldId, throwing an exception
4040
       * if it is not found.
4041
       */
4042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4043
        _Fields fields = findByThriftId(fieldId);
4044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4045
        return fields;
4046
      }
4047
 
4048
      /**
4049
       * Find the _Fields constant that matches name, or null if its not found.
4050
       */
4051
      public static _Fields findByName(String name) {
4052
        return byName.get(name);
4053
      }
4054
 
4055
      private final short _thriftId;
4056
      private final String _fieldName;
4057
 
4058
      _Fields(short thriftId, String fieldName) {
4059
        _thriftId = thriftId;
4060
        _fieldName = fieldName;
4061
      }
4062
 
4063
      public short getThriftFieldId() {
4064
        return _thriftId;
4065
      }
4066
 
4067
      public String getFieldName() {
4068
        return _fieldName;
4069
      }
4070
    }
4071
 
4072
    // isset id assignments
4073
 
4074
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4075
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4076
          new ListMetaData(TType.LIST, 
4077
              new StructMetaData(TType.STRUCT, Transaction.class))));
4078
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4079
          new FieldValueMetaData(TType.STRUCT)));
4080
    }});
4081
 
4082
    static {
4083
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4084
    }
4085
 
4086
    public getTransactionsForCustomer_result() {
4087
    }
4088
 
4089
    public getTransactionsForCustomer_result(
4090
      List<Transaction> success,
4091
      TransactionServiceException ex)
4092
    {
4093
      this();
4094
      this.success = success;
4095
      this.ex = ex;
4096
    }
4097
 
4098
    /**
4099
     * Performs a deep copy on <i>other</i>.
4100
     */
4101
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4102
      if (other.isSetSuccess()) {
4103
        List<Transaction> __this__success = new ArrayList<Transaction>();
4104
        for (Transaction other_element : other.success) {
4105
          __this__success.add(new Transaction(other_element));
4106
        }
4107
        this.success = __this__success;
4108
      }
4109
      if (other.isSetEx()) {
4110
        this.ex = new TransactionServiceException(other.ex);
4111
      }
4112
    }
4113
 
4114
    public getTransactionsForCustomer_result deepCopy() {
4115
      return new getTransactionsForCustomer_result(this);
4116
    }
4117
 
4118
    @Deprecated
4119
    public getTransactionsForCustomer_result clone() {
4120
      return new getTransactionsForCustomer_result(this);
4121
    }
4122
 
4123
    public int getSuccessSize() {
4124
      return (this.success == null) ? 0 : this.success.size();
4125
    }
4126
 
4127
    public java.util.Iterator<Transaction> getSuccessIterator() {
4128
      return (this.success == null) ? null : this.success.iterator();
4129
    }
4130
 
4131
    public void addToSuccess(Transaction elem) {
4132
      if (this.success == null) {
4133
        this.success = new ArrayList<Transaction>();
4134
      }
4135
      this.success.add(elem);
4136
    }
4137
 
4138
    public List<Transaction> getSuccess() {
4139
      return this.success;
4140
    }
4141
 
4142
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4143
      this.success = success;
4144
      return this;
4145
    }
4146
 
4147
    public void unsetSuccess() {
4148
      this.success = null;
4149
    }
4150
 
4151
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4152
    public boolean isSetSuccess() {
4153
      return this.success != null;
4154
    }
4155
 
4156
    public void setSuccessIsSet(boolean value) {
4157
      if (!value) {
4158
        this.success = null;
4159
      }
4160
    }
4161
 
4162
    public TransactionServiceException getEx() {
4163
      return this.ex;
4164
    }
4165
 
4166
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4167
      this.ex = ex;
4168
      return this;
4169
    }
4170
 
4171
    public void unsetEx() {
4172
      this.ex = null;
4173
    }
4174
 
4175
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4176
    public boolean isSetEx() {
4177
      return this.ex != null;
4178
    }
4179
 
4180
    public void setExIsSet(boolean value) {
4181
      if (!value) {
4182
        this.ex = null;
4183
      }
4184
    }
4185
 
4186
    public void setFieldValue(_Fields field, Object value) {
4187
      switch (field) {
4188
      case SUCCESS:
4189
        if (value == null) {
4190
          unsetSuccess();
4191
        } else {
4192
          setSuccess((List<Transaction>)value);
4193
        }
4194
        break;
4195
 
4196
      case EX:
4197
        if (value == null) {
4198
          unsetEx();
4199
        } else {
4200
          setEx((TransactionServiceException)value);
4201
        }
4202
        break;
4203
 
4204
      }
4205
    }
4206
 
4207
    public void setFieldValue(int fieldID, Object value) {
4208
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4209
    }
4210
 
4211
    public Object getFieldValue(_Fields field) {
4212
      switch (field) {
4213
      case SUCCESS:
4214
        return getSuccess();
4215
 
4216
      case EX:
4217
        return getEx();
4218
 
4219
      }
4220
      throw new IllegalStateException();
4221
    }
4222
 
4223
    public Object getFieldValue(int fieldId) {
4224
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4225
    }
4226
 
4227
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4228
    public boolean isSet(_Fields field) {
4229
      switch (field) {
4230
      case SUCCESS:
4231
        return isSetSuccess();
4232
      case EX:
4233
        return isSetEx();
4234
      }
4235
      throw new IllegalStateException();
4236
    }
4237
 
4238
    public boolean isSet(int fieldID) {
4239
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4240
    }
4241
 
4242
    @Override
4243
    public boolean equals(Object that) {
4244
      if (that == null)
4245
        return false;
4246
      if (that instanceof getTransactionsForCustomer_result)
4247
        return this.equals((getTransactionsForCustomer_result)that);
4248
      return false;
4249
    }
4250
 
4251
    public boolean equals(getTransactionsForCustomer_result that) {
4252
      if (that == null)
4253
        return false;
4254
 
4255
      boolean this_present_success = true && this.isSetSuccess();
4256
      boolean that_present_success = true && that.isSetSuccess();
4257
      if (this_present_success || that_present_success) {
4258
        if (!(this_present_success && that_present_success))
4259
          return false;
4260
        if (!this.success.equals(that.success))
4261
          return false;
4262
      }
4263
 
4264
      boolean this_present_ex = true && this.isSetEx();
4265
      boolean that_present_ex = true && that.isSetEx();
4266
      if (this_present_ex || that_present_ex) {
4267
        if (!(this_present_ex && that_present_ex))
4268
          return false;
4269
        if (!this.ex.equals(that.ex))
4270
          return false;
4271
      }
4272
 
4273
      return true;
4274
    }
4275
 
4276
    @Override
4277
    public int hashCode() {
4278
      return 0;
4279
    }
4280
 
684 chandransh 4281
    public int compareTo(getTransactionsForCustomer_result other) {
4282
      if (!getClass().equals(other.getClass())) {
4283
        return getClass().getName().compareTo(other.getClass().getName());
4284
      }
4285
 
4286
      int lastComparison = 0;
4287
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4288
 
4289
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4290
      if (lastComparison != 0) {
4291
        return lastComparison;
4292
      }
4293
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4294
      if (lastComparison != 0) {
4295
        return lastComparison;
4296
      }
4297
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4298
      if (lastComparison != 0) {
4299
        return lastComparison;
4300
      }
4301
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4302
      if (lastComparison != 0) {
4303
        return lastComparison;
4304
      }
4305
      return 0;
4306
    }
4307
 
68 ashish 4308
    public void read(TProtocol iprot) throws TException {
4309
      TField field;
4310
      iprot.readStructBegin();
4311
      while (true)
4312
      {
4313
        field = iprot.readFieldBegin();
4314
        if (field.type == TType.STOP) { 
4315
          break;
4316
        }
4317
        _Fields fieldId = _Fields.findByThriftId(field.id);
4318
        if (fieldId == null) {
4319
          TProtocolUtil.skip(iprot, field.type);
4320
        } else {
4321
          switch (fieldId) {
4322
            case SUCCESS:
4323
              if (field.type == TType.LIST) {
4324
                {
684 chandransh 4325
                  TList _list8 = iprot.readListBegin();
4326
                  this.success = new ArrayList<Transaction>(_list8.size);
4327
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4328
                  {
684 chandransh 4329
                    Transaction _elem10;
4330
                    _elem10 = new Transaction();
4331
                    _elem10.read(iprot);
4332
                    this.success.add(_elem10);
68 ashish 4333
                  }
4334
                  iprot.readListEnd();
4335
                }
4336
              } else { 
4337
                TProtocolUtil.skip(iprot, field.type);
4338
              }
4339
              break;
4340
            case EX:
4341
              if (field.type == TType.STRUCT) {
4342
                this.ex = new TransactionServiceException();
4343
                this.ex.read(iprot);
4344
              } else { 
4345
                TProtocolUtil.skip(iprot, field.type);
4346
              }
4347
              break;
4348
          }
4349
          iprot.readFieldEnd();
4350
        }
4351
      }
4352
      iprot.readStructEnd();
4353
      validate();
4354
    }
4355
 
4356
    public void write(TProtocol oprot) throws TException {
4357
      oprot.writeStructBegin(STRUCT_DESC);
4358
 
4359
      if (this.isSetSuccess()) {
4360
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4361
        {
4362
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4363
          for (Transaction _iter11 : this.success)
68 ashish 4364
          {
684 chandransh 4365
            _iter11.write(oprot);
68 ashish 4366
          }
4367
          oprot.writeListEnd();
4368
        }
4369
        oprot.writeFieldEnd();
4370
      } else if (this.isSetEx()) {
4371
        oprot.writeFieldBegin(EX_FIELD_DESC);
4372
        this.ex.write(oprot);
4373
        oprot.writeFieldEnd();
4374
      }
4375
      oprot.writeFieldStop();
4376
      oprot.writeStructEnd();
4377
    }
4378
 
4379
    @Override
4380
    public String toString() {
4381
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4382
      boolean first = true;
4383
 
4384
      sb.append("success:");
4385
      if (this.success == null) {
4386
        sb.append("null");
4387
      } else {
4388
        sb.append(this.success);
4389
      }
4390
      first = false;
4391
      if (!first) sb.append(", ");
4392
      sb.append("ex:");
4393
      if (this.ex == null) {
4394
        sb.append("null");
4395
      } else {
4396
        sb.append(this.ex);
4397
      }
4398
      first = false;
4399
      sb.append(")");
4400
      return sb.toString();
4401
    }
4402
 
4403
    public void validate() throws TException {
4404
      // check for required fields
4405
    }
4406
 
4407
  }
4408
 
132 ashish 4409
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4410
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4411
 
4412
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4413
 
4414
    private long shoppingCartId;
4415
 
4416
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4417
    public enum _Fields implements TFieldIdEnum {
4418
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4419
 
4420
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4421
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4422
 
4423
      static {
4424
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4425
          byId.put((int)field._thriftId, field);
4426
          byName.put(field.getFieldName(), field);
4427
        }
4428
      }
4429
 
4430
      /**
4431
       * Find the _Fields constant that matches fieldId, or null if its not found.
4432
       */
4433
      public static _Fields findByThriftId(int fieldId) {
4434
        return byId.get(fieldId);
4435
      }
4436
 
4437
      /**
4438
       * Find the _Fields constant that matches fieldId, throwing an exception
4439
       * if it is not found.
4440
       */
4441
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4442
        _Fields fields = findByThriftId(fieldId);
4443
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4444
        return fields;
4445
      }
4446
 
4447
      /**
4448
       * Find the _Fields constant that matches name, or null if its not found.
4449
       */
4450
      public static _Fields findByName(String name) {
4451
        return byName.get(name);
4452
      }
4453
 
4454
      private final short _thriftId;
4455
      private final String _fieldName;
4456
 
4457
      _Fields(short thriftId, String fieldName) {
4458
        _thriftId = thriftId;
4459
        _fieldName = fieldName;
4460
      }
4461
 
4462
      public short getThriftFieldId() {
4463
        return _thriftId;
4464
      }
4465
 
4466
      public String getFieldName() {
4467
        return _fieldName;
4468
      }
4469
    }
4470
 
4471
    // isset id assignments
4472
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4473
    private BitSet __isset_bit_vector = new BitSet(1);
4474
 
4475
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4476
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4477
          new FieldValueMetaData(TType.I64)));
4478
    }});
4479
 
4480
    static {
4481
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4482
    }
4483
 
4484
    public getTransactionsForShoppingCartId_args() {
4485
    }
4486
 
4487
    public getTransactionsForShoppingCartId_args(
4488
      long shoppingCartId)
4489
    {
4490
      this();
4491
      this.shoppingCartId = shoppingCartId;
4492
      setShoppingCartIdIsSet(true);
4493
    }
4494
 
4495
    /**
4496
     * Performs a deep copy on <i>other</i>.
4497
     */
4498
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4499
      __isset_bit_vector.clear();
4500
      __isset_bit_vector.or(other.__isset_bit_vector);
4501
      this.shoppingCartId = other.shoppingCartId;
4502
    }
4503
 
4504
    public getTransactionsForShoppingCartId_args deepCopy() {
4505
      return new getTransactionsForShoppingCartId_args(this);
4506
    }
4507
 
4508
    @Deprecated
4509
    public getTransactionsForShoppingCartId_args clone() {
4510
      return new getTransactionsForShoppingCartId_args(this);
4511
    }
4512
 
4513
    public long getShoppingCartId() {
4514
      return this.shoppingCartId;
4515
    }
4516
 
4517
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4518
      this.shoppingCartId = shoppingCartId;
4519
      setShoppingCartIdIsSet(true);
4520
      return this;
4521
    }
4522
 
4523
    public void unsetShoppingCartId() {
4524
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4525
    }
4526
 
4527
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4528
    public boolean isSetShoppingCartId() {
4529
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4530
    }
4531
 
4532
    public void setShoppingCartIdIsSet(boolean value) {
4533
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4534
    }
4535
 
4536
    public void setFieldValue(_Fields field, Object value) {
4537
      switch (field) {
4538
      case SHOPPING_CART_ID:
4539
        if (value == null) {
4540
          unsetShoppingCartId();
4541
        } else {
4542
          setShoppingCartId((Long)value);
4543
        }
4544
        break;
4545
 
4546
      }
4547
    }
4548
 
4549
    public void setFieldValue(int fieldID, Object value) {
4550
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4551
    }
4552
 
4553
    public Object getFieldValue(_Fields field) {
4554
      switch (field) {
4555
      case SHOPPING_CART_ID:
4556
        return new Long(getShoppingCartId());
4557
 
4558
      }
4559
      throw new IllegalStateException();
4560
    }
4561
 
4562
    public Object getFieldValue(int fieldId) {
4563
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4564
    }
4565
 
4566
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4567
    public boolean isSet(_Fields field) {
4568
      switch (field) {
4569
      case SHOPPING_CART_ID:
4570
        return isSetShoppingCartId();
4571
      }
4572
      throw new IllegalStateException();
4573
    }
4574
 
4575
    public boolean isSet(int fieldID) {
4576
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4577
    }
4578
 
4579
    @Override
4580
    public boolean equals(Object that) {
4581
      if (that == null)
4582
        return false;
4583
      if (that instanceof getTransactionsForShoppingCartId_args)
4584
        return this.equals((getTransactionsForShoppingCartId_args)that);
4585
      return false;
4586
    }
4587
 
4588
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4589
      if (that == null)
4590
        return false;
4591
 
4592
      boolean this_present_shoppingCartId = true;
4593
      boolean that_present_shoppingCartId = true;
4594
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4595
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4596
          return false;
4597
        if (this.shoppingCartId != that.shoppingCartId)
4598
          return false;
4599
      }
4600
 
4601
      return true;
4602
    }
4603
 
4604
    @Override
4605
    public int hashCode() {
4606
      return 0;
4607
    }
4608
 
4609
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4610
      if (!getClass().equals(other.getClass())) {
4611
        return getClass().getName().compareTo(other.getClass().getName());
4612
      }
4613
 
4614
      int lastComparison = 0;
4615
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4616
 
4617
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4618
      if (lastComparison != 0) {
4619
        return lastComparison;
4620
      }
4621
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4622
      if (lastComparison != 0) {
4623
        return lastComparison;
4624
      }
4625
      return 0;
4626
    }
4627
 
4628
    public void read(TProtocol iprot) throws TException {
4629
      TField field;
4630
      iprot.readStructBegin();
4631
      while (true)
4632
      {
4633
        field = iprot.readFieldBegin();
4634
        if (field.type == TType.STOP) { 
4635
          break;
4636
        }
4637
        _Fields fieldId = _Fields.findByThriftId(field.id);
4638
        if (fieldId == null) {
4639
          TProtocolUtil.skip(iprot, field.type);
4640
        } else {
4641
          switch (fieldId) {
4642
            case SHOPPING_CART_ID:
4643
              if (field.type == TType.I64) {
4644
                this.shoppingCartId = iprot.readI64();
4645
                setShoppingCartIdIsSet(true);
4646
              } else { 
4647
                TProtocolUtil.skip(iprot, field.type);
4648
              }
4649
              break;
4650
          }
4651
          iprot.readFieldEnd();
4652
        }
4653
      }
4654
      iprot.readStructEnd();
4655
      validate();
4656
    }
4657
 
4658
    public void write(TProtocol oprot) throws TException {
4659
      validate();
4660
 
4661
      oprot.writeStructBegin(STRUCT_DESC);
4662
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4663
      oprot.writeI64(this.shoppingCartId);
4664
      oprot.writeFieldEnd();
4665
      oprot.writeFieldStop();
4666
      oprot.writeStructEnd();
4667
    }
4668
 
4669
    @Override
4670
    public String toString() {
4671
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4672
      boolean first = true;
4673
 
4674
      sb.append("shoppingCartId:");
4675
      sb.append(this.shoppingCartId);
4676
      first = false;
4677
      sb.append(")");
4678
      return sb.toString();
4679
    }
4680
 
4681
    public void validate() throws TException {
4682
      // check for required fields
4683
    }
4684
 
4685
  }
4686
 
684 chandransh 4687
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4688
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4689
 
4690
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4691
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4692
 
4693
    private List<Transaction> success;
4694
    private TransactionServiceException ex;
4695
 
4696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4697
    public enum _Fields implements TFieldIdEnum {
4698
      SUCCESS((short)0, "success"),
4699
      EX((short)1, "ex");
4700
 
4701
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4703
 
4704
      static {
4705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4706
          byId.put((int)field._thriftId, field);
4707
          byName.put(field.getFieldName(), field);
4708
        }
4709
      }
4710
 
4711
      /**
4712
       * Find the _Fields constant that matches fieldId, or null if its not found.
4713
       */
4714
      public static _Fields findByThriftId(int fieldId) {
4715
        return byId.get(fieldId);
4716
      }
4717
 
4718
      /**
4719
       * Find the _Fields constant that matches fieldId, throwing an exception
4720
       * if it is not found.
4721
       */
4722
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4723
        _Fields fields = findByThriftId(fieldId);
4724
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4725
        return fields;
4726
      }
4727
 
4728
      /**
4729
       * Find the _Fields constant that matches name, or null if its not found.
4730
       */
4731
      public static _Fields findByName(String name) {
4732
        return byName.get(name);
4733
      }
4734
 
4735
      private final short _thriftId;
4736
      private final String _fieldName;
4737
 
4738
      _Fields(short thriftId, String fieldName) {
4739
        _thriftId = thriftId;
4740
        _fieldName = fieldName;
4741
      }
4742
 
4743
      public short getThriftFieldId() {
4744
        return _thriftId;
4745
      }
4746
 
4747
      public String getFieldName() {
4748
        return _fieldName;
4749
      }
4750
    }
4751
 
4752
    // isset id assignments
4753
 
4754
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4755
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4756
          new ListMetaData(TType.LIST, 
4757
              new StructMetaData(TType.STRUCT, Transaction.class))));
4758
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4759
          new FieldValueMetaData(TType.STRUCT)));
4760
    }});
4761
 
4762
    static {
4763
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4764
    }
4765
 
4766
    public getTransactionsForShoppingCartId_result() {
4767
    }
4768
 
4769
    public getTransactionsForShoppingCartId_result(
4770
      List<Transaction> success,
4771
      TransactionServiceException ex)
4772
    {
4773
      this();
4774
      this.success = success;
4775
      this.ex = ex;
4776
    }
4777
 
4778
    /**
4779
     * Performs a deep copy on <i>other</i>.
4780
     */
4781
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
4782
      if (other.isSetSuccess()) {
4783
        List<Transaction> __this__success = new ArrayList<Transaction>();
4784
        for (Transaction other_element : other.success) {
4785
          __this__success.add(new Transaction(other_element));
4786
        }
4787
        this.success = __this__success;
4788
      }
4789
      if (other.isSetEx()) {
4790
        this.ex = new TransactionServiceException(other.ex);
4791
      }
4792
    }
4793
 
4794
    public getTransactionsForShoppingCartId_result deepCopy() {
4795
      return new getTransactionsForShoppingCartId_result(this);
4796
    }
4797
 
4798
    @Deprecated
4799
    public getTransactionsForShoppingCartId_result clone() {
4800
      return new getTransactionsForShoppingCartId_result(this);
4801
    }
4802
 
4803
    public int getSuccessSize() {
4804
      return (this.success == null) ? 0 : this.success.size();
4805
    }
4806
 
4807
    public java.util.Iterator<Transaction> getSuccessIterator() {
4808
      return (this.success == null) ? null : this.success.iterator();
4809
    }
4810
 
4811
    public void addToSuccess(Transaction elem) {
4812
      if (this.success == null) {
4813
        this.success = new ArrayList<Transaction>();
4814
      }
4815
      this.success.add(elem);
4816
    }
4817
 
4818
    public List<Transaction> getSuccess() {
4819
      return this.success;
4820
    }
4821
 
4822
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
4823
      this.success = success;
4824
      return this;
4825
    }
4826
 
4827
    public void unsetSuccess() {
4828
      this.success = null;
4829
    }
4830
 
4831
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4832
    public boolean isSetSuccess() {
4833
      return this.success != null;
4834
    }
4835
 
4836
    public void setSuccessIsSet(boolean value) {
4837
      if (!value) {
4838
        this.success = null;
4839
      }
4840
    }
4841
 
4842
    public TransactionServiceException getEx() {
4843
      return this.ex;
4844
    }
4845
 
4846
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
4847
      this.ex = ex;
4848
      return this;
4849
    }
4850
 
4851
    public void unsetEx() {
4852
      this.ex = null;
4853
    }
4854
 
4855
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4856
    public boolean isSetEx() {
4857
      return this.ex != null;
4858
    }
4859
 
4860
    public void setExIsSet(boolean value) {
4861
      if (!value) {
4862
        this.ex = null;
4863
      }
4864
    }
4865
 
4866
    public void setFieldValue(_Fields field, Object value) {
4867
      switch (field) {
4868
      case SUCCESS:
4869
        if (value == null) {
4870
          unsetSuccess();
4871
        } else {
4872
          setSuccess((List<Transaction>)value);
4873
        }
4874
        break;
4875
 
4876
      case EX:
4877
        if (value == null) {
4878
          unsetEx();
4879
        } else {
4880
          setEx((TransactionServiceException)value);
4881
        }
4882
        break;
4883
 
4884
      }
4885
    }
4886
 
4887
    public void setFieldValue(int fieldID, Object value) {
4888
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4889
    }
4890
 
4891
    public Object getFieldValue(_Fields field) {
4892
      switch (field) {
4893
      case SUCCESS:
4894
        return getSuccess();
4895
 
4896
      case EX:
4897
        return getEx();
4898
 
4899
      }
4900
      throw new IllegalStateException();
4901
    }
4902
 
4903
    public Object getFieldValue(int fieldId) {
4904
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4905
    }
4906
 
4907
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4908
    public boolean isSet(_Fields field) {
4909
      switch (field) {
4910
      case SUCCESS:
4911
        return isSetSuccess();
4912
      case EX:
4913
        return isSetEx();
4914
      }
4915
      throw new IllegalStateException();
4916
    }
4917
 
4918
    public boolean isSet(int fieldID) {
4919
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4920
    }
4921
 
4922
    @Override
4923
    public boolean equals(Object that) {
4924
      if (that == null)
4925
        return false;
4926
      if (that instanceof getTransactionsForShoppingCartId_result)
4927
        return this.equals((getTransactionsForShoppingCartId_result)that);
4928
      return false;
4929
    }
4930
 
4931
    public boolean equals(getTransactionsForShoppingCartId_result that) {
4932
      if (that == null)
4933
        return false;
4934
 
4935
      boolean this_present_success = true && this.isSetSuccess();
4936
      boolean that_present_success = true && that.isSetSuccess();
4937
      if (this_present_success || that_present_success) {
4938
        if (!(this_present_success && that_present_success))
4939
          return false;
4940
        if (!this.success.equals(that.success))
4941
          return false;
4942
      }
4943
 
4944
      boolean this_present_ex = true && this.isSetEx();
4945
      boolean that_present_ex = true && that.isSetEx();
4946
      if (this_present_ex || that_present_ex) {
4947
        if (!(this_present_ex && that_present_ex))
4948
          return false;
4949
        if (!this.ex.equals(that.ex))
4950
          return false;
4951
      }
4952
 
4953
      return true;
4954
    }
4955
 
4956
    @Override
4957
    public int hashCode() {
4958
      return 0;
4959
    }
4960
 
684 chandransh 4961
    public int compareTo(getTransactionsForShoppingCartId_result other) {
4962
      if (!getClass().equals(other.getClass())) {
4963
        return getClass().getName().compareTo(other.getClass().getName());
4964
      }
4965
 
4966
      int lastComparison = 0;
4967
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
4968
 
4969
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4970
      if (lastComparison != 0) {
4971
        return lastComparison;
4972
      }
4973
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4974
      if (lastComparison != 0) {
4975
        return lastComparison;
4976
      }
4977
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4978
      if (lastComparison != 0) {
4979
        return lastComparison;
4980
      }
4981
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4982
      if (lastComparison != 0) {
4983
        return lastComparison;
4984
      }
4985
      return 0;
4986
    }
4987
 
132 ashish 4988
    public void read(TProtocol iprot) throws TException {
4989
      TField field;
4990
      iprot.readStructBegin();
4991
      while (true)
4992
      {
4993
        field = iprot.readFieldBegin();
4994
        if (field.type == TType.STOP) { 
4995
          break;
4996
        }
4997
        _Fields fieldId = _Fields.findByThriftId(field.id);
4998
        if (fieldId == null) {
4999
          TProtocolUtil.skip(iprot, field.type);
5000
        } else {
5001
          switch (fieldId) {
5002
            case SUCCESS:
5003
              if (field.type == TType.LIST) {
5004
                {
684 chandransh 5005
                  TList _list12 = iprot.readListBegin();
5006
                  this.success = new ArrayList<Transaction>(_list12.size);
5007
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5008
                  {
684 chandransh 5009
                    Transaction _elem14;
5010
                    _elem14 = new Transaction();
5011
                    _elem14.read(iprot);
5012
                    this.success.add(_elem14);
132 ashish 5013
                  }
5014
                  iprot.readListEnd();
5015
                }
5016
              } else { 
5017
                TProtocolUtil.skip(iprot, field.type);
5018
              }
5019
              break;
5020
            case EX:
5021
              if (field.type == TType.STRUCT) {
5022
                this.ex = new TransactionServiceException();
5023
                this.ex.read(iprot);
5024
              } else { 
5025
                TProtocolUtil.skip(iprot, field.type);
5026
              }
5027
              break;
5028
          }
5029
          iprot.readFieldEnd();
5030
        }
5031
      }
5032
      iprot.readStructEnd();
5033
      validate();
5034
    }
5035
 
5036
    public void write(TProtocol oprot) throws TException {
5037
      oprot.writeStructBegin(STRUCT_DESC);
5038
 
5039
      if (this.isSetSuccess()) {
5040
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5041
        {
5042
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5043
          for (Transaction _iter15 : this.success)
132 ashish 5044
          {
684 chandransh 5045
            _iter15.write(oprot);
132 ashish 5046
          }
5047
          oprot.writeListEnd();
5048
        }
5049
        oprot.writeFieldEnd();
5050
      } else if (this.isSetEx()) {
5051
        oprot.writeFieldBegin(EX_FIELD_DESC);
5052
        this.ex.write(oprot);
5053
        oprot.writeFieldEnd();
5054
      }
5055
      oprot.writeFieldStop();
5056
      oprot.writeStructEnd();
5057
    }
5058
 
5059
    @Override
5060
    public String toString() {
5061
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5062
      boolean first = true;
5063
 
5064
      sb.append("success:");
5065
      if (this.success == null) {
5066
        sb.append("null");
5067
      } else {
5068
        sb.append(this.success);
5069
      }
5070
      first = false;
5071
      if (!first) sb.append(", ");
5072
      sb.append("ex:");
5073
      if (this.ex == null) {
5074
        sb.append("null");
5075
      } else {
5076
        sb.append(this.ex);
5077
      }
5078
      first = false;
5079
      sb.append(")");
5080
      return sb.toString();
5081
    }
5082
 
5083
    public void validate() throws TException {
5084
      // check for required fields
5085
    }
5086
 
5087
  }
5088
 
68 ashish 5089
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5090
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5091
 
5092
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5093
 
5094
    private long transactionId;
5095
 
5096
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5097
    public enum _Fields implements TFieldIdEnum {
5098
      TRANSACTION_ID((short)1, "transactionId");
5099
 
5100
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5101
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5102
 
5103
      static {
5104
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5105
          byId.put((int)field._thriftId, field);
5106
          byName.put(field.getFieldName(), field);
5107
        }
5108
      }
5109
 
5110
      /**
5111
       * Find the _Fields constant that matches fieldId, or null if its not found.
5112
       */
5113
      public static _Fields findByThriftId(int fieldId) {
5114
        return byId.get(fieldId);
5115
      }
5116
 
5117
      /**
5118
       * Find the _Fields constant that matches fieldId, throwing an exception
5119
       * if it is not found.
5120
       */
5121
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5122
        _Fields fields = findByThriftId(fieldId);
5123
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5124
        return fields;
5125
      }
5126
 
5127
      /**
5128
       * Find the _Fields constant that matches name, or null if its not found.
5129
       */
5130
      public static _Fields findByName(String name) {
5131
        return byName.get(name);
5132
      }
5133
 
5134
      private final short _thriftId;
5135
      private final String _fieldName;
5136
 
5137
      _Fields(short thriftId, String fieldName) {
5138
        _thriftId = thriftId;
5139
        _fieldName = fieldName;
5140
      }
5141
 
5142
      public short getThriftFieldId() {
5143
        return _thriftId;
5144
      }
5145
 
5146
      public String getFieldName() {
5147
        return _fieldName;
5148
      }
5149
    }
5150
 
5151
    // isset id assignments
5152
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5153
    private BitSet __isset_bit_vector = new BitSet(1);
5154
 
5155
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5156
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5157
          new FieldValueMetaData(TType.I64)));
5158
    }});
5159
 
5160
    static {
5161
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5162
    }
5163
 
5164
    public getTransactionStatus_args() {
5165
    }
5166
 
5167
    public getTransactionStatus_args(
5168
      long transactionId)
5169
    {
5170
      this();
5171
      this.transactionId = transactionId;
5172
      setTransactionIdIsSet(true);
5173
    }
5174
 
5175
    /**
5176
     * Performs a deep copy on <i>other</i>.
5177
     */
5178
    public getTransactionStatus_args(getTransactionStatus_args other) {
5179
      __isset_bit_vector.clear();
5180
      __isset_bit_vector.or(other.__isset_bit_vector);
5181
      this.transactionId = other.transactionId;
5182
    }
5183
 
5184
    public getTransactionStatus_args deepCopy() {
5185
      return new getTransactionStatus_args(this);
5186
    }
5187
 
5188
    @Deprecated
5189
    public getTransactionStatus_args clone() {
5190
      return new getTransactionStatus_args(this);
5191
    }
5192
 
5193
    public long getTransactionId() {
5194
      return this.transactionId;
5195
    }
5196
 
5197
    public getTransactionStatus_args setTransactionId(long transactionId) {
5198
      this.transactionId = transactionId;
5199
      setTransactionIdIsSet(true);
5200
      return this;
5201
    }
5202
 
5203
    public void unsetTransactionId() {
5204
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5205
    }
5206
 
5207
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5208
    public boolean isSetTransactionId() {
5209
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5210
    }
5211
 
5212
    public void setTransactionIdIsSet(boolean value) {
5213
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5214
    }
5215
 
5216
    public void setFieldValue(_Fields field, Object value) {
5217
      switch (field) {
5218
      case TRANSACTION_ID:
5219
        if (value == null) {
5220
          unsetTransactionId();
5221
        } else {
5222
          setTransactionId((Long)value);
5223
        }
5224
        break;
5225
 
5226
      }
5227
    }
5228
 
5229
    public void setFieldValue(int fieldID, Object value) {
5230
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5231
    }
5232
 
5233
    public Object getFieldValue(_Fields field) {
5234
      switch (field) {
5235
      case TRANSACTION_ID:
5236
        return new Long(getTransactionId());
5237
 
5238
      }
5239
      throw new IllegalStateException();
5240
    }
5241
 
5242
    public Object getFieldValue(int fieldId) {
5243
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5244
    }
5245
 
5246
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5247
    public boolean isSet(_Fields field) {
5248
      switch (field) {
5249
      case TRANSACTION_ID:
5250
        return isSetTransactionId();
5251
      }
5252
      throw new IllegalStateException();
5253
    }
5254
 
5255
    public boolean isSet(int fieldID) {
5256
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5257
    }
5258
 
5259
    @Override
5260
    public boolean equals(Object that) {
5261
      if (that == null)
5262
        return false;
5263
      if (that instanceof getTransactionStatus_args)
5264
        return this.equals((getTransactionStatus_args)that);
5265
      return false;
5266
    }
5267
 
5268
    public boolean equals(getTransactionStatus_args that) {
5269
      if (that == null)
5270
        return false;
5271
 
5272
      boolean this_present_transactionId = true;
5273
      boolean that_present_transactionId = true;
5274
      if (this_present_transactionId || that_present_transactionId) {
5275
        if (!(this_present_transactionId && that_present_transactionId))
5276
          return false;
5277
        if (this.transactionId != that.transactionId)
5278
          return false;
5279
      }
5280
 
5281
      return true;
5282
    }
5283
 
5284
    @Override
5285
    public int hashCode() {
5286
      return 0;
5287
    }
5288
 
5289
    public int compareTo(getTransactionStatus_args other) {
5290
      if (!getClass().equals(other.getClass())) {
5291
        return getClass().getName().compareTo(other.getClass().getName());
5292
      }
5293
 
5294
      int lastComparison = 0;
5295
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5296
 
5297
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5298
      if (lastComparison != 0) {
5299
        return lastComparison;
5300
      }
5301
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5302
      if (lastComparison != 0) {
5303
        return lastComparison;
5304
      }
5305
      return 0;
5306
    }
5307
 
5308
    public void read(TProtocol iprot) throws TException {
5309
      TField field;
5310
      iprot.readStructBegin();
5311
      while (true)
5312
      {
5313
        field = iprot.readFieldBegin();
5314
        if (field.type == TType.STOP) { 
5315
          break;
5316
        }
5317
        _Fields fieldId = _Fields.findByThriftId(field.id);
5318
        if (fieldId == null) {
5319
          TProtocolUtil.skip(iprot, field.type);
5320
        } else {
5321
          switch (fieldId) {
5322
            case TRANSACTION_ID:
5323
              if (field.type == TType.I64) {
5324
                this.transactionId = iprot.readI64();
5325
                setTransactionIdIsSet(true);
5326
              } else { 
5327
                TProtocolUtil.skip(iprot, field.type);
5328
              }
5329
              break;
5330
          }
5331
          iprot.readFieldEnd();
5332
        }
5333
      }
5334
      iprot.readStructEnd();
5335
      validate();
5336
    }
5337
 
5338
    public void write(TProtocol oprot) throws TException {
5339
      validate();
5340
 
5341
      oprot.writeStructBegin(STRUCT_DESC);
5342
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5343
      oprot.writeI64(this.transactionId);
5344
      oprot.writeFieldEnd();
5345
      oprot.writeFieldStop();
5346
      oprot.writeStructEnd();
5347
    }
5348
 
5349
    @Override
5350
    public String toString() {
5351
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5352
      boolean first = true;
5353
 
5354
      sb.append("transactionId:");
5355
      sb.append(this.transactionId);
5356
      first = false;
5357
      sb.append(")");
5358
      return sb.toString();
5359
    }
5360
 
5361
    public void validate() throws TException {
5362
      // check for required fields
5363
    }
5364
 
5365
  }
5366
 
5367
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5368
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5369
 
5370
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5371
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5372
 
5373
    private TransactionStatus success;
5374
    private TransactionServiceException ex;
5375
 
5376
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5377
    public enum _Fields implements TFieldIdEnum {
5378
      /**
5379
       * 
5380
       * @see TransactionStatus
5381
       */
5382
      SUCCESS((short)0, "success"),
5383
      EX((short)1, "ex");
5384
 
5385
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5386
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5387
 
5388
      static {
5389
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5390
          byId.put((int)field._thriftId, field);
5391
          byName.put(field.getFieldName(), field);
5392
        }
5393
      }
5394
 
5395
      /**
5396
       * Find the _Fields constant that matches fieldId, or null if its not found.
5397
       */
5398
      public static _Fields findByThriftId(int fieldId) {
5399
        return byId.get(fieldId);
5400
      }
5401
 
5402
      /**
5403
       * Find the _Fields constant that matches fieldId, throwing an exception
5404
       * if it is not found.
5405
       */
5406
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5407
        _Fields fields = findByThriftId(fieldId);
5408
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5409
        return fields;
5410
      }
5411
 
5412
      /**
5413
       * Find the _Fields constant that matches name, or null if its not found.
5414
       */
5415
      public static _Fields findByName(String name) {
5416
        return byName.get(name);
5417
      }
5418
 
5419
      private final short _thriftId;
5420
      private final String _fieldName;
5421
 
5422
      _Fields(short thriftId, String fieldName) {
5423
        _thriftId = thriftId;
5424
        _fieldName = fieldName;
5425
      }
5426
 
5427
      public short getThriftFieldId() {
5428
        return _thriftId;
5429
      }
5430
 
5431
      public String getFieldName() {
5432
        return _fieldName;
5433
      }
5434
    }
5435
 
5436
    // isset id assignments
5437
 
5438
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5439
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5440
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5441
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5442
          new FieldValueMetaData(TType.STRUCT)));
5443
    }});
5444
 
5445
    static {
5446
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5447
    }
5448
 
5449
    public getTransactionStatus_result() {
5450
    }
5451
 
5452
    public getTransactionStatus_result(
5453
      TransactionStatus success,
5454
      TransactionServiceException ex)
5455
    {
5456
      this();
5457
      this.success = success;
5458
      this.ex = ex;
5459
    }
5460
 
5461
    /**
5462
     * Performs a deep copy on <i>other</i>.
5463
     */
5464
    public getTransactionStatus_result(getTransactionStatus_result other) {
5465
      if (other.isSetSuccess()) {
5466
        this.success = other.success;
5467
      }
5468
      if (other.isSetEx()) {
5469
        this.ex = new TransactionServiceException(other.ex);
5470
      }
5471
    }
5472
 
5473
    public getTransactionStatus_result deepCopy() {
5474
      return new getTransactionStatus_result(this);
5475
    }
5476
 
5477
    @Deprecated
5478
    public getTransactionStatus_result clone() {
5479
      return new getTransactionStatus_result(this);
5480
    }
5481
 
5482
    /**
5483
     * 
5484
     * @see TransactionStatus
5485
     */
5486
    public TransactionStatus getSuccess() {
5487
      return this.success;
5488
    }
5489
 
5490
    /**
5491
     * 
5492
     * @see TransactionStatus
5493
     */
5494
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5495
      this.success = success;
5496
      return this;
5497
    }
5498
 
5499
    public void unsetSuccess() {
5500
      this.success = null;
5501
    }
5502
 
5503
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5504
    public boolean isSetSuccess() {
5505
      return this.success != null;
5506
    }
5507
 
5508
    public void setSuccessIsSet(boolean value) {
5509
      if (!value) {
5510
        this.success = null;
5511
      }
5512
    }
5513
 
5514
    public TransactionServiceException getEx() {
5515
      return this.ex;
5516
    }
5517
 
5518
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5519
      this.ex = ex;
5520
      return this;
5521
    }
5522
 
5523
    public void unsetEx() {
5524
      this.ex = null;
5525
    }
5526
 
5527
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5528
    public boolean isSetEx() {
5529
      return this.ex != null;
5530
    }
5531
 
5532
    public void setExIsSet(boolean value) {
5533
      if (!value) {
5534
        this.ex = null;
5535
      }
5536
    }
5537
 
5538
    public void setFieldValue(_Fields field, Object value) {
5539
      switch (field) {
5540
      case SUCCESS:
5541
        if (value == null) {
5542
          unsetSuccess();
5543
        } else {
5544
          setSuccess((TransactionStatus)value);
5545
        }
5546
        break;
5547
 
5548
      case EX:
5549
        if (value == null) {
5550
          unsetEx();
5551
        } else {
5552
          setEx((TransactionServiceException)value);
5553
        }
5554
        break;
5555
 
5556
      }
5557
    }
5558
 
5559
    public void setFieldValue(int fieldID, Object value) {
5560
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5561
    }
5562
 
5563
    public Object getFieldValue(_Fields field) {
5564
      switch (field) {
5565
      case SUCCESS:
5566
        return getSuccess();
5567
 
5568
      case EX:
5569
        return getEx();
5570
 
5571
      }
5572
      throw new IllegalStateException();
5573
    }
5574
 
5575
    public Object getFieldValue(int fieldId) {
5576
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5577
    }
5578
 
5579
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5580
    public boolean isSet(_Fields field) {
5581
      switch (field) {
5582
      case SUCCESS:
5583
        return isSetSuccess();
5584
      case EX:
5585
        return isSetEx();
5586
      }
5587
      throw new IllegalStateException();
5588
    }
5589
 
5590
    public boolean isSet(int fieldID) {
5591
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5592
    }
5593
 
5594
    @Override
5595
    public boolean equals(Object that) {
5596
      if (that == null)
5597
        return false;
5598
      if (that instanceof getTransactionStatus_result)
5599
        return this.equals((getTransactionStatus_result)that);
5600
      return false;
5601
    }
5602
 
5603
    public boolean equals(getTransactionStatus_result that) {
5604
      if (that == null)
5605
        return false;
5606
 
5607
      boolean this_present_success = true && this.isSetSuccess();
5608
      boolean that_present_success = true && that.isSetSuccess();
5609
      if (this_present_success || that_present_success) {
5610
        if (!(this_present_success && that_present_success))
5611
          return false;
5612
        if (!this.success.equals(that.success))
5613
          return false;
5614
      }
5615
 
5616
      boolean this_present_ex = true && this.isSetEx();
5617
      boolean that_present_ex = true && that.isSetEx();
5618
      if (this_present_ex || that_present_ex) {
5619
        if (!(this_present_ex && that_present_ex))
5620
          return false;
5621
        if (!this.ex.equals(that.ex))
5622
          return false;
5623
      }
5624
 
5625
      return true;
5626
    }
5627
 
5628
    @Override
5629
    public int hashCode() {
5630
      return 0;
5631
    }
5632
 
5633
    public int compareTo(getTransactionStatus_result other) {
5634
      if (!getClass().equals(other.getClass())) {
5635
        return getClass().getName().compareTo(other.getClass().getName());
5636
      }
5637
 
5638
      int lastComparison = 0;
5639
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5640
 
5641
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5642
      if (lastComparison != 0) {
5643
        return lastComparison;
5644
      }
5645
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5646
      if (lastComparison != 0) {
5647
        return lastComparison;
5648
      }
5649
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5650
      if (lastComparison != 0) {
5651
        return lastComparison;
5652
      }
5653
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5654
      if (lastComparison != 0) {
5655
        return lastComparison;
5656
      }
5657
      return 0;
5658
    }
5659
 
5660
    public void read(TProtocol iprot) throws TException {
5661
      TField field;
5662
      iprot.readStructBegin();
5663
      while (true)
5664
      {
5665
        field = iprot.readFieldBegin();
5666
        if (field.type == TType.STOP) { 
5667
          break;
5668
        }
5669
        _Fields fieldId = _Fields.findByThriftId(field.id);
5670
        if (fieldId == null) {
5671
          TProtocolUtil.skip(iprot, field.type);
5672
        } else {
5673
          switch (fieldId) {
5674
            case SUCCESS:
5675
              if (field.type == TType.I32) {
5676
                this.success = TransactionStatus.findByValue(iprot.readI32());
5677
              } else { 
5678
                TProtocolUtil.skip(iprot, field.type);
5679
              }
5680
              break;
5681
            case EX:
5682
              if (field.type == TType.STRUCT) {
5683
                this.ex = new TransactionServiceException();
5684
                this.ex.read(iprot);
5685
              } else { 
5686
                TProtocolUtil.skip(iprot, field.type);
5687
              }
5688
              break;
5689
          }
5690
          iprot.readFieldEnd();
5691
        }
5692
      }
5693
      iprot.readStructEnd();
5694
      validate();
5695
    }
5696
 
5697
    public void write(TProtocol oprot) throws TException {
5698
      oprot.writeStructBegin(STRUCT_DESC);
5699
 
5700
      if (this.isSetSuccess()) {
5701
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5702
        oprot.writeI32(this.success.getValue());
5703
        oprot.writeFieldEnd();
5704
      } else if (this.isSetEx()) {
5705
        oprot.writeFieldBegin(EX_FIELD_DESC);
5706
        this.ex.write(oprot);
5707
        oprot.writeFieldEnd();
5708
      }
5709
      oprot.writeFieldStop();
5710
      oprot.writeStructEnd();
5711
    }
5712
 
5713
    @Override
5714
    public String toString() {
5715
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5716
      boolean first = true;
5717
 
5718
      sb.append("success:");
5719
      if (this.success == null) {
5720
        sb.append("null");
5721
      } else {
5722
        String success_name = success.name();
5723
        if (success_name != null) {
5724
          sb.append(success_name);
5725
          sb.append(" (");
5726
        }
5727
        sb.append(this.success);
5728
        if (success_name != null) {
5729
          sb.append(")");
5730
        }
5731
      }
5732
      first = false;
5733
      if (!first) sb.append(", ");
5734
      sb.append("ex:");
5735
      if (this.ex == null) {
5736
        sb.append("null");
5737
      } else {
5738
        sb.append(this.ex);
5739
      }
5740
      first = false;
5741
      sb.append(")");
5742
      return sb.toString();
5743
    }
5744
 
5745
    public void validate() throws TException {
5746
      // check for required fields
5747
    }
5748
 
5749
  }
5750
 
5751
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5752
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5753
 
5754
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5755
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5756
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5757
 
5758
    private long transactionId;
5759
    private TransactionStatus status;
5760
    private String description;
5761
 
5762
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5763
    public enum _Fields implements TFieldIdEnum {
5764
      TRANSACTION_ID((short)1, "transactionId"),
5765
      /**
5766
       * 
5767
       * @see TransactionStatus
5768
       */
5769
      STATUS((short)2, "status"),
5770
      DESCRIPTION((short)3, "description");
5771
 
5772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5774
 
5775
      static {
5776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5777
          byId.put((int)field._thriftId, field);
5778
          byName.put(field.getFieldName(), field);
5779
        }
5780
      }
5781
 
5782
      /**
5783
       * Find the _Fields constant that matches fieldId, or null if its not found.
5784
       */
5785
      public static _Fields findByThriftId(int fieldId) {
5786
        return byId.get(fieldId);
5787
      }
5788
 
5789
      /**
5790
       * Find the _Fields constant that matches fieldId, throwing an exception
5791
       * if it is not found.
5792
       */
5793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5794
        _Fields fields = findByThriftId(fieldId);
5795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5796
        return fields;
5797
      }
5798
 
5799
      /**
5800
       * Find the _Fields constant that matches name, or null if its not found.
5801
       */
5802
      public static _Fields findByName(String name) {
5803
        return byName.get(name);
5804
      }
5805
 
5806
      private final short _thriftId;
5807
      private final String _fieldName;
5808
 
5809
      _Fields(short thriftId, String fieldName) {
5810
        _thriftId = thriftId;
5811
        _fieldName = fieldName;
5812
      }
5813
 
5814
      public short getThriftFieldId() {
5815
        return _thriftId;
5816
      }
5817
 
5818
      public String getFieldName() {
5819
        return _fieldName;
5820
      }
5821
    }
5822
 
5823
    // isset id assignments
5824
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5825
    private BitSet __isset_bit_vector = new BitSet(1);
5826
 
5827
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5828
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5829
          new FieldValueMetaData(TType.I64)));
5830
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5831
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5832
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
5833
          new FieldValueMetaData(TType.STRING)));
5834
    }});
5835
 
5836
    static {
5837
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
5838
    }
5839
 
5840
    public changeTransactionStatus_args() {
5841
    }
5842
 
5843
    public changeTransactionStatus_args(
5844
      long transactionId,
5845
      TransactionStatus status,
5846
      String description)
5847
    {
5848
      this();
5849
      this.transactionId = transactionId;
5850
      setTransactionIdIsSet(true);
5851
      this.status = status;
5852
      this.description = description;
5853
    }
5854
 
5855
    /**
5856
     * Performs a deep copy on <i>other</i>.
5857
     */
5858
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
5859
      __isset_bit_vector.clear();
5860
      __isset_bit_vector.or(other.__isset_bit_vector);
5861
      this.transactionId = other.transactionId;
5862
      if (other.isSetStatus()) {
5863
        this.status = other.status;
5864
      }
5865
      if (other.isSetDescription()) {
5866
        this.description = other.description;
5867
      }
5868
    }
5869
 
5870
    public changeTransactionStatus_args deepCopy() {
5871
      return new changeTransactionStatus_args(this);
5872
    }
5873
 
5874
    @Deprecated
5875
    public changeTransactionStatus_args clone() {
5876
      return new changeTransactionStatus_args(this);
5877
    }
5878
 
5879
    public long getTransactionId() {
5880
      return this.transactionId;
5881
    }
5882
 
5883
    public changeTransactionStatus_args setTransactionId(long transactionId) {
5884
      this.transactionId = transactionId;
5885
      setTransactionIdIsSet(true);
5886
      return this;
5887
    }
5888
 
5889
    public void unsetTransactionId() {
5890
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5891
    }
5892
 
5893
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5894
    public boolean isSetTransactionId() {
5895
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5896
    }
5897
 
5898
    public void setTransactionIdIsSet(boolean value) {
5899
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5900
    }
5901
 
5902
    /**
5903
     * 
5904
     * @see TransactionStatus
5905
     */
5906
    public TransactionStatus getStatus() {
5907
      return this.status;
5908
    }
5909
 
5910
    /**
5911
     * 
5912
     * @see TransactionStatus
5913
     */
5914
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
5915
      this.status = status;
5916
      return this;
5917
    }
5918
 
5919
    public void unsetStatus() {
5920
      this.status = null;
5921
    }
5922
 
5923
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5924
    public boolean isSetStatus() {
5925
      return this.status != null;
5926
    }
5927
 
5928
    public void setStatusIsSet(boolean value) {
5929
      if (!value) {
5930
        this.status = null;
5931
      }
5932
    }
5933
 
5934
    public String getDescription() {
5935
      return this.description;
5936
    }
5937
 
5938
    public changeTransactionStatus_args setDescription(String description) {
5939
      this.description = description;
5940
      return this;
5941
    }
5942
 
5943
    public void unsetDescription() {
5944
      this.description = null;
5945
    }
5946
 
5947
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
5948
    public boolean isSetDescription() {
5949
      return this.description != null;
5950
    }
5951
 
5952
    public void setDescriptionIsSet(boolean value) {
5953
      if (!value) {
5954
        this.description = null;
5955
      }
5956
    }
5957
 
5958
    public void setFieldValue(_Fields field, Object value) {
5959
      switch (field) {
5960
      case TRANSACTION_ID:
5961
        if (value == null) {
5962
          unsetTransactionId();
5963
        } else {
5964
          setTransactionId((Long)value);
5965
        }
5966
        break;
5967
 
5968
      case STATUS:
5969
        if (value == null) {
5970
          unsetStatus();
5971
        } else {
5972
          setStatus((TransactionStatus)value);
5973
        }
5974
        break;
5975
 
5976
      case DESCRIPTION:
5977
        if (value == null) {
5978
          unsetDescription();
5979
        } else {
5980
          setDescription((String)value);
5981
        }
5982
        break;
5983
 
5984
      }
5985
    }
5986
 
5987
    public void setFieldValue(int fieldID, Object value) {
5988
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5989
    }
5990
 
5991
    public Object getFieldValue(_Fields field) {
5992
      switch (field) {
5993
      case TRANSACTION_ID:
5994
        return new Long(getTransactionId());
5995
 
5996
      case STATUS:
5997
        return getStatus();
5998
 
5999
      case DESCRIPTION:
6000
        return getDescription();
6001
 
6002
      }
6003
      throw new IllegalStateException();
6004
    }
6005
 
6006
    public Object getFieldValue(int fieldId) {
6007
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6008
    }
6009
 
6010
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6011
    public boolean isSet(_Fields field) {
6012
      switch (field) {
6013
      case TRANSACTION_ID:
6014
        return isSetTransactionId();
6015
      case STATUS:
6016
        return isSetStatus();
6017
      case DESCRIPTION:
6018
        return isSetDescription();
6019
      }
6020
      throw new IllegalStateException();
6021
    }
6022
 
6023
    public boolean isSet(int fieldID) {
6024
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6025
    }
6026
 
6027
    @Override
6028
    public boolean equals(Object that) {
6029
      if (that == null)
6030
        return false;
6031
      if (that instanceof changeTransactionStatus_args)
6032
        return this.equals((changeTransactionStatus_args)that);
6033
      return false;
6034
    }
6035
 
6036
    public boolean equals(changeTransactionStatus_args that) {
6037
      if (that == null)
6038
        return false;
6039
 
6040
      boolean this_present_transactionId = true;
6041
      boolean that_present_transactionId = true;
6042
      if (this_present_transactionId || that_present_transactionId) {
6043
        if (!(this_present_transactionId && that_present_transactionId))
6044
          return false;
6045
        if (this.transactionId != that.transactionId)
6046
          return false;
6047
      }
6048
 
6049
      boolean this_present_status = true && this.isSetStatus();
6050
      boolean that_present_status = true && that.isSetStatus();
6051
      if (this_present_status || that_present_status) {
6052
        if (!(this_present_status && that_present_status))
6053
          return false;
6054
        if (!this.status.equals(that.status))
6055
          return false;
6056
      }
6057
 
6058
      boolean this_present_description = true && this.isSetDescription();
6059
      boolean that_present_description = true && that.isSetDescription();
6060
      if (this_present_description || that_present_description) {
6061
        if (!(this_present_description && that_present_description))
6062
          return false;
6063
        if (!this.description.equals(that.description))
6064
          return false;
6065
      }
6066
 
6067
      return true;
6068
    }
6069
 
6070
    @Override
6071
    public int hashCode() {
6072
      return 0;
6073
    }
6074
 
6075
    public int compareTo(changeTransactionStatus_args other) {
6076
      if (!getClass().equals(other.getClass())) {
6077
        return getClass().getName().compareTo(other.getClass().getName());
6078
      }
6079
 
6080
      int lastComparison = 0;
6081
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6082
 
6083
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6084
      if (lastComparison != 0) {
6085
        return lastComparison;
6086
      }
6087
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6088
      if (lastComparison != 0) {
6089
        return lastComparison;
6090
      }
6091
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6092
      if (lastComparison != 0) {
6093
        return lastComparison;
6094
      }
6095
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6096
      if (lastComparison != 0) {
6097
        return lastComparison;
6098
      }
6099
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6100
      if (lastComparison != 0) {
6101
        return lastComparison;
6102
      }
6103
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6104
      if (lastComparison != 0) {
6105
        return lastComparison;
6106
      }
6107
      return 0;
6108
    }
6109
 
6110
    public void read(TProtocol iprot) throws TException {
6111
      TField field;
6112
      iprot.readStructBegin();
6113
      while (true)
6114
      {
6115
        field = iprot.readFieldBegin();
6116
        if (field.type == TType.STOP) { 
6117
          break;
6118
        }
6119
        _Fields fieldId = _Fields.findByThriftId(field.id);
6120
        if (fieldId == null) {
6121
          TProtocolUtil.skip(iprot, field.type);
6122
        } else {
6123
          switch (fieldId) {
6124
            case TRANSACTION_ID:
6125
              if (field.type == TType.I64) {
6126
                this.transactionId = iprot.readI64();
6127
                setTransactionIdIsSet(true);
6128
              } else { 
6129
                TProtocolUtil.skip(iprot, field.type);
6130
              }
6131
              break;
6132
            case STATUS:
6133
              if (field.type == TType.I32) {
6134
                this.status = TransactionStatus.findByValue(iprot.readI32());
6135
              } else { 
6136
                TProtocolUtil.skip(iprot, field.type);
6137
              }
6138
              break;
6139
            case DESCRIPTION:
6140
              if (field.type == TType.STRING) {
6141
                this.description = iprot.readString();
6142
              } else { 
6143
                TProtocolUtil.skip(iprot, field.type);
6144
              }
6145
              break;
6146
          }
6147
          iprot.readFieldEnd();
6148
        }
6149
      }
6150
      iprot.readStructEnd();
6151
      validate();
6152
    }
6153
 
6154
    public void write(TProtocol oprot) throws TException {
6155
      validate();
6156
 
6157
      oprot.writeStructBegin(STRUCT_DESC);
6158
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6159
      oprot.writeI64(this.transactionId);
6160
      oprot.writeFieldEnd();
6161
      if (this.status != null) {
6162
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6163
        oprot.writeI32(this.status.getValue());
6164
        oprot.writeFieldEnd();
6165
      }
6166
      if (this.description != null) {
6167
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6168
        oprot.writeString(this.description);
6169
        oprot.writeFieldEnd();
6170
      }
6171
      oprot.writeFieldStop();
6172
      oprot.writeStructEnd();
6173
    }
6174
 
6175
    @Override
6176
    public String toString() {
6177
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6178
      boolean first = true;
6179
 
6180
      sb.append("transactionId:");
6181
      sb.append(this.transactionId);
6182
      first = false;
6183
      if (!first) sb.append(", ");
6184
      sb.append("status:");
6185
      if (this.status == null) {
6186
        sb.append("null");
6187
      } else {
6188
        String status_name = status.name();
6189
        if (status_name != null) {
6190
          sb.append(status_name);
6191
          sb.append(" (");
6192
        }
6193
        sb.append(this.status);
6194
        if (status_name != null) {
6195
          sb.append(")");
6196
        }
6197
      }
6198
      first = false;
6199
      if (!first) sb.append(", ");
6200
      sb.append("description:");
6201
      if (this.description == null) {
6202
        sb.append("null");
6203
      } else {
6204
        sb.append(this.description);
6205
      }
6206
      first = false;
6207
      sb.append(")");
6208
      return sb.toString();
6209
    }
6210
 
6211
    public void validate() throws TException {
6212
      // check for required fields
6213
    }
6214
 
6215
  }
6216
 
6217
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6218
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6219
 
6220
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6221
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6222
 
6223
    private boolean success;
6224
    private TransactionServiceException ex;
6225
 
6226
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6227
    public enum _Fields implements TFieldIdEnum {
6228
      SUCCESS((short)0, "success"),
6229
      EX((short)1, "ex");
6230
 
6231
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6233
 
6234
      static {
6235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6236
          byId.put((int)field._thriftId, field);
6237
          byName.put(field.getFieldName(), field);
6238
        }
6239
      }
6240
 
6241
      /**
6242
       * Find the _Fields constant that matches fieldId, or null if its not found.
6243
       */
6244
      public static _Fields findByThriftId(int fieldId) {
6245
        return byId.get(fieldId);
6246
      }
6247
 
6248
      /**
6249
       * Find the _Fields constant that matches fieldId, throwing an exception
6250
       * if it is not found.
6251
       */
6252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6253
        _Fields fields = findByThriftId(fieldId);
6254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6255
        return fields;
6256
      }
6257
 
6258
      /**
6259
       * Find the _Fields constant that matches name, or null if its not found.
6260
       */
6261
      public static _Fields findByName(String name) {
6262
        return byName.get(name);
6263
      }
6264
 
6265
      private final short _thriftId;
6266
      private final String _fieldName;
6267
 
6268
      _Fields(short thriftId, String fieldName) {
6269
        _thriftId = thriftId;
6270
        _fieldName = fieldName;
6271
      }
6272
 
6273
      public short getThriftFieldId() {
6274
        return _thriftId;
6275
      }
6276
 
6277
      public String getFieldName() {
6278
        return _fieldName;
6279
      }
6280
    }
6281
 
6282
    // isset id assignments
6283
    private static final int __SUCCESS_ISSET_ID = 0;
6284
    private BitSet __isset_bit_vector = new BitSet(1);
6285
 
6286
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6287
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6288
          new FieldValueMetaData(TType.BOOL)));
6289
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6290
          new FieldValueMetaData(TType.STRUCT)));
6291
    }});
6292
 
6293
    static {
6294
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6295
    }
6296
 
6297
    public changeTransactionStatus_result() {
6298
    }
6299
 
6300
    public changeTransactionStatus_result(
6301
      boolean success,
6302
      TransactionServiceException ex)
6303
    {
6304
      this();
6305
      this.success = success;
6306
      setSuccessIsSet(true);
6307
      this.ex = ex;
6308
    }
6309
 
6310
    /**
6311
     * Performs a deep copy on <i>other</i>.
6312
     */
6313
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6314
      __isset_bit_vector.clear();
6315
      __isset_bit_vector.or(other.__isset_bit_vector);
6316
      this.success = other.success;
6317
      if (other.isSetEx()) {
6318
        this.ex = new TransactionServiceException(other.ex);
6319
      }
6320
    }
6321
 
6322
    public changeTransactionStatus_result deepCopy() {
6323
      return new changeTransactionStatus_result(this);
6324
    }
6325
 
6326
    @Deprecated
6327
    public changeTransactionStatus_result clone() {
6328
      return new changeTransactionStatus_result(this);
6329
    }
6330
 
6331
    public boolean isSuccess() {
6332
      return this.success;
6333
    }
6334
 
6335
    public changeTransactionStatus_result setSuccess(boolean success) {
6336
      this.success = success;
6337
      setSuccessIsSet(true);
6338
      return this;
6339
    }
6340
 
6341
    public void unsetSuccess() {
6342
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6343
    }
6344
 
6345
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6346
    public boolean isSetSuccess() {
6347
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6348
    }
6349
 
6350
    public void setSuccessIsSet(boolean value) {
6351
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6352
    }
6353
 
6354
    public TransactionServiceException getEx() {
6355
      return this.ex;
6356
    }
6357
 
6358
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6359
      this.ex = ex;
6360
      return this;
6361
    }
6362
 
6363
    public void unsetEx() {
6364
      this.ex = null;
6365
    }
6366
 
6367
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6368
    public boolean isSetEx() {
6369
      return this.ex != null;
6370
    }
6371
 
6372
    public void setExIsSet(boolean value) {
6373
      if (!value) {
6374
        this.ex = null;
6375
      }
6376
    }
6377
 
6378
    public void setFieldValue(_Fields field, Object value) {
6379
      switch (field) {
6380
      case SUCCESS:
6381
        if (value == null) {
6382
          unsetSuccess();
6383
        } else {
6384
          setSuccess((Boolean)value);
6385
        }
6386
        break;
6387
 
6388
      case EX:
6389
        if (value == null) {
6390
          unsetEx();
6391
        } else {
6392
          setEx((TransactionServiceException)value);
6393
        }
6394
        break;
6395
 
6396
      }
6397
    }
6398
 
6399
    public void setFieldValue(int fieldID, Object value) {
6400
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6401
    }
6402
 
6403
    public Object getFieldValue(_Fields field) {
6404
      switch (field) {
6405
      case SUCCESS:
6406
        return new Boolean(isSuccess());
6407
 
6408
      case EX:
6409
        return getEx();
6410
 
6411
      }
6412
      throw new IllegalStateException();
6413
    }
6414
 
6415
    public Object getFieldValue(int fieldId) {
6416
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6417
    }
6418
 
6419
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6420
    public boolean isSet(_Fields field) {
6421
      switch (field) {
6422
      case SUCCESS:
6423
        return isSetSuccess();
6424
      case EX:
6425
        return isSetEx();
6426
      }
6427
      throw new IllegalStateException();
6428
    }
6429
 
6430
    public boolean isSet(int fieldID) {
6431
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6432
    }
6433
 
6434
    @Override
6435
    public boolean equals(Object that) {
6436
      if (that == null)
6437
        return false;
6438
      if (that instanceof changeTransactionStatus_result)
6439
        return this.equals((changeTransactionStatus_result)that);
6440
      return false;
6441
    }
6442
 
6443
    public boolean equals(changeTransactionStatus_result that) {
6444
      if (that == null)
6445
        return false;
6446
 
6447
      boolean this_present_success = true;
6448
      boolean that_present_success = true;
6449
      if (this_present_success || that_present_success) {
6450
        if (!(this_present_success && that_present_success))
6451
          return false;
6452
        if (this.success != that.success)
6453
          return false;
6454
      }
6455
 
6456
      boolean this_present_ex = true && this.isSetEx();
6457
      boolean that_present_ex = true && that.isSetEx();
6458
      if (this_present_ex || that_present_ex) {
6459
        if (!(this_present_ex && that_present_ex))
6460
          return false;
6461
        if (!this.ex.equals(that.ex))
6462
          return false;
6463
      }
6464
 
6465
      return true;
6466
    }
6467
 
6468
    @Override
6469
    public int hashCode() {
6470
      return 0;
6471
    }
6472
 
6473
    public int compareTo(changeTransactionStatus_result other) {
6474
      if (!getClass().equals(other.getClass())) {
6475
        return getClass().getName().compareTo(other.getClass().getName());
6476
      }
6477
 
6478
      int lastComparison = 0;
6479
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6480
 
6481
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6482
      if (lastComparison != 0) {
6483
        return lastComparison;
6484
      }
6485
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6486
      if (lastComparison != 0) {
6487
        return lastComparison;
6488
      }
6489
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6490
      if (lastComparison != 0) {
6491
        return lastComparison;
6492
      }
6493
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6494
      if (lastComparison != 0) {
6495
        return lastComparison;
6496
      }
6497
      return 0;
6498
    }
6499
 
6500
    public void read(TProtocol iprot) throws TException {
6501
      TField field;
6502
      iprot.readStructBegin();
6503
      while (true)
6504
      {
6505
        field = iprot.readFieldBegin();
6506
        if (field.type == TType.STOP) { 
6507
          break;
6508
        }
6509
        _Fields fieldId = _Fields.findByThriftId(field.id);
6510
        if (fieldId == null) {
6511
          TProtocolUtil.skip(iprot, field.type);
6512
        } else {
6513
          switch (fieldId) {
6514
            case SUCCESS:
6515
              if (field.type == TType.BOOL) {
6516
                this.success = iprot.readBool();
6517
                setSuccessIsSet(true);
6518
              } else { 
6519
                TProtocolUtil.skip(iprot, field.type);
6520
              }
6521
              break;
6522
            case EX:
6523
              if (field.type == TType.STRUCT) {
6524
                this.ex = new TransactionServiceException();
6525
                this.ex.read(iprot);
6526
              } else { 
6527
                TProtocolUtil.skip(iprot, field.type);
6528
              }
6529
              break;
6530
          }
6531
          iprot.readFieldEnd();
6532
        }
6533
      }
6534
      iprot.readStructEnd();
6535
      validate();
6536
    }
6537
 
6538
    public void write(TProtocol oprot) throws TException {
6539
      oprot.writeStructBegin(STRUCT_DESC);
6540
 
6541
      if (this.isSetSuccess()) {
6542
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6543
        oprot.writeBool(this.success);
6544
        oprot.writeFieldEnd();
6545
      } else if (this.isSetEx()) {
6546
        oprot.writeFieldBegin(EX_FIELD_DESC);
6547
        this.ex.write(oprot);
6548
        oprot.writeFieldEnd();
6549
      }
6550
      oprot.writeFieldStop();
6551
      oprot.writeStructEnd();
6552
    }
6553
 
6554
    @Override
6555
    public String toString() {
6556
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6557
      boolean first = true;
6558
 
6559
      sb.append("success:");
6560
      sb.append(this.success);
6561
      first = false;
6562
      if (!first) sb.append(", ");
6563
      sb.append("ex:");
6564
      if (this.ex == null) {
6565
        sb.append("null");
6566
      } else {
6567
        sb.append(this.ex);
6568
      }
6569
      first = false;
6570
      sb.append(")");
6571
      return sb.toString();
6572
    }
6573
 
6574
    public void validate() throws TException {
6575
      // check for required fields
6576
    }
6577
 
6578
  }
6579
 
483 rajveer 6580
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6581
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6582
 
483 rajveer 6583
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6584
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6585
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6586
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6587
 
483 rajveer 6588
    private OrderStatus status;
6589
    private long from_date;
6590
    private long to_date;
6591
    private long warehouse_id;
68 ashish 6592
 
6593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6594
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6595
      /**
6596
       * 
6597
       * @see OrderStatus
6598
       */
6599
      STATUS((short)1, "status"),
6600
      FROM_DATE((short)2, "from_date"),
6601
      TO_DATE((short)3, "to_date"),
6602
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6603
 
6604
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6605
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6606
 
6607
      static {
6608
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6609
          byId.put((int)field._thriftId, field);
6610
          byName.put(field.getFieldName(), field);
6611
        }
6612
      }
6613
 
6614
      /**
6615
       * Find the _Fields constant that matches fieldId, or null if its not found.
6616
       */
6617
      public static _Fields findByThriftId(int fieldId) {
6618
        return byId.get(fieldId);
6619
      }
6620
 
6621
      /**
6622
       * Find the _Fields constant that matches fieldId, throwing an exception
6623
       * if it is not found.
6624
       */
6625
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6626
        _Fields fields = findByThriftId(fieldId);
6627
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6628
        return fields;
6629
      }
6630
 
6631
      /**
6632
       * Find the _Fields constant that matches name, or null if its not found.
6633
       */
6634
      public static _Fields findByName(String name) {
6635
        return byName.get(name);
6636
      }
6637
 
6638
      private final short _thriftId;
6639
      private final String _fieldName;
6640
 
6641
      _Fields(short thriftId, String fieldName) {
6642
        _thriftId = thriftId;
6643
        _fieldName = fieldName;
6644
      }
6645
 
6646
      public short getThriftFieldId() {
6647
        return _thriftId;
6648
      }
6649
 
6650
      public String getFieldName() {
6651
        return _fieldName;
6652
      }
6653
    }
6654
 
6655
    // isset id assignments
483 rajveer 6656
    private static final int __FROM_DATE_ISSET_ID = 0;
6657
    private static final int __TO_DATE_ISSET_ID = 1;
6658
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6659
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6660
 
6661
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6662
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6663
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6664
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6665
          new FieldValueMetaData(TType.I64)));
483 rajveer 6666
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6667
          new FieldValueMetaData(TType.I64)));
6668
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6669
          new FieldValueMetaData(TType.I64)));
68 ashish 6670
    }});
6671
 
6672
    static {
483 rajveer 6673
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6674
    }
6675
 
483 rajveer 6676
    public getAllOrders_args() {
68 ashish 6677
    }
6678
 
483 rajveer 6679
    public getAllOrders_args(
6680
      OrderStatus status,
6681
      long from_date,
6682
      long to_date,
6683
      long warehouse_id)
68 ashish 6684
    {
6685
      this();
483 rajveer 6686
      this.status = status;
6687
      this.from_date = from_date;
6688
      setFrom_dateIsSet(true);
6689
      this.to_date = to_date;
6690
      setTo_dateIsSet(true);
6691
      this.warehouse_id = warehouse_id;
6692
      setWarehouse_idIsSet(true);
68 ashish 6693
    }
6694
 
6695
    /**
6696
     * Performs a deep copy on <i>other</i>.
6697
     */
483 rajveer 6698
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6699
      __isset_bit_vector.clear();
6700
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6701
      if (other.isSetStatus()) {
6702
        this.status = other.status;
6703
      }
6704
      this.from_date = other.from_date;
6705
      this.to_date = other.to_date;
6706
      this.warehouse_id = other.warehouse_id;
68 ashish 6707
    }
6708
 
483 rajveer 6709
    public getAllOrders_args deepCopy() {
6710
      return new getAllOrders_args(this);
68 ashish 6711
    }
6712
 
6713
    @Deprecated
483 rajveer 6714
    public getAllOrders_args clone() {
6715
      return new getAllOrders_args(this);
68 ashish 6716
    }
6717
 
483 rajveer 6718
    /**
6719
     * 
6720
     * @see OrderStatus
6721
     */
6722
    public OrderStatus getStatus() {
6723
      return this.status;
68 ashish 6724
    }
6725
 
483 rajveer 6726
    /**
6727
     * 
6728
     * @see OrderStatus
6729
     */
6730
    public getAllOrders_args setStatus(OrderStatus status) {
6731
      this.status = status;
68 ashish 6732
      return this;
6733
    }
6734
 
483 rajveer 6735
    public void unsetStatus() {
6736
      this.status = null;
68 ashish 6737
    }
6738
 
483 rajveer 6739
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6740
    public boolean isSetStatus() {
6741
      return this.status != null;
68 ashish 6742
    }
6743
 
483 rajveer 6744
    public void setStatusIsSet(boolean value) {
6745
      if (!value) {
6746
        this.status = null;
68 ashish 6747
      }
6748
    }
6749
 
483 rajveer 6750
    public long getFrom_date() {
6751
      return this.from_date;
68 ashish 6752
    }
6753
 
483 rajveer 6754
    public getAllOrders_args setFrom_date(long from_date) {
6755
      this.from_date = from_date;
6756
      setFrom_dateIsSet(true);
6757
      return this;
68 ashish 6758
    }
6759
 
483 rajveer 6760
    public void unsetFrom_date() {
6761
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6762
    }
6763
 
483 rajveer 6764
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6765
    public boolean isSetFrom_date() {
6766
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6767
    }
6768
 
483 rajveer 6769
    public void setFrom_dateIsSet(boolean value) {
6770
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6771
    }
6772
 
483 rajveer 6773
    public long getTo_date() {
6774
      return this.to_date;
68 ashish 6775
    }
6776
 
483 rajveer 6777
    public getAllOrders_args setTo_date(long to_date) {
6778
      this.to_date = to_date;
6779
      setTo_dateIsSet(true);
68 ashish 6780
      return this;
6781
    }
6782
 
483 rajveer 6783
    public void unsetTo_date() {
6784
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 6785
    }
6786
 
483 rajveer 6787
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
6788
    public boolean isSetTo_date() {
6789
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 6790
    }
6791
 
483 rajveer 6792
    public void setTo_dateIsSet(boolean value) {
6793
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 6794
    }
6795
 
483 rajveer 6796
    public long getWarehouse_id() {
6797
      return this.warehouse_id;
68 ashish 6798
    }
6799
 
483 rajveer 6800
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
6801
      this.warehouse_id = warehouse_id;
6802
      setWarehouse_idIsSet(true);
68 ashish 6803
      return this;
6804
    }
6805
 
483 rajveer 6806
    public void unsetWarehouse_id() {
6807
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6808
    }
6809
 
483 rajveer 6810
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
6811
    public boolean isSetWarehouse_id() {
6812
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6813
    }
6814
 
483 rajveer 6815
    public void setWarehouse_idIsSet(boolean value) {
6816
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 6817
    }
6818
 
6819
    public void setFieldValue(_Fields field, Object value) {
6820
      switch (field) {
483 rajveer 6821
      case STATUS:
68 ashish 6822
        if (value == null) {
483 rajveer 6823
          unsetStatus();
68 ashish 6824
        } else {
483 rajveer 6825
          setStatus((OrderStatus)value);
68 ashish 6826
        }
6827
        break;
6828
 
483 rajveer 6829
      case FROM_DATE:
68 ashish 6830
        if (value == null) {
483 rajveer 6831
          unsetFrom_date();
68 ashish 6832
        } else {
483 rajveer 6833
          setFrom_date((Long)value);
68 ashish 6834
        }
6835
        break;
6836
 
483 rajveer 6837
      case TO_DATE:
6838
        if (value == null) {
6839
          unsetTo_date();
6840
        } else {
6841
          setTo_date((Long)value);
6842
        }
6843
        break;
6844
 
6845
      case WAREHOUSE_ID:
6846
        if (value == null) {
6847
          unsetWarehouse_id();
6848
        } else {
6849
          setWarehouse_id((Long)value);
6850
        }
6851
        break;
6852
 
68 ashish 6853
      }
6854
    }
6855
 
6856
    public void setFieldValue(int fieldID, Object value) {
6857
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6858
    }
6859
 
6860
    public Object getFieldValue(_Fields field) {
6861
      switch (field) {
483 rajveer 6862
      case STATUS:
6863
        return getStatus();
68 ashish 6864
 
483 rajveer 6865
      case FROM_DATE:
6866
        return new Long(getFrom_date());
68 ashish 6867
 
483 rajveer 6868
      case TO_DATE:
6869
        return new Long(getTo_date());
6870
 
6871
      case WAREHOUSE_ID:
6872
        return new Long(getWarehouse_id());
6873
 
68 ashish 6874
      }
6875
      throw new IllegalStateException();
6876
    }
6877
 
6878
    public Object getFieldValue(int fieldId) {
6879
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6880
    }
6881
 
6882
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6883
    public boolean isSet(_Fields field) {
6884
      switch (field) {
483 rajveer 6885
      case STATUS:
6886
        return isSetStatus();
6887
      case FROM_DATE:
6888
        return isSetFrom_date();
6889
      case TO_DATE:
6890
        return isSetTo_date();
6891
      case WAREHOUSE_ID:
6892
        return isSetWarehouse_id();
68 ashish 6893
      }
6894
      throw new IllegalStateException();
6895
    }
6896
 
6897
    public boolean isSet(int fieldID) {
6898
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6899
    }
6900
 
6901
    @Override
6902
    public boolean equals(Object that) {
6903
      if (that == null)
6904
        return false;
483 rajveer 6905
      if (that instanceof getAllOrders_args)
6906
        return this.equals((getAllOrders_args)that);
68 ashish 6907
      return false;
6908
    }
6909
 
483 rajveer 6910
    public boolean equals(getAllOrders_args that) {
68 ashish 6911
      if (that == null)
6912
        return false;
6913
 
483 rajveer 6914
      boolean this_present_status = true && this.isSetStatus();
6915
      boolean that_present_status = true && that.isSetStatus();
6916
      if (this_present_status || that_present_status) {
6917
        if (!(this_present_status && that_present_status))
68 ashish 6918
          return false;
483 rajveer 6919
        if (!this.status.equals(that.status))
68 ashish 6920
          return false;
6921
      }
6922
 
483 rajveer 6923
      boolean this_present_from_date = true;
6924
      boolean that_present_from_date = true;
6925
      if (this_present_from_date || that_present_from_date) {
6926
        if (!(this_present_from_date && that_present_from_date))
68 ashish 6927
          return false;
483 rajveer 6928
        if (this.from_date != that.from_date)
68 ashish 6929
          return false;
6930
      }
6931
 
483 rajveer 6932
      boolean this_present_to_date = true;
6933
      boolean that_present_to_date = true;
6934
      if (this_present_to_date || that_present_to_date) {
6935
        if (!(this_present_to_date && that_present_to_date))
6936
          return false;
6937
        if (this.to_date != that.to_date)
6938
          return false;
68 ashish 6939
      }
6940
 
483 rajveer 6941
      boolean this_present_warehouse_id = true;
6942
      boolean that_present_warehouse_id = true;
6943
      if (this_present_warehouse_id || that_present_warehouse_id) {
6944
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 6945
          return false;
483 rajveer 6946
        if (this.warehouse_id != that.warehouse_id)
68 ashish 6947
          return false;
6948
      }
6949
 
6950
      return true;
6951
    }
6952
 
6953
    @Override
6954
    public int hashCode() {
6955
      return 0;
6956
    }
6957
 
483 rajveer 6958
    public int compareTo(getAllOrders_args other) {
68 ashish 6959
      if (!getClass().equals(other.getClass())) {
6960
        return getClass().getName().compareTo(other.getClass().getName());
6961
      }
6962
 
6963
      int lastComparison = 0;
483 rajveer 6964
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 6965
 
483 rajveer 6966
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 6967
      if (lastComparison != 0) {
6968
        return lastComparison;
6969
      }
483 rajveer 6970
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 6971
      if (lastComparison != 0) {
6972
        return lastComparison;
6973
      }
483 rajveer 6974
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
6975
      if (lastComparison != 0) {
6976
        return lastComparison;
6977
      }
6978
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
6979
      if (lastComparison != 0) {
6980
        return lastComparison;
6981
      }
6982
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
6983
      if (lastComparison != 0) {
6984
        return lastComparison;
6985
      }
6986
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
6987
      if (lastComparison != 0) {
6988
        return lastComparison;
6989
      }
6990
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
6991
      if (lastComparison != 0) {
6992
        return lastComparison;
6993
      }
6994
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
6995
      if (lastComparison != 0) {
6996
        return lastComparison;
6997
      }
68 ashish 6998
      return 0;
6999
    }
7000
 
7001
    public void read(TProtocol iprot) throws TException {
7002
      TField field;
7003
      iprot.readStructBegin();
7004
      while (true)
7005
      {
7006
        field = iprot.readFieldBegin();
7007
        if (field.type == TType.STOP) { 
7008
          break;
7009
        }
7010
        _Fields fieldId = _Fields.findByThriftId(field.id);
7011
        if (fieldId == null) {
7012
          TProtocolUtil.skip(iprot, field.type);
7013
        } else {
7014
          switch (fieldId) {
483 rajveer 7015
            case STATUS:
7016
              if (field.type == TType.I32) {
7017
                this.status = OrderStatus.findByValue(iprot.readI32());
7018
              } else { 
7019
                TProtocolUtil.skip(iprot, field.type);
7020
              }
7021
              break;
7022
            case FROM_DATE:
68 ashish 7023
              if (field.type == TType.I64) {
483 rajveer 7024
                this.from_date = iprot.readI64();
7025
                setFrom_dateIsSet(true);
68 ashish 7026
              } else { 
7027
                TProtocolUtil.skip(iprot, field.type);
7028
              }
7029
              break;
483 rajveer 7030
            case TO_DATE:
7031
              if (field.type == TType.I64) {
7032
                this.to_date = iprot.readI64();
7033
                setTo_dateIsSet(true);
7034
              } else { 
7035
                TProtocolUtil.skip(iprot, field.type);
7036
              }
7037
              break;
7038
            case WAREHOUSE_ID:
7039
              if (field.type == TType.I64) {
7040
                this.warehouse_id = iprot.readI64();
7041
                setWarehouse_idIsSet(true);
7042
              } else { 
7043
                TProtocolUtil.skip(iprot, field.type);
7044
              }
7045
              break;
68 ashish 7046
          }
7047
          iprot.readFieldEnd();
7048
        }
7049
      }
7050
      iprot.readStructEnd();
7051
      validate();
7052
    }
7053
 
7054
    public void write(TProtocol oprot) throws TException {
7055
      validate();
7056
 
7057
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 7058
      if (this.status != null) {
7059
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7060
        oprot.writeI32(this.status.getValue());
7061
        oprot.writeFieldEnd();
7062
      }
7063
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
7064
      oprot.writeI64(this.from_date);
68 ashish 7065
      oprot.writeFieldEnd();
483 rajveer 7066
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
7067
      oprot.writeI64(this.to_date);
7068
      oprot.writeFieldEnd();
7069
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7070
      oprot.writeI64(this.warehouse_id);
7071
      oprot.writeFieldEnd();
68 ashish 7072
      oprot.writeFieldStop();
7073
      oprot.writeStructEnd();
7074
    }
7075
 
7076
    @Override
7077
    public String toString() {
483 rajveer 7078
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 7079
      boolean first = true;
7080
 
483 rajveer 7081
      sb.append("status:");
7082
      if (this.status == null) {
7083
        sb.append("null");
7084
      } else {
7085
        String status_name = status.name();
7086
        if (status_name != null) {
7087
          sb.append(status_name);
7088
          sb.append(" (");
7089
        }
7090
        sb.append(this.status);
7091
        if (status_name != null) {
7092
          sb.append(")");
7093
        }
7094
      }
68 ashish 7095
      first = false;
483 rajveer 7096
      if (!first) sb.append(", ");
7097
      sb.append("from_date:");
7098
      sb.append(this.from_date);
7099
      first = false;
7100
      if (!first) sb.append(", ");
7101
      sb.append("to_date:");
7102
      sb.append(this.to_date);
7103
      first = false;
7104
      if (!first) sb.append(", ");
7105
      sb.append("warehouse_id:");
7106
      sb.append(this.warehouse_id);
7107
      first = false;
68 ashish 7108
      sb.append(")");
7109
      return sb.toString();
7110
    }
7111
 
7112
    public void validate() throws TException {
7113
      // check for required fields
7114
    }
7115
 
7116
  }
7117
 
483 rajveer 7118
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
7119
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 7120
 
483 rajveer 7121
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 7122
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7123
 
483 rajveer 7124
    private List<Order> success;
68 ashish 7125
    private TransactionServiceException ex;
7126
 
7127
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7128
    public enum _Fields implements TFieldIdEnum {
7129
      SUCCESS((short)0, "success"),
7130
      EX((short)1, "ex");
7131
 
7132
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7134
 
7135
      static {
7136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7137
          byId.put((int)field._thriftId, field);
7138
          byName.put(field.getFieldName(), field);
7139
        }
7140
      }
7141
 
7142
      /**
7143
       * Find the _Fields constant that matches fieldId, or null if its not found.
7144
       */
7145
      public static _Fields findByThriftId(int fieldId) {
7146
        return byId.get(fieldId);
7147
      }
7148
 
7149
      /**
7150
       * Find the _Fields constant that matches fieldId, throwing an exception
7151
       * if it is not found.
7152
       */
7153
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7154
        _Fields fields = findByThriftId(fieldId);
7155
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7156
        return fields;
7157
      }
7158
 
7159
      /**
7160
       * Find the _Fields constant that matches name, or null if its not found.
7161
       */
7162
      public static _Fields findByName(String name) {
7163
        return byName.get(name);
7164
      }
7165
 
7166
      private final short _thriftId;
7167
      private final String _fieldName;
7168
 
7169
      _Fields(short thriftId, String fieldName) {
7170
        _thriftId = thriftId;
7171
        _fieldName = fieldName;
7172
      }
7173
 
7174
      public short getThriftFieldId() {
7175
        return _thriftId;
7176
      }
7177
 
7178
      public String getFieldName() {
7179
        return _fieldName;
7180
      }
7181
    }
7182
 
7183
    // isset id assignments
7184
 
7185
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7186
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 7187
          new ListMetaData(TType.LIST, 
7188
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 7189
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7190
          new FieldValueMetaData(TType.STRUCT)));
7191
    }});
7192
 
7193
    static {
483 rajveer 7194
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 7195
    }
7196
 
483 rajveer 7197
    public getAllOrders_result() {
68 ashish 7198
    }
7199
 
483 rajveer 7200
    public getAllOrders_result(
7201
      List<Order> success,
68 ashish 7202
      TransactionServiceException ex)
7203
    {
7204
      this();
7205
      this.success = success;
7206
      this.ex = ex;
7207
    }
7208
 
7209
    /**
7210
     * Performs a deep copy on <i>other</i>.
7211
     */
483 rajveer 7212
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 7213
      if (other.isSetSuccess()) {
483 rajveer 7214
        List<Order> __this__success = new ArrayList<Order>();
7215
        for (Order other_element : other.success) {
7216
          __this__success.add(new Order(other_element));
7217
        }
7218
        this.success = __this__success;
68 ashish 7219
      }
7220
      if (other.isSetEx()) {
7221
        this.ex = new TransactionServiceException(other.ex);
7222
      }
7223
    }
7224
 
483 rajveer 7225
    public getAllOrders_result deepCopy() {
7226
      return new getAllOrders_result(this);
68 ashish 7227
    }
7228
 
7229
    @Deprecated
483 rajveer 7230
    public getAllOrders_result clone() {
7231
      return new getAllOrders_result(this);
68 ashish 7232
    }
7233
 
483 rajveer 7234
    public int getSuccessSize() {
7235
      return (this.success == null) ? 0 : this.success.size();
7236
    }
7237
 
7238
    public java.util.Iterator<Order> getSuccessIterator() {
7239
      return (this.success == null) ? null : this.success.iterator();
7240
    }
7241
 
7242
    public void addToSuccess(Order elem) {
7243
      if (this.success == null) {
7244
        this.success = new ArrayList<Order>();
7245
      }
7246
      this.success.add(elem);
7247
    }
7248
 
7249
    public List<Order> getSuccess() {
68 ashish 7250
      return this.success;
7251
    }
7252
 
483 rajveer 7253
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 7254
      this.success = success;
7255
      return this;
7256
    }
7257
 
7258
    public void unsetSuccess() {
7259
      this.success = null;
7260
    }
7261
 
7262
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7263
    public boolean isSetSuccess() {
7264
      return this.success != null;
7265
    }
7266
 
7267
    public void setSuccessIsSet(boolean value) {
7268
      if (!value) {
7269
        this.success = null;
7270
      }
7271
    }
7272
 
7273
    public TransactionServiceException getEx() {
7274
      return this.ex;
7275
    }
7276
 
483 rajveer 7277
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 7278
      this.ex = ex;
7279
      return this;
7280
    }
7281
 
7282
    public void unsetEx() {
7283
      this.ex = null;
7284
    }
7285
 
7286
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7287
    public boolean isSetEx() {
7288
      return this.ex != null;
7289
    }
7290
 
7291
    public void setExIsSet(boolean value) {
7292
      if (!value) {
7293
        this.ex = null;
7294
      }
7295
    }
7296
 
7297
    public void setFieldValue(_Fields field, Object value) {
7298
      switch (field) {
7299
      case SUCCESS:
7300
        if (value == null) {
7301
          unsetSuccess();
7302
        } else {
483 rajveer 7303
          setSuccess((List<Order>)value);
68 ashish 7304
        }
7305
        break;
7306
 
7307
      case EX:
7308
        if (value == null) {
7309
          unsetEx();
7310
        } else {
7311
          setEx((TransactionServiceException)value);
7312
        }
7313
        break;
7314
 
7315
      }
7316
    }
7317
 
7318
    public void setFieldValue(int fieldID, Object value) {
7319
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7320
    }
7321
 
7322
    public Object getFieldValue(_Fields field) {
7323
      switch (field) {
7324
      case SUCCESS:
7325
        return getSuccess();
7326
 
7327
      case EX:
7328
        return getEx();
7329
 
7330
      }
7331
      throw new IllegalStateException();
7332
    }
7333
 
7334
    public Object getFieldValue(int fieldId) {
7335
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7336
    }
7337
 
7338
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7339
    public boolean isSet(_Fields field) {
7340
      switch (field) {
7341
      case SUCCESS:
7342
        return isSetSuccess();
7343
      case EX:
7344
        return isSetEx();
7345
      }
7346
      throw new IllegalStateException();
7347
    }
7348
 
7349
    public boolean isSet(int fieldID) {
7350
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7351
    }
7352
 
7353
    @Override
7354
    public boolean equals(Object that) {
7355
      if (that == null)
7356
        return false;
483 rajveer 7357
      if (that instanceof getAllOrders_result)
7358
        return this.equals((getAllOrders_result)that);
68 ashish 7359
      return false;
7360
    }
7361
 
483 rajveer 7362
    public boolean equals(getAllOrders_result that) {
68 ashish 7363
      if (that == null)
7364
        return false;
7365
 
7366
      boolean this_present_success = true && this.isSetSuccess();
7367
      boolean that_present_success = true && that.isSetSuccess();
7368
      if (this_present_success || that_present_success) {
7369
        if (!(this_present_success && that_present_success))
7370
          return false;
7371
        if (!this.success.equals(that.success))
7372
          return false;
7373
      }
7374
 
7375
      boolean this_present_ex = true && this.isSetEx();
7376
      boolean that_present_ex = true && that.isSetEx();
7377
      if (this_present_ex || that_present_ex) {
7378
        if (!(this_present_ex && that_present_ex))
7379
          return false;
7380
        if (!this.ex.equals(that.ex))
7381
          return false;
7382
      }
7383
 
7384
      return true;
7385
    }
7386
 
7387
    @Override
7388
    public int hashCode() {
7389
      return 0;
7390
    }
7391
 
483 rajveer 7392
    public int compareTo(getAllOrders_result other) {
7393
      if (!getClass().equals(other.getClass())) {
7394
        return getClass().getName().compareTo(other.getClass().getName());
7395
      }
7396
 
7397
      int lastComparison = 0;
7398
      getAllOrders_result typedOther = (getAllOrders_result)other;
7399
 
7400
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7401
      if (lastComparison != 0) {
7402
        return lastComparison;
7403
      }
7404
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7405
      if (lastComparison != 0) {
7406
        return lastComparison;
7407
      }
7408
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7409
      if (lastComparison != 0) {
7410
        return lastComparison;
7411
      }
7412
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7413
      if (lastComparison != 0) {
7414
        return lastComparison;
7415
      }
7416
      return 0;
7417
    }
7418
 
68 ashish 7419
    public void read(TProtocol iprot) throws TException {
7420
      TField field;
7421
      iprot.readStructBegin();
7422
      while (true)
7423
      {
7424
        field = iprot.readFieldBegin();
7425
        if (field.type == TType.STOP) { 
7426
          break;
7427
        }
7428
        _Fields fieldId = _Fields.findByThriftId(field.id);
7429
        if (fieldId == null) {
7430
          TProtocolUtil.skip(iprot, field.type);
7431
        } else {
7432
          switch (fieldId) {
7433
            case SUCCESS:
483 rajveer 7434
              if (field.type == TType.LIST) {
7435
                {
684 chandransh 7436
                  TList _list16 = iprot.readListBegin();
7437
                  this.success = new ArrayList<Order>(_list16.size);
7438
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7439
                  {
684 chandransh 7440
                    Order _elem18;
7441
                    _elem18 = new Order();
7442
                    _elem18.read(iprot);
7443
                    this.success.add(_elem18);
483 rajveer 7444
                  }
7445
                  iprot.readListEnd();
7446
                }
68 ashish 7447
              } else { 
7448
                TProtocolUtil.skip(iprot, field.type);
7449
              }
7450
              break;
7451
            case EX:
7452
              if (field.type == TType.STRUCT) {
7453
                this.ex = new TransactionServiceException();
7454
                this.ex.read(iprot);
7455
              } else { 
7456
                TProtocolUtil.skip(iprot, field.type);
7457
              }
7458
              break;
7459
          }
7460
          iprot.readFieldEnd();
7461
        }
7462
      }
7463
      iprot.readStructEnd();
7464
      validate();
7465
    }
7466
 
7467
    public void write(TProtocol oprot) throws TException {
7468
      oprot.writeStructBegin(STRUCT_DESC);
7469
 
7470
      if (this.isSetSuccess()) {
7471
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7472
        {
7473
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7474
          for (Order _iter19 : this.success)
483 rajveer 7475
          {
684 chandransh 7476
            _iter19.write(oprot);
483 rajveer 7477
          }
7478
          oprot.writeListEnd();
7479
        }
68 ashish 7480
        oprot.writeFieldEnd();
7481
      } else if (this.isSetEx()) {
7482
        oprot.writeFieldBegin(EX_FIELD_DESC);
7483
        this.ex.write(oprot);
7484
        oprot.writeFieldEnd();
7485
      }
7486
      oprot.writeFieldStop();
7487
      oprot.writeStructEnd();
7488
    }
7489
 
7490
    @Override
7491
    public String toString() {
483 rajveer 7492
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7493
      boolean first = true;
7494
 
7495
      sb.append("success:");
7496
      if (this.success == null) {
7497
        sb.append("null");
7498
      } else {
7499
        sb.append(this.success);
7500
      }
7501
      first = false;
7502
      if (!first) sb.append(", ");
7503
      sb.append("ex:");
7504
      if (this.ex == null) {
7505
        sb.append("null");
7506
      } else {
7507
        sb.append(this.ex);
7508
      }
7509
      first = false;
7510
      sb.append(")");
7511
      return sb.toString();
7512
    }
7513
 
7514
    public void validate() throws TException {
7515
      // check for required fields
7516
    }
7517
 
7518
  }
7519
 
1022 varun.gupt 7520
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
7521
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
7522
 
7523
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7524
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
7525
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
7526
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
7527
 
7528
    private OrderStatus status;
7529
    private long start_billing_date;
7530
    private long end_billing_date;
7531
    private long warehouse_id;
7532
 
7533
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7534
    public enum _Fields implements TFieldIdEnum {
7535
      /**
7536
       * 
7537
       * @see OrderStatus
7538
       */
7539
      STATUS((short)1, "status"),
7540
      START_BILLING_DATE((short)2, "start_billing_date"),
7541
      END_BILLING_DATE((short)3, "end_billing_date"),
7542
      WAREHOUSE_ID((short)4, "warehouse_id");
7543
 
7544
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7545
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7546
 
7547
      static {
7548
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7549
          byId.put((int)field._thriftId, field);
7550
          byName.put(field.getFieldName(), field);
7551
        }
7552
      }
7553
 
7554
      /**
7555
       * Find the _Fields constant that matches fieldId, or null if its not found.
7556
       */
7557
      public static _Fields findByThriftId(int fieldId) {
7558
        return byId.get(fieldId);
7559
      }
7560
 
7561
      /**
7562
       * Find the _Fields constant that matches fieldId, throwing an exception
7563
       * if it is not found.
7564
       */
7565
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7566
        _Fields fields = findByThriftId(fieldId);
7567
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7568
        return fields;
7569
      }
7570
 
7571
      /**
7572
       * Find the _Fields constant that matches name, or null if its not found.
7573
       */
7574
      public static _Fields findByName(String name) {
7575
        return byName.get(name);
7576
      }
7577
 
7578
      private final short _thriftId;
7579
      private final String _fieldName;
7580
 
7581
      _Fields(short thriftId, String fieldName) {
7582
        _thriftId = thriftId;
7583
        _fieldName = fieldName;
7584
      }
7585
 
7586
      public short getThriftFieldId() {
7587
        return _thriftId;
7588
      }
7589
 
7590
      public String getFieldName() {
7591
        return _fieldName;
7592
      }
7593
    }
7594
 
7595
    // isset id assignments
7596
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
7597
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
7598
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7599
    private BitSet __isset_bit_vector = new BitSet(3);
7600
 
7601
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7602
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7603
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7604
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
7605
          new FieldValueMetaData(TType.I64)));
7606
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
7607
          new FieldValueMetaData(TType.I64)));
7608
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7609
          new FieldValueMetaData(TType.I64)));
7610
    }});
7611
 
7612
    static {
7613
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
7614
    }
7615
 
7616
    public getOrdersByBillingDate_args() {
7617
    }
7618
 
7619
    public getOrdersByBillingDate_args(
7620
      OrderStatus status,
7621
      long start_billing_date,
7622
      long end_billing_date,
7623
      long warehouse_id)
7624
    {
7625
      this();
7626
      this.status = status;
7627
      this.start_billing_date = start_billing_date;
7628
      setStart_billing_dateIsSet(true);
7629
      this.end_billing_date = end_billing_date;
7630
      setEnd_billing_dateIsSet(true);
7631
      this.warehouse_id = warehouse_id;
7632
      setWarehouse_idIsSet(true);
7633
    }
7634
 
7635
    /**
7636
     * Performs a deep copy on <i>other</i>.
7637
     */
7638
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
7639
      __isset_bit_vector.clear();
7640
      __isset_bit_vector.or(other.__isset_bit_vector);
7641
      if (other.isSetStatus()) {
7642
        this.status = other.status;
7643
      }
7644
      this.start_billing_date = other.start_billing_date;
7645
      this.end_billing_date = other.end_billing_date;
7646
      this.warehouse_id = other.warehouse_id;
7647
    }
7648
 
7649
    public getOrdersByBillingDate_args deepCopy() {
7650
      return new getOrdersByBillingDate_args(this);
7651
    }
7652
 
7653
    @Deprecated
7654
    public getOrdersByBillingDate_args clone() {
7655
      return new getOrdersByBillingDate_args(this);
7656
    }
7657
 
7658
    /**
7659
     * 
7660
     * @see OrderStatus
7661
     */
7662
    public OrderStatus getStatus() {
7663
      return this.status;
7664
    }
7665
 
7666
    /**
7667
     * 
7668
     * @see OrderStatus
7669
     */
7670
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
7671
      this.status = status;
7672
      return this;
7673
    }
7674
 
7675
    public void unsetStatus() {
7676
      this.status = null;
7677
    }
7678
 
7679
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7680
    public boolean isSetStatus() {
7681
      return this.status != null;
7682
    }
7683
 
7684
    public void setStatusIsSet(boolean value) {
7685
      if (!value) {
7686
        this.status = null;
7687
      }
7688
    }
7689
 
7690
    public long getStart_billing_date() {
7691
      return this.start_billing_date;
7692
    }
7693
 
7694
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
7695
      this.start_billing_date = start_billing_date;
7696
      setStart_billing_dateIsSet(true);
7697
      return this;
7698
    }
7699
 
7700
    public void unsetStart_billing_date() {
7701
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
7702
    }
7703
 
7704
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
7705
    public boolean isSetStart_billing_date() {
7706
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
7707
    }
7708
 
7709
    public void setStart_billing_dateIsSet(boolean value) {
7710
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
7711
    }
7712
 
7713
    public long getEnd_billing_date() {
7714
      return this.end_billing_date;
7715
    }
7716
 
7717
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
7718
      this.end_billing_date = end_billing_date;
7719
      setEnd_billing_dateIsSet(true);
7720
      return this;
7721
    }
7722
 
7723
    public void unsetEnd_billing_date() {
7724
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
7725
    }
7726
 
7727
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
7728
    public boolean isSetEnd_billing_date() {
7729
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
7730
    }
7731
 
7732
    public void setEnd_billing_dateIsSet(boolean value) {
7733
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
7734
    }
7735
 
7736
    public long getWarehouse_id() {
7737
      return this.warehouse_id;
7738
    }
7739
 
7740
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
7741
      this.warehouse_id = warehouse_id;
7742
      setWarehouse_idIsSet(true);
7743
      return this;
7744
    }
7745
 
7746
    public void unsetWarehouse_id() {
7747
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
7748
    }
7749
 
7750
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7751
    public boolean isSetWarehouse_id() {
7752
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
7753
    }
7754
 
7755
    public void setWarehouse_idIsSet(boolean value) {
7756
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
7757
    }
7758
 
7759
    public void setFieldValue(_Fields field, Object value) {
7760
      switch (field) {
7761
      case STATUS:
7762
        if (value == null) {
7763
          unsetStatus();
7764
        } else {
7765
          setStatus((OrderStatus)value);
7766
        }
7767
        break;
7768
 
7769
      case START_BILLING_DATE:
7770
        if (value == null) {
7771
          unsetStart_billing_date();
7772
        } else {
7773
          setStart_billing_date((Long)value);
7774
        }
7775
        break;
7776
 
7777
      case END_BILLING_DATE:
7778
        if (value == null) {
7779
          unsetEnd_billing_date();
7780
        } else {
7781
          setEnd_billing_date((Long)value);
7782
        }
7783
        break;
7784
 
7785
      case WAREHOUSE_ID:
7786
        if (value == null) {
7787
          unsetWarehouse_id();
7788
        } else {
7789
          setWarehouse_id((Long)value);
7790
        }
7791
        break;
7792
 
7793
      }
7794
    }
7795
 
7796
    public void setFieldValue(int fieldID, Object value) {
7797
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7798
    }
7799
 
7800
    public Object getFieldValue(_Fields field) {
7801
      switch (field) {
7802
      case STATUS:
7803
        return getStatus();
7804
 
7805
      case START_BILLING_DATE:
7806
        return new Long(getStart_billing_date());
7807
 
7808
      case END_BILLING_DATE:
7809
        return new Long(getEnd_billing_date());
7810
 
7811
      case WAREHOUSE_ID:
7812
        return new Long(getWarehouse_id());
7813
 
7814
      }
7815
      throw new IllegalStateException();
7816
    }
7817
 
7818
    public Object getFieldValue(int fieldId) {
7819
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7820
    }
7821
 
7822
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7823
    public boolean isSet(_Fields field) {
7824
      switch (field) {
7825
      case STATUS:
7826
        return isSetStatus();
7827
      case START_BILLING_DATE:
7828
        return isSetStart_billing_date();
7829
      case END_BILLING_DATE:
7830
        return isSetEnd_billing_date();
7831
      case WAREHOUSE_ID:
7832
        return isSetWarehouse_id();
7833
      }
7834
      throw new IllegalStateException();
7835
    }
7836
 
7837
    public boolean isSet(int fieldID) {
7838
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7839
    }
7840
 
7841
    @Override
7842
    public boolean equals(Object that) {
7843
      if (that == null)
7844
        return false;
7845
      if (that instanceof getOrdersByBillingDate_args)
7846
        return this.equals((getOrdersByBillingDate_args)that);
7847
      return false;
7848
    }
7849
 
7850
    public boolean equals(getOrdersByBillingDate_args that) {
7851
      if (that == null)
7852
        return false;
7853
 
7854
      boolean this_present_status = true && this.isSetStatus();
7855
      boolean that_present_status = true && that.isSetStatus();
7856
      if (this_present_status || that_present_status) {
7857
        if (!(this_present_status && that_present_status))
7858
          return false;
7859
        if (!this.status.equals(that.status))
7860
          return false;
7861
      }
7862
 
7863
      boolean this_present_start_billing_date = true;
7864
      boolean that_present_start_billing_date = true;
7865
      if (this_present_start_billing_date || that_present_start_billing_date) {
7866
        if (!(this_present_start_billing_date && that_present_start_billing_date))
7867
          return false;
7868
        if (this.start_billing_date != that.start_billing_date)
7869
          return false;
7870
      }
7871
 
7872
      boolean this_present_end_billing_date = true;
7873
      boolean that_present_end_billing_date = true;
7874
      if (this_present_end_billing_date || that_present_end_billing_date) {
7875
        if (!(this_present_end_billing_date && that_present_end_billing_date))
7876
          return false;
7877
        if (this.end_billing_date != that.end_billing_date)
7878
          return false;
7879
      }
7880
 
7881
      boolean this_present_warehouse_id = true;
7882
      boolean that_present_warehouse_id = true;
7883
      if (this_present_warehouse_id || that_present_warehouse_id) {
7884
        if (!(this_present_warehouse_id && that_present_warehouse_id))
7885
          return false;
7886
        if (this.warehouse_id != that.warehouse_id)
7887
          return false;
7888
      }
7889
 
7890
      return true;
7891
    }
7892
 
7893
    @Override
7894
    public int hashCode() {
7895
      return 0;
7896
    }
7897
 
7898
    public int compareTo(getOrdersByBillingDate_args other) {
7899
      if (!getClass().equals(other.getClass())) {
7900
        return getClass().getName().compareTo(other.getClass().getName());
7901
      }
7902
 
7903
      int lastComparison = 0;
7904
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
7905
 
7906
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7907
      if (lastComparison != 0) {
7908
        return lastComparison;
7909
      }
7910
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7911
      if (lastComparison != 0) {
7912
        return lastComparison;
7913
      }
7914
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
7915
      if (lastComparison != 0) {
7916
        return lastComparison;
7917
      }
7918
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
7919
      if (lastComparison != 0) {
7920
        return lastComparison;
7921
      }
7922
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
7923
      if (lastComparison != 0) {
7924
        return lastComparison;
7925
      }
7926
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
7927
      if (lastComparison != 0) {
7928
        return lastComparison;
7929
      }
7930
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
7931
      if (lastComparison != 0) {
7932
        return lastComparison;
7933
      }
7934
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
7935
      if (lastComparison != 0) {
7936
        return lastComparison;
7937
      }
7938
      return 0;
7939
    }
7940
 
7941
    public void read(TProtocol iprot) throws TException {
7942
      TField field;
7943
      iprot.readStructBegin();
7944
      while (true)
7945
      {
7946
        field = iprot.readFieldBegin();
7947
        if (field.type == TType.STOP) { 
7948
          break;
7949
        }
7950
        _Fields fieldId = _Fields.findByThriftId(field.id);
7951
        if (fieldId == null) {
7952
          TProtocolUtil.skip(iprot, field.type);
7953
        } else {
7954
          switch (fieldId) {
7955
            case STATUS:
7956
              if (field.type == TType.I32) {
7957
                this.status = OrderStatus.findByValue(iprot.readI32());
7958
              } else { 
7959
                TProtocolUtil.skip(iprot, field.type);
7960
              }
7961
              break;
7962
            case START_BILLING_DATE:
7963
              if (field.type == TType.I64) {
7964
                this.start_billing_date = iprot.readI64();
7965
                setStart_billing_dateIsSet(true);
7966
              } else { 
7967
                TProtocolUtil.skip(iprot, field.type);
7968
              }
7969
              break;
7970
            case END_BILLING_DATE:
7971
              if (field.type == TType.I64) {
7972
                this.end_billing_date = iprot.readI64();
7973
                setEnd_billing_dateIsSet(true);
7974
              } else { 
7975
                TProtocolUtil.skip(iprot, field.type);
7976
              }
7977
              break;
7978
            case WAREHOUSE_ID:
7979
              if (field.type == TType.I64) {
7980
                this.warehouse_id = iprot.readI64();
7981
                setWarehouse_idIsSet(true);
7982
              } else { 
7983
                TProtocolUtil.skip(iprot, field.type);
7984
              }
7985
              break;
7986
          }
7987
          iprot.readFieldEnd();
7988
        }
7989
      }
7990
      iprot.readStructEnd();
7991
      validate();
7992
    }
7993
 
7994
    public void write(TProtocol oprot) throws TException {
7995
      validate();
7996
 
7997
      oprot.writeStructBegin(STRUCT_DESC);
7998
      if (this.status != null) {
7999
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8000
        oprot.writeI32(this.status.getValue());
8001
        oprot.writeFieldEnd();
8002
      }
8003
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
8004
      oprot.writeI64(this.start_billing_date);
8005
      oprot.writeFieldEnd();
8006
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
8007
      oprot.writeI64(this.end_billing_date);
8008
      oprot.writeFieldEnd();
8009
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8010
      oprot.writeI64(this.warehouse_id);
8011
      oprot.writeFieldEnd();
8012
      oprot.writeFieldStop();
8013
      oprot.writeStructEnd();
8014
    }
8015
 
8016
    @Override
8017
    public String toString() {
8018
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
8019
      boolean first = true;
8020
 
8021
      sb.append("status:");
8022
      if (this.status == null) {
8023
        sb.append("null");
8024
      } else {
8025
        String status_name = status.name();
8026
        if (status_name != null) {
8027
          sb.append(status_name);
8028
          sb.append(" (");
8029
        }
8030
        sb.append(this.status);
8031
        if (status_name != null) {
8032
          sb.append(")");
8033
        }
8034
      }
8035
      first = false;
8036
      if (!first) sb.append(", ");
8037
      sb.append("start_billing_date:");
8038
      sb.append(this.start_billing_date);
8039
      first = false;
8040
      if (!first) sb.append(", ");
8041
      sb.append("end_billing_date:");
8042
      sb.append(this.end_billing_date);
8043
      first = false;
8044
      if (!first) sb.append(", ");
8045
      sb.append("warehouse_id:");
8046
      sb.append(this.warehouse_id);
8047
      first = false;
8048
      sb.append(")");
8049
      return sb.toString();
8050
    }
8051
 
8052
    public void validate() throws TException {
8053
      // check for required fields
8054
    }
8055
 
8056
  }
8057
 
8058
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
8059
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
8060
 
8061
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
8062
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8063
 
8064
    private List<Order> success;
8065
    private TransactionServiceException ex;
8066
 
8067
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8068
    public enum _Fields implements TFieldIdEnum {
8069
      SUCCESS((short)0, "success"),
8070
      EX((short)1, "ex");
8071
 
8072
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8073
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8074
 
8075
      static {
8076
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8077
          byId.put((int)field._thriftId, field);
8078
          byName.put(field.getFieldName(), field);
8079
        }
8080
      }
8081
 
8082
      /**
8083
       * Find the _Fields constant that matches fieldId, or null if its not found.
8084
       */
8085
      public static _Fields findByThriftId(int fieldId) {
8086
        return byId.get(fieldId);
8087
      }
8088
 
8089
      /**
8090
       * Find the _Fields constant that matches fieldId, throwing an exception
8091
       * if it is not found.
8092
       */
8093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8094
        _Fields fields = findByThriftId(fieldId);
8095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8096
        return fields;
8097
      }
8098
 
8099
      /**
8100
       * Find the _Fields constant that matches name, or null if its not found.
8101
       */
8102
      public static _Fields findByName(String name) {
8103
        return byName.get(name);
8104
      }
8105
 
8106
      private final short _thriftId;
8107
      private final String _fieldName;
8108
 
8109
      _Fields(short thriftId, String fieldName) {
8110
        _thriftId = thriftId;
8111
        _fieldName = fieldName;
8112
      }
8113
 
8114
      public short getThriftFieldId() {
8115
        return _thriftId;
8116
      }
8117
 
8118
      public String getFieldName() {
8119
        return _fieldName;
8120
      }
8121
    }
8122
 
8123
    // isset id assignments
8124
 
8125
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8126
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8127
          new ListMetaData(TType.LIST, 
8128
              new StructMetaData(TType.STRUCT, Order.class))));
8129
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8130
          new FieldValueMetaData(TType.STRUCT)));
8131
    }});
8132
 
8133
    static {
8134
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
8135
    }
8136
 
8137
    public getOrdersByBillingDate_result() {
8138
    }
8139
 
8140
    public getOrdersByBillingDate_result(
8141
      List<Order> success,
8142
      TransactionServiceException ex)
8143
    {
8144
      this();
8145
      this.success = success;
8146
      this.ex = ex;
8147
    }
8148
 
8149
    /**
8150
     * Performs a deep copy on <i>other</i>.
8151
     */
8152
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
8153
      if (other.isSetSuccess()) {
8154
        List<Order> __this__success = new ArrayList<Order>();
8155
        for (Order other_element : other.success) {
8156
          __this__success.add(new Order(other_element));
8157
        }
8158
        this.success = __this__success;
8159
      }
8160
      if (other.isSetEx()) {
8161
        this.ex = new TransactionServiceException(other.ex);
8162
      }
8163
    }
8164
 
8165
    public getOrdersByBillingDate_result deepCopy() {
8166
      return new getOrdersByBillingDate_result(this);
8167
    }
8168
 
8169
    @Deprecated
8170
    public getOrdersByBillingDate_result clone() {
8171
      return new getOrdersByBillingDate_result(this);
8172
    }
8173
 
8174
    public int getSuccessSize() {
8175
      return (this.success == null) ? 0 : this.success.size();
8176
    }
8177
 
8178
    public java.util.Iterator<Order> getSuccessIterator() {
8179
      return (this.success == null) ? null : this.success.iterator();
8180
    }
8181
 
8182
    public void addToSuccess(Order elem) {
8183
      if (this.success == null) {
8184
        this.success = new ArrayList<Order>();
8185
      }
8186
      this.success.add(elem);
8187
    }
8188
 
8189
    public List<Order> getSuccess() {
8190
      return this.success;
8191
    }
8192
 
8193
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
8194
      this.success = success;
8195
      return this;
8196
    }
8197
 
8198
    public void unsetSuccess() {
8199
      this.success = null;
8200
    }
8201
 
8202
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8203
    public boolean isSetSuccess() {
8204
      return this.success != null;
8205
    }
8206
 
8207
    public void setSuccessIsSet(boolean value) {
8208
      if (!value) {
8209
        this.success = null;
8210
      }
8211
    }
8212
 
8213
    public TransactionServiceException getEx() {
8214
      return this.ex;
8215
    }
8216
 
8217
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
8218
      this.ex = ex;
8219
      return this;
8220
    }
8221
 
8222
    public void unsetEx() {
8223
      this.ex = null;
8224
    }
8225
 
8226
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8227
    public boolean isSetEx() {
8228
      return this.ex != null;
8229
    }
8230
 
8231
    public void setExIsSet(boolean value) {
8232
      if (!value) {
8233
        this.ex = null;
8234
      }
8235
    }
8236
 
8237
    public void setFieldValue(_Fields field, Object value) {
8238
      switch (field) {
8239
      case SUCCESS:
8240
        if (value == null) {
8241
          unsetSuccess();
8242
        } else {
8243
          setSuccess((List<Order>)value);
8244
        }
8245
        break;
8246
 
8247
      case EX:
8248
        if (value == null) {
8249
          unsetEx();
8250
        } else {
8251
          setEx((TransactionServiceException)value);
8252
        }
8253
        break;
8254
 
8255
      }
8256
    }
8257
 
8258
    public void setFieldValue(int fieldID, Object value) {
8259
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8260
    }
8261
 
8262
    public Object getFieldValue(_Fields field) {
8263
      switch (field) {
8264
      case SUCCESS:
8265
        return getSuccess();
8266
 
8267
      case EX:
8268
        return getEx();
8269
 
8270
      }
8271
      throw new IllegalStateException();
8272
    }
8273
 
8274
    public Object getFieldValue(int fieldId) {
8275
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8276
    }
8277
 
8278
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8279
    public boolean isSet(_Fields field) {
8280
      switch (field) {
8281
      case SUCCESS:
8282
        return isSetSuccess();
8283
      case EX:
8284
        return isSetEx();
8285
      }
8286
      throw new IllegalStateException();
8287
    }
8288
 
8289
    public boolean isSet(int fieldID) {
8290
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8291
    }
8292
 
8293
    @Override
8294
    public boolean equals(Object that) {
8295
      if (that == null)
8296
        return false;
8297
      if (that instanceof getOrdersByBillingDate_result)
8298
        return this.equals((getOrdersByBillingDate_result)that);
8299
      return false;
8300
    }
8301
 
8302
    public boolean equals(getOrdersByBillingDate_result that) {
8303
      if (that == null)
8304
        return false;
8305
 
8306
      boolean this_present_success = true && this.isSetSuccess();
8307
      boolean that_present_success = true && that.isSetSuccess();
8308
      if (this_present_success || that_present_success) {
8309
        if (!(this_present_success && that_present_success))
8310
          return false;
8311
        if (!this.success.equals(that.success))
8312
          return false;
8313
      }
8314
 
8315
      boolean this_present_ex = true && this.isSetEx();
8316
      boolean that_present_ex = true && that.isSetEx();
8317
      if (this_present_ex || that_present_ex) {
8318
        if (!(this_present_ex && that_present_ex))
8319
          return false;
8320
        if (!this.ex.equals(that.ex))
8321
          return false;
8322
      }
8323
 
8324
      return true;
8325
    }
8326
 
8327
    @Override
8328
    public int hashCode() {
8329
      return 0;
8330
    }
8331
 
8332
    public int compareTo(getOrdersByBillingDate_result other) {
8333
      if (!getClass().equals(other.getClass())) {
8334
        return getClass().getName().compareTo(other.getClass().getName());
8335
      }
8336
 
8337
      int lastComparison = 0;
8338
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
8339
 
8340
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8341
      if (lastComparison != 0) {
8342
        return lastComparison;
8343
      }
8344
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8345
      if (lastComparison != 0) {
8346
        return lastComparison;
8347
      }
8348
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8349
      if (lastComparison != 0) {
8350
        return lastComparison;
8351
      }
8352
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8353
      if (lastComparison != 0) {
8354
        return lastComparison;
8355
      }
8356
      return 0;
8357
    }
8358
 
8359
    public void read(TProtocol iprot) throws TException {
8360
      TField field;
8361
      iprot.readStructBegin();
8362
      while (true)
8363
      {
8364
        field = iprot.readFieldBegin();
8365
        if (field.type == TType.STOP) { 
8366
          break;
8367
        }
8368
        _Fields fieldId = _Fields.findByThriftId(field.id);
8369
        if (fieldId == null) {
8370
          TProtocolUtil.skip(iprot, field.type);
8371
        } else {
8372
          switch (fieldId) {
8373
            case SUCCESS:
8374
              if (field.type == TType.LIST) {
8375
                {
8376
                  TList _list20 = iprot.readListBegin();
8377
                  this.success = new ArrayList<Order>(_list20.size);
8378
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
8379
                  {
8380
                    Order _elem22;
8381
                    _elem22 = new Order();
8382
                    _elem22.read(iprot);
8383
                    this.success.add(_elem22);
8384
                  }
8385
                  iprot.readListEnd();
8386
                }
8387
              } else { 
8388
                TProtocolUtil.skip(iprot, field.type);
8389
              }
8390
              break;
8391
            case EX:
8392
              if (field.type == TType.STRUCT) {
8393
                this.ex = new TransactionServiceException();
8394
                this.ex.read(iprot);
8395
              } else { 
8396
                TProtocolUtil.skip(iprot, field.type);
8397
              }
8398
              break;
8399
          }
8400
          iprot.readFieldEnd();
8401
        }
8402
      }
8403
      iprot.readStructEnd();
8404
      validate();
8405
    }
8406
 
8407
    public void write(TProtocol oprot) throws TException {
8408
      oprot.writeStructBegin(STRUCT_DESC);
8409
 
8410
      if (this.isSetSuccess()) {
8411
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8412
        {
8413
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
8414
          for (Order _iter23 : this.success)
8415
          {
8416
            _iter23.write(oprot);
8417
          }
8418
          oprot.writeListEnd();
8419
        }
8420
        oprot.writeFieldEnd();
8421
      } else if (this.isSetEx()) {
8422
        oprot.writeFieldBegin(EX_FIELD_DESC);
8423
        this.ex.write(oprot);
8424
        oprot.writeFieldEnd();
8425
      }
8426
      oprot.writeFieldStop();
8427
      oprot.writeStructEnd();
8428
    }
8429
 
8430
    @Override
8431
    public String toString() {
8432
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
8433
      boolean first = true;
8434
 
8435
      sb.append("success:");
8436
      if (this.success == null) {
8437
        sb.append("null");
8438
      } else {
8439
        sb.append(this.success);
8440
      }
8441
      first = false;
8442
      if (!first) sb.append(", ");
8443
      sb.append("ex:");
8444
      if (this.ex == null) {
8445
        sb.append("null");
8446
      } else {
8447
        sb.append(this.ex);
8448
      }
8449
      first = false;
8450
      sb.append(")");
8451
      return sb.toString();
8452
    }
8453
 
8454
    public void validate() throws TException {
8455
      // check for required fields
8456
    }
8457
 
8458
  }
8459
 
483 rajveer 8460
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
8461
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 8462
 
483 rajveer 8463
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8464
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
8465
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 8466
 
483 rajveer 8467
    private long orderId;
8468
    private OrderStatus status;
8469
    private String description;
68 ashish 8470
 
8471
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8472
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8473
      ORDER_ID((short)1, "orderId"),
8474
      /**
8475
       * 
8476
       * @see OrderStatus
8477
       */
8478
      STATUS((short)2, "status"),
8479
      DESCRIPTION((short)3, "description");
68 ashish 8480
 
8481
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8482
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8483
 
8484
      static {
8485
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8486
          byId.put((int)field._thriftId, field);
8487
          byName.put(field.getFieldName(), field);
8488
        }
8489
      }
8490
 
8491
      /**
8492
       * Find the _Fields constant that matches fieldId, or null if its not found.
8493
       */
8494
      public static _Fields findByThriftId(int fieldId) {
8495
        return byId.get(fieldId);
8496
      }
8497
 
8498
      /**
8499
       * Find the _Fields constant that matches fieldId, throwing an exception
8500
       * if it is not found.
8501
       */
8502
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8503
        _Fields fields = findByThriftId(fieldId);
8504
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8505
        return fields;
8506
      }
8507
 
8508
      /**
8509
       * Find the _Fields constant that matches name, or null if its not found.
8510
       */
8511
      public static _Fields findByName(String name) {
8512
        return byName.get(name);
8513
      }
8514
 
8515
      private final short _thriftId;
8516
      private final String _fieldName;
8517
 
8518
      _Fields(short thriftId, String fieldName) {
8519
        _thriftId = thriftId;
8520
        _fieldName = fieldName;
8521
      }
8522
 
8523
      public short getThriftFieldId() {
8524
        return _thriftId;
8525
      }
8526
 
8527
      public String getFieldName() {
8528
        return _fieldName;
8529
      }
8530
    }
8531
 
8532
    // isset id assignments
483 rajveer 8533
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 8534
    private BitSet __isset_bit_vector = new BitSet(1);
8535
 
8536
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8537
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 8538
          new FieldValueMetaData(TType.I64)));
483 rajveer 8539
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8540
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8541
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
8542
          new FieldValueMetaData(TType.STRING)));
68 ashish 8543
    }});
8544
 
8545
    static {
483 rajveer 8546
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 8547
    }
8548
 
483 rajveer 8549
    public changeOrderStatus_args() {
68 ashish 8550
    }
8551
 
483 rajveer 8552
    public changeOrderStatus_args(
8553
      long orderId,
8554
      OrderStatus status,
8555
      String description)
68 ashish 8556
    {
8557
      this();
483 rajveer 8558
      this.orderId = orderId;
8559
      setOrderIdIsSet(true);
8560
      this.status = status;
8561
      this.description = description;
68 ashish 8562
    }
8563
 
8564
    /**
8565
     * Performs a deep copy on <i>other</i>.
8566
     */
483 rajveer 8567
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 8568
      __isset_bit_vector.clear();
8569
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8570
      this.orderId = other.orderId;
8571
      if (other.isSetStatus()) {
8572
        this.status = other.status;
8573
      }
8574
      if (other.isSetDescription()) {
8575
        this.description = other.description;
8576
      }
68 ashish 8577
    }
8578
 
483 rajveer 8579
    public changeOrderStatus_args deepCopy() {
8580
      return new changeOrderStatus_args(this);
68 ashish 8581
    }
8582
 
8583
    @Deprecated
483 rajveer 8584
    public changeOrderStatus_args clone() {
8585
      return new changeOrderStatus_args(this);
68 ashish 8586
    }
8587
 
483 rajveer 8588
    public long getOrderId() {
8589
      return this.orderId;
68 ashish 8590
    }
8591
 
483 rajveer 8592
    public changeOrderStatus_args setOrderId(long orderId) {
8593
      this.orderId = orderId;
8594
      setOrderIdIsSet(true);
68 ashish 8595
      return this;
8596
    }
8597
 
483 rajveer 8598
    public void unsetOrderId() {
8599
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 8600
    }
8601
 
483 rajveer 8602
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8603
    public boolean isSetOrderId() {
8604
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 8605
    }
8606
 
483 rajveer 8607
    public void setOrderIdIsSet(boolean value) {
8608
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 8609
    }
8610
 
483 rajveer 8611
    /**
8612
     * 
8613
     * @see OrderStatus
8614
     */
8615
    public OrderStatus getStatus() {
8616
      return this.status;
68 ashish 8617
    }
8618
 
8619
    /**
483 rajveer 8620
     * 
8621
     * @see OrderStatus
68 ashish 8622
     */
483 rajveer 8623
    public changeOrderStatus_args setStatus(OrderStatus status) {
8624
      this.status = status;
68 ashish 8625
      return this;
8626
    }
8627
 
483 rajveer 8628
    public void unsetStatus() {
8629
      this.status = null;
68 ashish 8630
    }
8631
 
483 rajveer 8632
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8633
    public boolean isSetStatus() {
8634
      return this.status != null;
68 ashish 8635
    }
8636
 
483 rajveer 8637
    public void setStatusIsSet(boolean value) {
68 ashish 8638
      if (!value) {
483 rajveer 8639
        this.status = null;
68 ashish 8640
      }
8641
    }
8642
 
483 rajveer 8643
    public String getDescription() {
8644
      return this.description;
68 ashish 8645
    }
8646
 
483 rajveer 8647
    public changeOrderStatus_args setDescription(String description) {
8648
      this.description = description;
68 ashish 8649
      return this;
8650
    }
8651
 
483 rajveer 8652
    public void unsetDescription() {
8653
      this.description = null;
68 ashish 8654
    }
8655
 
483 rajveer 8656
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
8657
    public boolean isSetDescription() {
8658
      return this.description != null;
68 ashish 8659
    }
8660
 
483 rajveer 8661
    public void setDescriptionIsSet(boolean value) {
68 ashish 8662
      if (!value) {
483 rajveer 8663
        this.description = null;
68 ashish 8664
      }
8665
    }
8666
 
8667
    public void setFieldValue(_Fields field, Object value) {
8668
      switch (field) {
483 rajveer 8669
      case ORDER_ID:
68 ashish 8670
        if (value == null) {
483 rajveer 8671
          unsetOrderId();
68 ashish 8672
        } else {
483 rajveer 8673
          setOrderId((Long)value);
68 ashish 8674
        }
8675
        break;
8676
 
483 rajveer 8677
      case STATUS:
68 ashish 8678
        if (value == null) {
483 rajveer 8679
          unsetStatus();
68 ashish 8680
        } else {
483 rajveer 8681
          setStatus((OrderStatus)value);
68 ashish 8682
        }
8683
        break;
8684
 
483 rajveer 8685
      case DESCRIPTION:
8686
        if (value == null) {
8687
          unsetDescription();
8688
        } else {
8689
          setDescription((String)value);
8690
        }
8691
        break;
8692
 
68 ashish 8693
      }
8694
    }
8695
 
8696
    public void setFieldValue(int fieldID, Object value) {
8697
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8698
    }
8699
 
8700
    public Object getFieldValue(_Fields field) {
8701
      switch (field) {
483 rajveer 8702
      case ORDER_ID:
8703
        return new Long(getOrderId());
68 ashish 8704
 
483 rajveer 8705
      case STATUS:
8706
        return getStatus();
68 ashish 8707
 
483 rajveer 8708
      case DESCRIPTION:
8709
        return getDescription();
8710
 
68 ashish 8711
      }
8712
      throw new IllegalStateException();
8713
    }
8714
 
8715
    public Object getFieldValue(int fieldId) {
8716
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8717
    }
8718
 
8719
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8720
    public boolean isSet(_Fields field) {
8721
      switch (field) {
483 rajveer 8722
      case ORDER_ID:
8723
        return isSetOrderId();
8724
      case STATUS:
8725
        return isSetStatus();
8726
      case DESCRIPTION:
8727
        return isSetDescription();
68 ashish 8728
      }
8729
      throw new IllegalStateException();
8730
    }
8731
 
8732
    public boolean isSet(int fieldID) {
8733
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8734
    }
8735
 
8736
    @Override
8737
    public boolean equals(Object that) {
8738
      if (that == null)
8739
        return false;
483 rajveer 8740
      if (that instanceof changeOrderStatus_args)
8741
        return this.equals((changeOrderStatus_args)that);
68 ashish 8742
      return false;
8743
    }
8744
 
483 rajveer 8745
    public boolean equals(changeOrderStatus_args that) {
68 ashish 8746
      if (that == null)
8747
        return false;
8748
 
483 rajveer 8749
      boolean this_present_orderId = true;
8750
      boolean that_present_orderId = true;
8751
      if (this_present_orderId || that_present_orderId) {
8752
        if (!(this_present_orderId && that_present_orderId))
68 ashish 8753
          return false;
483 rajveer 8754
        if (this.orderId != that.orderId)
68 ashish 8755
          return false;
8756
      }
8757
 
483 rajveer 8758
      boolean this_present_status = true && this.isSetStatus();
8759
      boolean that_present_status = true && that.isSetStatus();
8760
      if (this_present_status || that_present_status) {
8761
        if (!(this_present_status && that_present_status))
68 ashish 8762
          return false;
483 rajveer 8763
        if (!this.status.equals(that.status))
68 ashish 8764
          return false;
8765
      }
8766
 
483 rajveer 8767
      boolean this_present_description = true && this.isSetDescription();
8768
      boolean that_present_description = true && that.isSetDescription();
8769
      if (this_present_description || that_present_description) {
8770
        if (!(this_present_description && that_present_description))
8771
          return false;
8772
        if (!this.description.equals(that.description))
8773
          return false;
8774
      }
8775
 
68 ashish 8776
      return true;
8777
    }
8778
 
8779
    @Override
8780
    public int hashCode() {
8781
      return 0;
8782
    }
8783
 
483 rajveer 8784
    public int compareTo(changeOrderStatus_args other) {
8785
      if (!getClass().equals(other.getClass())) {
8786
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 8787
      }
8788
 
483 rajveer 8789
      int lastComparison = 0;
8790
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 8791
 
483 rajveer 8792
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
8793
      if (lastComparison != 0) {
8794
        return lastComparison;
68 ashish 8795
      }
483 rajveer 8796
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
8797
      if (lastComparison != 0) {
8798
        return lastComparison;
68 ashish 8799
      }
483 rajveer 8800
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8801
      if (lastComparison != 0) {
8802
        return lastComparison;
68 ashish 8803
      }
483 rajveer 8804
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8805
      if (lastComparison != 0) {
8806
        return lastComparison;
68 ashish 8807
      }
483 rajveer 8808
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
8809
      if (lastComparison != 0) {
8810
        return lastComparison;
68 ashish 8811
      }
483 rajveer 8812
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
8813
      if (lastComparison != 0) {
8814
        return lastComparison;
68 ashish 8815
      }
8816
      return 0;
8817
    }
8818
 
8819
    public void read(TProtocol iprot) throws TException {
8820
      TField field;
8821
      iprot.readStructBegin();
8822
      while (true)
8823
      {
8824
        field = iprot.readFieldBegin();
8825
        if (field.type == TType.STOP) { 
8826
          break;
8827
        }
8828
        _Fields fieldId = _Fields.findByThriftId(field.id);
8829
        if (fieldId == null) {
8830
          TProtocolUtil.skip(iprot, field.type);
8831
        } else {
8832
          switch (fieldId) {
483 rajveer 8833
            case ORDER_ID:
68 ashish 8834
              if (field.type == TType.I64) {
483 rajveer 8835
                this.orderId = iprot.readI64();
8836
                setOrderIdIsSet(true);
68 ashish 8837
              } else { 
8838
                TProtocolUtil.skip(iprot, field.type);
8839
              }
8840
              break;
483 rajveer 8841
            case STATUS:
8842
              if (field.type == TType.I32) {
8843
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 8844
              } else { 
8845
                TProtocolUtil.skip(iprot, field.type);
8846
              }
8847
              break;
483 rajveer 8848
            case DESCRIPTION:
8849
              if (field.type == TType.STRING) {
8850
                this.description = iprot.readString();
8851
              } else { 
8852
                TProtocolUtil.skip(iprot, field.type);
8853
              }
8854
              break;
68 ashish 8855
          }
8856
          iprot.readFieldEnd();
8857
        }
8858
      }
8859
      iprot.readStructEnd();
8860
      validate();
8861
    }
8862
 
8863
    public void write(TProtocol oprot) throws TException {
8864
      validate();
8865
 
8866
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8867
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8868
      oprot.writeI64(this.orderId);
68 ashish 8869
      oprot.writeFieldEnd();
483 rajveer 8870
      if (this.status != null) {
8871
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8872
        oprot.writeI32(this.status.getValue());
68 ashish 8873
        oprot.writeFieldEnd();
8874
      }
483 rajveer 8875
      if (this.description != null) {
8876
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8877
        oprot.writeString(this.description);
8878
        oprot.writeFieldEnd();
8879
      }
68 ashish 8880
      oprot.writeFieldStop();
8881
      oprot.writeStructEnd();
8882
    }
8883
 
8884
    @Override
8885
    public String toString() {
483 rajveer 8886
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 8887
      boolean first = true;
8888
 
483 rajveer 8889
      sb.append("orderId:");
8890
      sb.append(this.orderId);
68 ashish 8891
      first = false;
8892
      if (!first) sb.append(", ");
483 rajveer 8893
      sb.append("status:");
8894
      if (this.status == null) {
68 ashish 8895
        sb.append("null");
8896
      } else {
483 rajveer 8897
        String status_name = status.name();
8898
        if (status_name != null) {
8899
          sb.append(status_name);
8900
          sb.append(" (");
8901
        }
8902
        sb.append(this.status);
8903
        if (status_name != null) {
8904
          sb.append(")");
8905
        }
68 ashish 8906
      }
8907
      first = false;
483 rajveer 8908
      if (!first) sb.append(", ");
8909
      sb.append("description:");
8910
      if (this.description == null) {
8911
        sb.append("null");
8912
      } else {
8913
        sb.append(this.description);
8914
      }
8915
      first = false;
68 ashish 8916
      sb.append(")");
8917
      return sb.toString();
8918
    }
8919
 
8920
    public void validate() throws TException {
8921
      // check for required fields
8922
    }
8923
 
8924
  }
8925
 
483 rajveer 8926
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
8927
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 8928
 
8929
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8930
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8931
 
8932
    private boolean success;
8933
    private TransactionServiceException ex;
8934
 
8935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8936
    public enum _Fields implements TFieldIdEnum {
8937
      SUCCESS((short)0, "success"),
8938
      EX((short)1, "ex");
8939
 
8940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8942
 
8943
      static {
8944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8945
          byId.put((int)field._thriftId, field);
8946
          byName.put(field.getFieldName(), field);
8947
        }
8948
      }
8949
 
8950
      /**
8951
       * Find the _Fields constant that matches fieldId, or null if its not found.
8952
       */
8953
      public static _Fields findByThriftId(int fieldId) {
8954
        return byId.get(fieldId);
8955
      }
8956
 
8957
      /**
8958
       * Find the _Fields constant that matches fieldId, throwing an exception
8959
       * if it is not found.
8960
       */
8961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8962
        _Fields fields = findByThriftId(fieldId);
8963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8964
        return fields;
8965
      }
8966
 
8967
      /**
8968
       * Find the _Fields constant that matches name, or null if its not found.
8969
       */
8970
      public static _Fields findByName(String name) {
8971
        return byName.get(name);
8972
      }
8973
 
8974
      private final short _thriftId;
8975
      private final String _fieldName;
8976
 
8977
      _Fields(short thriftId, String fieldName) {
8978
        _thriftId = thriftId;
8979
        _fieldName = fieldName;
8980
      }
8981
 
8982
      public short getThriftFieldId() {
8983
        return _thriftId;
8984
      }
8985
 
8986
      public String getFieldName() {
8987
        return _fieldName;
8988
      }
8989
    }
8990
 
8991
    // isset id assignments
8992
    private static final int __SUCCESS_ISSET_ID = 0;
8993
    private BitSet __isset_bit_vector = new BitSet(1);
8994
 
8995
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8996
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8997
          new FieldValueMetaData(TType.BOOL)));
8998
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8999
          new FieldValueMetaData(TType.STRUCT)));
9000
    }});
9001
 
9002
    static {
483 rajveer 9003
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 9004
    }
9005
 
483 rajveer 9006
    public changeOrderStatus_result() {
68 ashish 9007
    }
9008
 
483 rajveer 9009
    public changeOrderStatus_result(
68 ashish 9010
      boolean success,
9011
      TransactionServiceException ex)
9012
    {
9013
      this();
9014
      this.success = success;
9015
      setSuccessIsSet(true);
9016
      this.ex = ex;
9017
    }
9018
 
9019
    /**
9020
     * Performs a deep copy on <i>other</i>.
9021
     */
483 rajveer 9022
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 9023
      __isset_bit_vector.clear();
9024
      __isset_bit_vector.or(other.__isset_bit_vector);
9025
      this.success = other.success;
9026
      if (other.isSetEx()) {
9027
        this.ex = new TransactionServiceException(other.ex);
9028
      }
9029
    }
9030
 
483 rajveer 9031
    public changeOrderStatus_result deepCopy() {
9032
      return new changeOrderStatus_result(this);
68 ashish 9033
    }
9034
 
9035
    @Deprecated
483 rajveer 9036
    public changeOrderStatus_result clone() {
9037
      return new changeOrderStatus_result(this);
68 ashish 9038
    }
9039
 
9040
    public boolean isSuccess() {
9041
      return this.success;
9042
    }
9043
 
483 rajveer 9044
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 9045
      this.success = success;
9046
      setSuccessIsSet(true);
9047
      return this;
9048
    }
9049
 
9050
    public void unsetSuccess() {
9051
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9052
    }
9053
 
9054
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9055
    public boolean isSetSuccess() {
9056
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9057
    }
9058
 
9059
    public void setSuccessIsSet(boolean value) {
9060
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9061
    }
9062
 
9063
    public TransactionServiceException getEx() {
9064
      return this.ex;
9065
    }
9066
 
483 rajveer 9067
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 9068
      this.ex = ex;
9069
      return this;
9070
    }
9071
 
9072
    public void unsetEx() {
9073
      this.ex = null;
9074
    }
9075
 
9076
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9077
    public boolean isSetEx() {
9078
      return this.ex != null;
9079
    }
9080
 
9081
    public void setExIsSet(boolean value) {
9082
      if (!value) {
9083
        this.ex = null;
9084
      }
9085
    }
9086
 
9087
    public void setFieldValue(_Fields field, Object value) {
9088
      switch (field) {
9089
      case SUCCESS:
9090
        if (value == null) {
9091
          unsetSuccess();
9092
        } else {
9093
          setSuccess((Boolean)value);
9094
        }
9095
        break;
9096
 
9097
      case EX:
9098
        if (value == null) {
9099
          unsetEx();
9100
        } else {
9101
          setEx((TransactionServiceException)value);
9102
        }
9103
        break;
9104
 
9105
      }
9106
    }
9107
 
9108
    public void setFieldValue(int fieldID, Object value) {
9109
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9110
    }
9111
 
9112
    public Object getFieldValue(_Fields field) {
9113
      switch (field) {
9114
      case SUCCESS:
9115
        return new Boolean(isSuccess());
9116
 
9117
      case EX:
9118
        return getEx();
9119
 
9120
      }
9121
      throw new IllegalStateException();
9122
    }
9123
 
9124
    public Object getFieldValue(int fieldId) {
9125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9126
    }
9127
 
9128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9129
    public boolean isSet(_Fields field) {
9130
      switch (field) {
9131
      case SUCCESS:
9132
        return isSetSuccess();
9133
      case EX:
9134
        return isSetEx();
9135
      }
9136
      throw new IllegalStateException();
9137
    }
9138
 
9139
    public boolean isSet(int fieldID) {
9140
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9141
    }
9142
 
9143
    @Override
9144
    public boolean equals(Object that) {
9145
      if (that == null)
9146
        return false;
483 rajveer 9147
      if (that instanceof changeOrderStatus_result)
9148
        return this.equals((changeOrderStatus_result)that);
68 ashish 9149
      return false;
9150
    }
9151
 
483 rajveer 9152
    public boolean equals(changeOrderStatus_result that) {
68 ashish 9153
      if (that == null)
9154
        return false;
9155
 
9156
      boolean this_present_success = true;
9157
      boolean that_present_success = true;
9158
      if (this_present_success || that_present_success) {
9159
        if (!(this_present_success && that_present_success))
9160
          return false;
9161
        if (this.success != that.success)
9162
          return false;
9163
      }
9164
 
9165
      boolean this_present_ex = true && this.isSetEx();
9166
      boolean that_present_ex = true && that.isSetEx();
9167
      if (this_present_ex || that_present_ex) {
9168
        if (!(this_present_ex && that_present_ex))
9169
          return false;
9170
        if (!this.ex.equals(that.ex))
9171
          return false;
9172
      }
9173
 
9174
      return true;
9175
    }
9176
 
9177
    @Override
9178
    public int hashCode() {
9179
      return 0;
9180
    }
9181
 
483 rajveer 9182
    public int compareTo(changeOrderStatus_result other) {
68 ashish 9183
      if (!getClass().equals(other.getClass())) {
9184
        return getClass().getName().compareTo(other.getClass().getName());
9185
      }
9186
 
9187
      int lastComparison = 0;
483 rajveer 9188
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 9189
 
9190
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9191
      if (lastComparison != 0) {
9192
        return lastComparison;
9193
      }
9194
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9195
      if (lastComparison != 0) {
9196
        return lastComparison;
9197
      }
9198
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9199
      if (lastComparison != 0) {
9200
        return lastComparison;
9201
      }
9202
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9203
      if (lastComparison != 0) {
9204
        return lastComparison;
9205
      }
9206
      return 0;
9207
    }
9208
 
9209
    public void read(TProtocol iprot) throws TException {
9210
      TField field;
9211
      iprot.readStructBegin();
9212
      while (true)
9213
      {
9214
        field = iprot.readFieldBegin();
9215
        if (field.type == TType.STOP) { 
9216
          break;
9217
        }
9218
        _Fields fieldId = _Fields.findByThriftId(field.id);
9219
        if (fieldId == null) {
9220
          TProtocolUtil.skip(iprot, field.type);
9221
        } else {
9222
          switch (fieldId) {
9223
            case SUCCESS:
9224
              if (field.type == TType.BOOL) {
9225
                this.success = iprot.readBool();
9226
                setSuccessIsSet(true);
9227
              } else { 
9228
                TProtocolUtil.skip(iprot, field.type);
9229
              }
9230
              break;
9231
            case EX:
9232
              if (field.type == TType.STRUCT) {
9233
                this.ex = new TransactionServiceException();
9234
                this.ex.read(iprot);
9235
              } else { 
9236
                TProtocolUtil.skip(iprot, field.type);
9237
              }
9238
              break;
9239
          }
9240
          iprot.readFieldEnd();
9241
        }
9242
      }
9243
      iprot.readStructEnd();
9244
      validate();
9245
    }
9246
 
9247
    public void write(TProtocol oprot) throws TException {
9248
      oprot.writeStructBegin(STRUCT_DESC);
9249
 
9250
      if (this.isSetSuccess()) {
9251
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9252
        oprot.writeBool(this.success);
9253
        oprot.writeFieldEnd();
9254
      } else if (this.isSetEx()) {
9255
        oprot.writeFieldBegin(EX_FIELD_DESC);
9256
        this.ex.write(oprot);
9257
        oprot.writeFieldEnd();
9258
      }
9259
      oprot.writeFieldStop();
9260
      oprot.writeStructEnd();
9261
    }
9262
 
9263
    @Override
9264
    public String toString() {
483 rajveer 9265
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 9266
      boolean first = true;
9267
 
9268
      sb.append("success:");
9269
      sb.append(this.success);
9270
      first = false;
9271
      if (!first) sb.append(", ");
9272
      sb.append("ex:");
9273
      if (this.ex == null) {
9274
        sb.append("null");
9275
      } else {
9276
        sb.append(this.ex);
9277
      }
9278
      first = false;
9279
      sb.append(")");
9280
      return sb.toString();
9281
    }
9282
 
9283
    public void validate() throws TException {
9284
      // check for required fields
9285
    }
9286
 
9287
  }
9288
 
495 rajveer 9289
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
9290
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
9291
 
9292
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9293
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 9294
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 9295
 
9296
    private long orderId;
9297
    private String invoice_number;
9298
    private String billed_by;
9299
 
9300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9301
    public enum _Fields implements TFieldIdEnum {
9302
      ORDER_ID((short)1, "orderId"),
9303
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 9304
      BILLED_BY((short)3, "billed_by");
495 rajveer 9305
 
9306
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9308
 
9309
      static {
9310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9311
          byId.put((int)field._thriftId, field);
9312
          byName.put(field.getFieldName(), field);
9313
        }
9314
      }
9315
 
9316
      /**
9317
       * Find the _Fields constant that matches fieldId, or null if its not found.
9318
       */
9319
      public static _Fields findByThriftId(int fieldId) {
9320
        return byId.get(fieldId);
9321
      }
9322
 
9323
      /**
9324
       * Find the _Fields constant that matches fieldId, throwing an exception
9325
       * if it is not found.
9326
       */
9327
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9328
        _Fields fields = findByThriftId(fieldId);
9329
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9330
        return fields;
9331
      }
9332
 
9333
      /**
9334
       * Find the _Fields constant that matches name, or null if its not found.
9335
       */
9336
      public static _Fields findByName(String name) {
9337
        return byName.get(name);
9338
      }
9339
 
9340
      private final short _thriftId;
9341
      private final String _fieldName;
9342
 
9343
      _Fields(short thriftId, String fieldName) {
9344
        _thriftId = thriftId;
9345
        _fieldName = fieldName;
9346
      }
9347
 
9348
      public short getThriftFieldId() {
9349
        return _thriftId;
9350
      }
9351
 
9352
      public String getFieldName() {
9353
        return _fieldName;
9354
      }
9355
    }
9356
 
9357
    // isset id assignments
9358
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 9359
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 9360
 
9361
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9362
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9363
          new FieldValueMetaData(TType.I64)));
9364
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
9365
          new FieldValueMetaData(TType.STRING)));
9366
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
9367
          new FieldValueMetaData(TType.STRING)));
9368
    }});
9369
 
9370
    static {
9371
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
9372
    }
9373
 
9374
    public addBillingDetails_args() {
9375
    }
9376
 
9377
    public addBillingDetails_args(
9378
      long orderId,
9379
      String invoice_number,
9380
      String billed_by)
9381
    {
9382
      this();
9383
      this.orderId = orderId;
9384
      setOrderIdIsSet(true);
9385
      this.invoice_number = invoice_number;
9386
      this.billed_by = billed_by;
9387
    }
9388
 
9389
    /**
9390
     * Performs a deep copy on <i>other</i>.
9391
     */
9392
    public addBillingDetails_args(addBillingDetails_args other) {
9393
      __isset_bit_vector.clear();
9394
      __isset_bit_vector.or(other.__isset_bit_vector);
9395
      this.orderId = other.orderId;
9396
      if (other.isSetInvoice_number()) {
9397
        this.invoice_number = other.invoice_number;
9398
      }
9399
      if (other.isSetBilled_by()) {
9400
        this.billed_by = other.billed_by;
9401
      }
9402
    }
9403
 
9404
    public addBillingDetails_args deepCopy() {
9405
      return new addBillingDetails_args(this);
9406
    }
9407
 
9408
    @Deprecated
9409
    public addBillingDetails_args clone() {
9410
      return new addBillingDetails_args(this);
9411
    }
9412
 
9413
    public long getOrderId() {
9414
      return this.orderId;
9415
    }
9416
 
9417
    public addBillingDetails_args setOrderId(long orderId) {
9418
      this.orderId = orderId;
9419
      setOrderIdIsSet(true);
9420
      return this;
9421
    }
9422
 
9423
    public void unsetOrderId() {
9424
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9425
    }
9426
 
9427
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9428
    public boolean isSetOrderId() {
9429
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9430
    }
9431
 
9432
    public void setOrderIdIsSet(boolean value) {
9433
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9434
    }
9435
 
9436
    public String getInvoice_number() {
9437
      return this.invoice_number;
9438
    }
9439
 
9440
    public addBillingDetails_args setInvoice_number(String invoice_number) {
9441
      this.invoice_number = invoice_number;
9442
      return this;
9443
    }
9444
 
9445
    public void unsetInvoice_number() {
9446
      this.invoice_number = null;
9447
    }
9448
 
9449
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
9450
    public boolean isSetInvoice_number() {
9451
      return this.invoice_number != null;
9452
    }
9453
 
9454
    public void setInvoice_numberIsSet(boolean value) {
9455
      if (!value) {
9456
        this.invoice_number = null;
9457
      }
9458
    }
9459
 
9460
    public String getBilled_by() {
9461
      return this.billed_by;
9462
    }
9463
 
9464
    public addBillingDetails_args setBilled_by(String billed_by) {
9465
      this.billed_by = billed_by;
9466
      return this;
9467
    }
9468
 
9469
    public void unsetBilled_by() {
9470
      this.billed_by = null;
9471
    }
9472
 
9473
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
9474
    public boolean isSetBilled_by() {
9475
      return this.billed_by != null;
9476
    }
9477
 
9478
    public void setBilled_byIsSet(boolean value) {
9479
      if (!value) {
9480
        this.billed_by = null;
9481
      }
9482
    }
9483
 
9484
    public void setFieldValue(_Fields field, Object value) {
9485
      switch (field) {
9486
      case ORDER_ID:
9487
        if (value == null) {
9488
          unsetOrderId();
9489
        } else {
9490
          setOrderId((Long)value);
9491
        }
9492
        break;
9493
 
9494
      case INVOICE_NUMBER:
9495
        if (value == null) {
9496
          unsetInvoice_number();
9497
        } else {
9498
          setInvoice_number((String)value);
9499
        }
9500
        break;
9501
 
9502
      case BILLED_BY:
9503
        if (value == null) {
9504
          unsetBilled_by();
9505
        } else {
9506
          setBilled_by((String)value);
9507
        }
9508
        break;
9509
 
9510
      }
9511
    }
9512
 
9513
    public void setFieldValue(int fieldID, Object value) {
9514
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9515
    }
9516
 
9517
    public Object getFieldValue(_Fields field) {
9518
      switch (field) {
9519
      case ORDER_ID:
9520
        return new Long(getOrderId());
9521
 
9522
      case INVOICE_NUMBER:
9523
        return getInvoice_number();
9524
 
9525
      case BILLED_BY:
9526
        return getBilled_by();
9527
 
9528
      }
9529
      throw new IllegalStateException();
9530
    }
9531
 
9532
    public Object getFieldValue(int fieldId) {
9533
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9534
    }
9535
 
9536
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9537
    public boolean isSet(_Fields field) {
9538
      switch (field) {
9539
      case ORDER_ID:
9540
        return isSetOrderId();
9541
      case INVOICE_NUMBER:
9542
        return isSetInvoice_number();
9543
      case BILLED_BY:
9544
        return isSetBilled_by();
9545
      }
9546
      throw new IllegalStateException();
9547
    }
9548
 
9549
    public boolean isSet(int fieldID) {
9550
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9551
    }
9552
 
9553
    @Override
9554
    public boolean equals(Object that) {
9555
      if (that == null)
9556
        return false;
9557
      if (that instanceof addBillingDetails_args)
9558
        return this.equals((addBillingDetails_args)that);
9559
      return false;
9560
    }
9561
 
9562
    public boolean equals(addBillingDetails_args that) {
9563
      if (that == null)
9564
        return false;
9565
 
9566
      boolean this_present_orderId = true;
9567
      boolean that_present_orderId = true;
9568
      if (this_present_orderId || that_present_orderId) {
9569
        if (!(this_present_orderId && that_present_orderId))
9570
          return false;
9571
        if (this.orderId != that.orderId)
9572
          return false;
9573
      }
9574
 
9575
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
9576
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
9577
      if (this_present_invoice_number || that_present_invoice_number) {
9578
        if (!(this_present_invoice_number && that_present_invoice_number))
9579
          return false;
9580
        if (!this.invoice_number.equals(that.invoice_number))
9581
          return false;
9582
      }
9583
 
9584
      boolean this_present_billed_by = true && this.isSetBilled_by();
9585
      boolean that_present_billed_by = true && that.isSetBilled_by();
9586
      if (this_present_billed_by || that_present_billed_by) {
9587
        if (!(this_present_billed_by && that_present_billed_by))
9588
          return false;
9589
        if (!this.billed_by.equals(that.billed_by))
9590
          return false;
9591
      }
9592
 
9593
      return true;
9594
    }
9595
 
9596
    @Override
9597
    public int hashCode() {
9598
      return 0;
9599
    }
9600
 
9601
    public int compareTo(addBillingDetails_args other) {
9602
      if (!getClass().equals(other.getClass())) {
9603
        return getClass().getName().compareTo(other.getClass().getName());
9604
      }
9605
 
9606
      int lastComparison = 0;
9607
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
9608
 
9609
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9610
      if (lastComparison != 0) {
9611
        return lastComparison;
9612
      }
9613
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9614
      if (lastComparison != 0) {
9615
        return lastComparison;
9616
      }
9617
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
9618
      if (lastComparison != 0) {
9619
        return lastComparison;
9620
      }
9621
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
9622
      if (lastComparison != 0) {
9623
        return lastComparison;
9624
      }
9625
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
9626
      if (lastComparison != 0) {
9627
        return lastComparison;
9628
      }
9629
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
9630
      if (lastComparison != 0) {
9631
        return lastComparison;
9632
      }
9633
      return 0;
9634
    }
9635
 
9636
    public void read(TProtocol iprot) throws TException {
9637
      TField field;
9638
      iprot.readStructBegin();
9639
      while (true)
9640
      {
9641
        field = iprot.readFieldBegin();
9642
        if (field.type == TType.STOP) { 
9643
          break;
9644
        }
9645
        _Fields fieldId = _Fields.findByThriftId(field.id);
9646
        if (fieldId == null) {
9647
          TProtocolUtil.skip(iprot, field.type);
9648
        } else {
9649
          switch (fieldId) {
9650
            case ORDER_ID:
9651
              if (field.type == TType.I64) {
9652
                this.orderId = iprot.readI64();
9653
                setOrderIdIsSet(true);
9654
              } else { 
9655
                TProtocolUtil.skip(iprot, field.type);
9656
              }
9657
              break;
9658
            case INVOICE_NUMBER:
9659
              if (field.type == TType.STRING) {
9660
                this.invoice_number = iprot.readString();
9661
              } else { 
9662
                TProtocolUtil.skip(iprot, field.type);
9663
              }
9664
              break;
9665
            case BILLED_BY:
9666
              if (field.type == TType.STRING) {
9667
                this.billed_by = iprot.readString();
9668
              } else { 
9669
                TProtocolUtil.skip(iprot, field.type);
9670
              }
9671
              break;
9672
          }
9673
          iprot.readFieldEnd();
9674
        }
9675
      }
9676
      iprot.readStructEnd();
9677
      validate();
9678
    }
9679
 
9680
    public void write(TProtocol oprot) throws TException {
9681
      validate();
9682
 
9683
      oprot.writeStructBegin(STRUCT_DESC);
9684
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9685
      oprot.writeI64(this.orderId);
9686
      oprot.writeFieldEnd();
9687
      if (this.invoice_number != null) {
9688
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
9689
        oprot.writeString(this.invoice_number);
9690
        oprot.writeFieldEnd();
9691
      }
9692
      if (this.billed_by != null) {
9693
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
9694
        oprot.writeString(this.billed_by);
9695
        oprot.writeFieldEnd();
9696
      }
9697
      oprot.writeFieldStop();
9698
      oprot.writeStructEnd();
9699
    }
9700
 
9701
    @Override
9702
    public String toString() {
9703
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
9704
      boolean first = true;
9705
 
9706
      sb.append("orderId:");
9707
      sb.append(this.orderId);
9708
      first = false;
9709
      if (!first) sb.append(", ");
9710
      sb.append("invoice_number:");
9711
      if (this.invoice_number == null) {
9712
        sb.append("null");
9713
      } else {
9714
        sb.append(this.invoice_number);
9715
      }
9716
      first = false;
9717
      if (!first) sb.append(", ");
9718
      sb.append("billed_by:");
9719
      if (this.billed_by == null) {
9720
        sb.append("null");
9721
      } else {
9722
        sb.append(this.billed_by);
9723
      }
9724
      first = false;
9725
      sb.append(")");
9726
      return sb.toString();
9727
    }
9728
 
9729
    public void validate() throws TException {
9730
      // check for required fields
9731
    }
9732
 
9733
  }
9734
 
9735
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
9736
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
9737
 
9738
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9739
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9740
 
9741
    private boolean success;
9742
    private TransactionServiceException ex;
9743
 
9744
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9745
    public enum _Fields implements TFieldIdEnum {
9746
      SUCCESS((short)0, "success"),
9747
      EX((short)1, "ex");
9748
 
9749
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9750
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9751
 
9752
      static {
9753
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9754
          byId.put((int)field._thriftId, field);
9755
          byName.put(field.getFieldName(), field);
9756
        }
9757
      }
9758
 
9759
      /**
9760
       * Find the _Fields constant that matches fieldId, or null if its not found.
9761
       */
9762
      public static _Fields findByThriftId(int fieldId) {
9763
        return byId.get(fieldId);
9764
      }
9765
 
9766
      /**
9767
       * Find the _Fields constant that matches fieldId, throwing an exception
9768
       * if it is not found.
9769
       */
9770
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9771
        _Fields fields = findByThriftId(fieldId);
9772
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9773
        return fields;
9774
      }
9775
 
9776
      /**
9777
       * Find the _Fields constant that matches name, or null if its not found.
9778
       */
9779
      public static _Fields findByName(String name) {
9780
        return byName.get(name);
9781
      }
9782
 
9783
      private final short _thriftId;
9784
      private final String _fieldName;
9785
 
9786
      _Fields(short thriftId, String fieldName) {
9787
        _thriftId = thriftId;
9788
        _fieldName = fieldName;
9789
      }
9790
 
9791
      public short getThriftFieldId() {
9792
        return _thriftId;
9793
      }
9794
 
9795
      public String getFieldName() {
9796
        return _fieldName;
9797
      }
9798
    }
9799
 
9800
    // isset id assignments
9801
    private static final int __SUCCESS_ISSET_ID = 0;
9802
    private BitSet __isset_bit_vector = new BitSet(1);
9803
 
9804
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9805
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9806
          new FieldValueMetaData(TType.BOOL)));
9807
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9808
          new FieldValueMetaData(TType.STRUCT)));
9809
    }});
9810
 
9811
    static {
9812
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
9813
    }
9814
 
9815
    public addBillingDetails_result() {
9816
    }
9817
 
9818
    public addBillingDetails_result(
9819
      boolean success,
9820
      TransactionServiceException ex)
9821
    {
9822
      this();
9823
      this.success = success;
9824
      setSuccessIsSet(true);
9825
      this.ex = ex;
9826
    }
9827
 
9828
    /**
9829
     * Performs a deep copy on <i>other</i>.
9830
     */
9831
    public addBillingDetails_result(addBillingDetails_result other) {
9832
      __isset_bit_vector.clear();
9833
      __isset_bit_vector.or(other.__isset_bit_vector);
9834
      this.success = other.success;
9835
      if (other.isSetEx()) {
9836
        this.ex = new TransactionServiceException(other.ex);
9837
      }
9838
    }
9839
 
9840
    public addBillingDetails_result deepCopy() {
9841
      return new addBillingDetails_result(this);
9842
    }
9843
 
9844
    @Deprecated
9845
    public addBillingDetails_result clone() {
9846
      return new addBillingDetails_result(this);
9847
    }
9848
 
9849
    public boolean isSuccess() {
9850
      return this.success;
9851
    }
9852
 
9853
    public addBillingDetails_result setSuccess(boolean success) {
9854
      this.success = success;
9855
      setSuccessIsSet(true);
9856
      return this;
9857
    }
9858
 
9859
    public void unsetSuccess() {
9860
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9861
    }
9862
 
9863
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9864
    public boolean isSetSuccess() {
9865
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9866
    }
9867
 
9868
    public void setSuccessIsSet(boolean value) {
9869
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9870
    }
9871
 
9872
    public TransactionServiceException getEx() {
9873
      return this.ex;
9874
    }
9875
 
9876
    public addBillingDetails_result setEx(TransactionServiceException ex) {
9877
      this.ex = ex;
9878
      return this;
9879
    }
9880
 
9881
    public void unsetEx() {
9882
      this.ex = null;
9883
    }
9884
 
9885
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9886
    public boolean isSetEx() {
9887
      return this.ex != null;
9888
    }
9889
 
9890
    public void setExIsSet(boolean value) {
9891
      if (!value) {
9892
        this.ex = null;
9893
      }
9894
    }
9895
 
9896
    public void setFieldValue(_Fields field, Object value) {
9897
      switch (field) {
9898
      case SUCCESS:
9899
        if (value == null) {
9900
          unsetSuccess();
9901
        } else {
9902
          setSuccess((Boolean)value);
9903
        }
9904
        break;
9905
 
9906
      case EX:
9907
        if (value == null) {
9908
          unsetEx();
9909
        } else {
9910
          setEx((TransactionServiceException)value);
9911
        }
9912
        break;
9913
 
9914
      }
9915
    }
9916
 
9917
    public void setFieldValue(int fieldID, Object value) {
9918
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9919
    }
9920
 
9921
    public Object getFieldValue(_Fields field) {
9922
      switch (field) {
9923
      case SUCCESS:
9924
        return new Boolean(isSuccess());
9925
 
9926
      case EX:
9927
        return getEx();
9928
 
9929
      }
9930
      throw new IllegalStateException();
9931
    }
9932
 
9933
    public Object getFieldValue(int fieldId) {
9934
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9935
    }
9936
 
9937
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9938
    public boolean isSet(_Fields field) {
9939
      switch (field) {
9940
      case SUCCESS:
9941
        return isSetSuccess();
9942
      case EX:
9943
        return isSetEx();
9944
      }
9945
      throw new IllegalStateException();
9946
    }
9947
 
9948
    public boolean isSet(int fieldID) {
9949
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9950
    }
9951
 
9952
    @Override
9953
    public boolean equals(Object that) {
9954
      if (that == null)
9955
        return false;
9956
      if (that instanceof addBillingDetails_result)
9957
        return this.equals((addBillingDetails_result)that);
9958
      return false;
9959
    }
9960
 
9961
    public boolean equals(addBillingDetails_result that) {
9962
      if (that == null)
9963
        return false;
9964
 
9965
      boolean this_present_success = true;
9966
      boolean that_present_success = true;
9967
      if (this_present_success || that_present_success) {
9968
        if (!(this_present_success && that_present_success))
9969
          return false;
9970
        if (this.success != that.success)
9971
          return false;
9972
      }
9973
 
9974
      boolean this_present_ex = true && this.isSetEx();
9975
      boolean that_present_ex = true && that.isSetEx();
9976
      if (this_present_ex || that_present_ex) {
9977
        if (!(this_present_ex && that_present_ex))
9978
          return false;
9979
        if (!this.ex.equals(that.ex))
9980
          return false;
9981
      }
9982
 
9983
      return true;
9984
    }
9985
 
9986
    @Override
9987
    public int hashCode() {
9988
      return 0;
9989
    }
9990
 
9991
    public int compareTo(addBillingDetails_result other) {
9992
      if (!getClass().equals(other.getClass())) {
9993
        return getClass().getName().compareTo(other.getClass().getName());
9994
      }
9995
 
9996
      int lastComparison = 0;
9997
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
9998
 
9999
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10000
      if (lastComparison != 0) {
10001
        return lastComparison;
10002
      }
10003
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10004
      if (lastComparison != 0) {
10005
        return lastComparison;
10006
      }
10007
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10008
      if (lastComparison != 0) {
10009
        return lastComparison;
10010
      }
10011
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10012
      if (lastComparison != 0) {
10013
        return lastComparison;
10014
      }
10015
      return 0;
10016
    }
10017
 
10018
    public void read(TProtocol iprot) throws TException {
10019
      TField field;
10020
      iprot.readStructBegin();
10021
      while (true)
10022
      {
10023
        field = iprot.readFieldBegin();
10024
        if (field.type == TType.STOP) { 
10025
          break;
10026
        }
10027
        _Fields fieldId = _Fields.findByThriftId(field.id);
10028
        if (fieldId == null) {
10029
          TProtocolUtil.skip(iprot, field.type);
10030
        } else {
10031
          switch (fieldId) {
10032
            case SUCCESS:
10033
              if (field.type == TType.BOOL) {
10034
                this.success = iprot.readBool();
10035
                setSuccessIsSet(true);
10036
              } else { 
10037
                TProtocolUtil.skip(iprot, field.type);
10038
              }
10039
              break;
10040
            case EX:
10041
              if (field.type == TType.STRUCT) {
10042
                this.ex = new TransactionServiceException();
10043
                this.ex.read(iprot);
10044
              } else { 
10045
                TProtocolUtil.skip(iprot, field.type);
10046
              }
10047
              break;
10048
          }
10049
          iprot.readFieldEnd();
10050
        }
10051
      }
10052
      iprot.readStructEnd();
10053
      validate();
10054
    }
10055
 
10056
    public void write(TProtocol oprot) throws TException {
10057
      oprot.writeStructBegin(STRUCT_DESC);
10058
 
10059
      if (this.isSetSuccess()) {
10060
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10061
        oprot.writeBool(this.success);
10062
        oprot.writeFieldEnd();
10063
      } else if (this.isSetEx()) {
10064
        oprot.writeFieldBegin(EX_FIELD_DESC);
10065
        this.ex.write(oprot);
10066
        oprot.writeFieldEnd();
10067
      }
10068
      oprot.writeFieldStop();
10069
      oprot.writeStructEnd();
10070
    }
10071
 
10072
    @Override
10073
    public String toString() {
10074
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
10075
      boolean first = true;
10076
 
10077
      sb.append("success:");
10078
      sb.append(this.success);
10079
      first = false;
10080
      if (!first) sb.append(", ");
10081
      sb.append("ex:");
10082
      if (this.ex == null) {
10083
        sb.append("null");
10084
      } else {
10085
        sb.append(this.ex);
10086
      }
10087
      first = false;
10088
      sb.append(")");
10089
      return sb.toString();
10090
    }
10091
 
10092
    public void validate() throws TException {
10093
      // check for required fields
10094
    }
10095
 
10096
  }
10097
 
1148 chandransh 10098
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
10099
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
10100
 
10101
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10102
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
10103
 
10104
    private long orderId;
10105
    private long jacketNumber;
10106
 
10107
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10108
    public enum _Fields implements TFieldIdEnum {
10109
      ORDER_ID((short)1, "orderId"),
10110
      JACKET_NUMBER((short)2, "jacketNumber");
10111
 
10112
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10113
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10114
 
10115
      static {
10116
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10117
          byId.put((int)field._thriftId, field);
10118
          byName.put(field.getFieldName(), field);
10119
        }
10120
      }
10121
 
10122
      /**
10123
       * Find the _Fields constant that matches fieldId, or null if its not found.
10124
       */
10125
      public static _Fields findByThriftId(int fieldId) {
10126
        return byId.get(fieldId);
10127
      }
10128
 
10129
      /**
10130
       * Find the _Fields constant that matches fieldId, throwing an exception
10131
       * if it is not found.
10132
       */
10133
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10134
        _Fields fields = findByThriftId(fieldId);
10135
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10136
        return fields;
10137
      }
10138
 
10139
      /**
10140
       * Find the _Fields constant that matches name, or null if its not found.
10141
       */
10142
      public static _Fields findByName(String name) {
10143
        return byName.get(name);
10144
      }
10145
 
10146
      private final short _thriftId;
10147
      private final String _fieldName;
10148
 
10149
      _Fields(short thriftId, String fieldName) {
10150
        _thriftId = thriftId;
10151
        _fieldName = fieldName;
10152
      }
10153
 
10154
      public short getThriftFieldId() {
10155
        return _thriftId;
10156
      }
10157
 
10158
      public String getFieldName() {
10159
        return _fieldName;
10160
      }
10161
    }
10162
 
10163
    // isset id assignments
10164
    private static final int __ORDERID_ISSET_ID = 0;
10165
    private static final int __JACKETNUMBER_ISSET_ID = 1;
10166
    private BitSet __isset_bit_vector = new BitSet(2);
10167
 
10168
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10169
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10170
          new FieldValueMetaData(TType.I64)));
10171
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
10172
          new FieldValueMetaData(TType.I64)));
10173
    }});
10174
 
10175
    static {
10176
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
10177
    }
10178
 
10179
    public addJacketNumber_args() {
10180
    }
10181
 
10182
    public addJacketNumber_args(
10183
      long orderId,
10184
      long jacketNumber)
10185
    {
10186
      this();
10187
      this.orderId = orderId;
10188
      setOrderIdIsSet(true);
10189
      this.jacketNumber = jacketNumber;
10190
      setJacketNumberIsSet(true);
10191
    }
10192
 
10193
    /**
10194
     * Performs a deep copy on <i>other</i>.
10195
     */
10196
    public addJacketNumber_args(addJacketNumber_args other) {
10197
      __isset_bit_vector.clear();
10198
      __isset_bit_vector.or(other.__isset_bit_vector);
10199
      this.orderId = other.orderId;
10200
      this.jacketNumber = other.jacketNumber;
10201
    }
10202
 
10203
    public addJacketNumber_args deepCopy() {
10204
      return new addJacketNumber_args(this);
10205
    }
10206
 
10207
    @Deprecated
10208
    public addJacketNumber_args clone() {
10209
      return new addJacketNumber_args(this);
10210
    }
10211
 
10212
    public long getOrderId() {
10213
      return this.orderId;
10214
    }
10215
 
10216
    public addJacketNumber_args setOrderId(long orderId) {
10217
      this.orderId = orderId;
10218
      setOrderIdIsSet(true);
10219
      return this;
10220
    }
10221
 
10222
    public void unsetOrderId() {
10223
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10224
    }
10225
 
10226
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10227
    public boolean isSetOrderId() {
10228
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10229
    }
10230
 
10231
    public void setOrderIdIsSet(boolean value) {
10232
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10233
    }
10234
 
10235
    public long getJacketNumber() {
10236
      return this.jacketNumber;
10237
    }
10238
 
10239
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
10240
      this.jacketNumber = jacketNumber;
10241
      setJacketNumberIsSet(true);
10242
      return this;
10243
    }
10244
 
10245
    public void unsetJacketNumber() {
10246
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
10247
    }
10248
 
10249
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
10250
    public boolean isSetJacketNumber() {
10251
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
10252
    }
10253
 
10254
    public void setJacketNumberIsSet(boolean value) {
10255
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
10256
    }
10257
 
10258
    public void setFieldValue(_Fields field, Object value) {
10259
      switch (field) {
10260
      case ORDER_ID:
10261
        if (value == null) {
10262
          unsetOrderId();
10263
        } else {
10264
          setOrderId((Long)value);
10265
        }
10266
        break;
10267
 
10268
      case JACKET_NUMBER:
10269
        if (value == null) {
10270
          unsetJacketNumber();
10271
        } else {
10272
          setJacketNumber((Long)value);
10273
        }
10274
        break;
10275
 
10276
      }
10277
    }
10278
 
10279
    public void setFieldValue(int fieldID, Object value) {
10280
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10281
    }
10282
 
10283
    public Object getFieldValue(_Fields field) {
10284
      switch (field) {
10285
      case ORDER_ID:
10286
        return new Long(getOrderId());
10287
 
10288
      case JACKET_NUMBER:
10289
        return new Long(getJacketNumber());
10290
 
10291
      }
10292
      throw new IllegalStateException();
10293
    }
10294
 
10295
    public Object getFieldValue(int fieldId) {
10296
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10297
    }
10298
 
10299
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10300
    public boolean isSet(_Fields field) {
10301
      switch (field) {
10302
      case ORDER_ID:
10303
        return isSetOrderId();
10304
      case JACKET_NUMBER:
10305
        return isSetJacketNumber();
10306
      }
10307
      throw new IllegalStateException();
10308
    }
10309
 
10310
    public boolean isSet(int fieldID) {
10311
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10312
    }
10313
 
10314
    @Override
10315
    public boolean equals(Object that) {
10316
      if (that == null)
10317
        return false;
10318
      if (that instanceof addJacketNumber_args)
10319
        return this.equals((addJacketNumber_args)that);
10320
      return false;
10321
    }
10322
 
10323
    public boolean equals(addJacketNumber_args that) {
10324
      if (that == null)
10325
        return false;
10326
 
10327
      boolean this_present_orderId = true;
10328
      boolean that_present_orderId = true;
10329
      if (this_present_orderId || that_present_orderId) {
10330
        if (!(this_present_orderId && that_present_orderId))
10331
          return false;
10332
        if (this.orderId != that.orderId)
10333
          return false;
10334
      }
10335
 
10336
      boolean this_present_jacketNumber = true;
10337
      boolean that_present_jacketNumber = true;
10338
      if (this_present_jacketNumber || that_present_jacketNumber) {
10339
        if (!(this_present_jacketNumber && that_present_jacketNumber))
10340
          return false;
10341
        if (this.jacketNumber != that.jacketNumber)
10342
          return false;
10343
      }
10344
 
10345
      return true;
10346
    }
10347
 
10348
    @Override
10349
    public int hashCode() {
10350
      return 0;
10351
    }
10352
 
10353
    public int compareTo(addJacketNumber_args other) {
10354
      if (!getClass().equals(other.getClass())) {
10355
        return getClass().getName().compareTo(other.getClass().getName());
10356
      }
10357
 
10358
      int lastComparison = 0;
10359
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
10360
 
10361
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10362
      if (lastComparison != 0) {
10363
        return lastComparison;
10364
      }
10365
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10366
      if (lastComparison != 0) {
10367
        return lastComparison;
10368
      }
10369
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
10370
      if (lastComparison != 0) {
10371
        return lastComparison;
10372
      }
10373
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
10374
      if (lastComparison != 0) {
10375
        return lastComparison;
10376
      }
10377
      return 0;
10378
    }
10379
 
10380
    public void read(TProtocol iprot) throws TException {
10381
      TField field;
10382
      iprot.readStructBegin();
10383
      while (true)
10384
      {
10385
        field = iprot.readFieldBegin();
10386
        if (field.type == TType.STOP) { 
10387
          break;
10388
        }
10389
        _Fields fieldId = _Fields.findByThriftId(field.id);
10390
        if (fieldId == null) {
10391
          TProtocolUtil.skip(iprot, field.type);
10392
        } else {
10393
          switch (fieldId) {
10394
            case ORDER_ID:
10395
              if (field.type == TType.I64) {
10396
                this.orderId = iprot.readI64();
10397
                setOrderIdIsSet(true);
10398
              } else { 
10399
                TProtocolUtil.skip(iprot, field.type);
10400
              }
10401
              break;
10402
            case JACKET_NUMBER:
10403
              if (field.type == TType.I64) {
10404
                this.jacketNumber = iprot.readI64();
10405
                setJacketNumberIsSet(true);
10406
              } else { 
10407
                TProtocolUtil.skip(iprot, field.type);
10408
              }
10409
              break;
10410
          }
10411
          iprot.readFieldEnd();
10412
        }
10413
      }
10414
      iprot.readStructEnd();
10415
      validate();
10416
    }
10417
 
10418
    public void write(TProtocol oprot) throws TException {
10419
      validate();
10420
 
10421
      oprot.writeStructBegin(STRUCT_DESC);
10422
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10423
      oprot.writeI64(this.orderId);
10424
      oprot.writeFieldEnd();
10425
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
10426
      oprot.writeI64(this.jacketNumber);
10427
      oprot.writeFieldEnd();
10428
      oprot.writeFieldStop();
10429
      oprot.writeStructEnd();
10430
    }
10431
 
10432
    @Override
10433
    public String toString() {
10434
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
10435
      boolean first = true;
10436
 
10437
      sb.append("orderId:");
10438
      sb.append(this.orderId);
10439
      first = false;
10440
      if (!first) sb.append(", ");
10441
      sb.append("jacketNumber:");
10442
      sb.append(this.jacketNumber);
10443
      first = false;
10444
      sb.append(")");
10445
      return sb.toString();
10446
    }
10447
 
10448
    public void validate() throws TException {
10449
      // check for required fields
10450
    }
10451
 
10452
  }
10453
 
10454
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
10455
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
10456
 
10457
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10458
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10459
 
10460
    private boolean success;
10461
    private TransactionServiceException ex;
10462
 
10463
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10464
    public enum _Fields implements TFieldIdEnum {
10465
      SUCCESS((short)0, "success"),
10466
      EX((short)1, "ex");
10467
 
10468
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10469
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10470
 
10471
      static {
10472
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10473
          byId.put((int)field._thriftId, field);
10474
          byName.put(field.getFieldName(), field);
10475
        }
10476
      }
10477
 
10478
      /**
10479
       * Find the _Fields constant that matches fieldId, or null if its not found.
10480
       */
10481
      public static _Fields findByThriftId(int fieldId) {
10482
        return byId.get(fieldId);
10483
      }
10484
 
10485
      /**
10486
       * Find the _Fields constant that matches fieldId, throwing an exception
10487
       * if it is not found.
10488
       */
10489
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10490
        _Fields fields = findByThriftId(fieldId);
10491
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10492
        return fields;
10493
      }
10494
 
10495
      /**
10496
       * Find the _Fields constant that matches name, or null if its not found.
10497
       */
10498
      public static _Fields findByName(String name) {
10499
        return byName.get(name);
10500
      }
10501
 
10502
      private final short _thriftId;
10503
      private final String _fieldName;
10504
 
10505
      _Fields(short thriftId, String fieldName) {
10506
        _thriftId = thriftId;
10507
        _fieldName = fieldName;
10508
      }
10509
 
10510
      public short getThriftFieldId() {
10511
        return _thriftId;
10512
      }
10513
 
10514
      public String getFieldName() {
10515
        return _fieldName;
10516
      }
10517
    }
10518
 
10519
    // isset id assignments
10520
    private static final int __SUCCESS_ISSET_ID = 0;
10521
    private BitSet __isset_bit_vector = new BitSet(1);
10522
 
10523
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10524
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10525
          new FieldValueMetaData(TType.BOOL)));
10526
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10527
          new FieldValueMetaData(TType.STRUCT)));
10528
    }});
10529
 
10530
    static {
10531
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
10532
    }
10533
 
10534
    public addJacketNumber_result() {
10535
    }
10536
 
10537
    public addJacketNumber_result(
10538
      boolean success,
10539
      TransactionServiceException ex)
10540
    {
10541
      this();
10542
      this.success = success;
10543
      setSuccessIsSet(true);
10544
      this.ex = ex;
10545
    }
10546
 
10547
    /**
10548
     * Performs a deep copy on <i>other</i>.
10549
     */
10550
    public addJacketNumber_result(addJacketNumber_result other) {
10551
      __isset_bit_vector.clear();
10552
      __isset_bit_vector.or(other.__isset_bit_vector);
10553
      this.success = other.success;
10554
      if (other.isSetEx()) {
10555
        this.ex = new TransactionServiceException(other.ex);
10556
      }
10557
    }
10558
 
10559
    public addJacketNumber_result deepCopy() {
10560
      return new addJacketNumber_result(this);
10561
    }
10562
 
10563
    @Deprecated
10564
    public addJacketNumber_result clone() {
10565
      return new addJacketNumber_result(this);
10566
    }
10567
 
10568
    public boolean isSuccess() {
10569
      return this.success;
10570
    }
10571
 
10572
    public addJacketNumber_result setSuccess(boolean success) {
10573
      this.success = success;
10574
      setSuccessIsSet(true);
10575
      return this;
10576
    }
10577
 
10578
    public void unsetSuccess() {
10579
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10580
    }
10581
 
10582
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10583
    public boolean isSetSuccess() {
10584
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10585
    }
10586
 
10587
    public void setSuccessIsSet(boolean value) {
10588
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10589
    }
10590
 
10591
    public TransactionServiceException getEx() {
10592
      return this.ex;
10593
    }
10594
 
10595
    public addJacketNumber_result setEx(TransactionServiceException ex) {
10596
      this.ex = ex;
10597
      return this;
10598
    }
10599
 
10600
    public void unsetEx() {
10601
      this.ex = null;
10602
    }
10603
 
10604
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10605
    public boolean isSetEx() {
10606
      return this.ex != null;
10607
    }
10608
 
10609
    public void setExIsSet(boolean value) {
10610
      if (!value) {
10611
        this.ex = null;
10612
      }
10613
    }
10614
 
10615
    public void setFieldValue(_Fields field, Object value) {
10616
      switch (field) {
10617
      case SUCCESS:
10618
        if (value == null) {
10619
          unsetSuccess();
10620
        } else {
10621
          setSuccess((Boolean)value);
10622
        }
10623
        break;
10624
 
10625
      case EX:
10626
        if (value == null) {
10627
          unsetEx();
10628
        } else {
10629
          setEx((TransactionServiceException)value);
10630
        }
10631
        break;
10632
 
10633
      }
10634
    }
10635
 
10636
    public void setFieldValue(int fieldID, Object value) {
10637
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10638
    }
10639
 
10640
    public Object getFieldValue(_Fields field) {
10641
      switch (field) {
10642
      case SUCCESS:
10643
        return new Boolean(isSuccess());
10644
 
10645
      case EX:
10646
        return getEx();
10647
 
10648
      }
10649
      throw new IllegalStateException();
10650
    }
10651
 
10652
    public Object getFieldValue(int fieldId) {
10653
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10654
    }
10655
 
10656
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10657
    public boolean isSet(_Fields field) {
10658
      switch (field) {
10659
      case SUCCESS:
10660
        return isSetSuccess();
10661
      case EX:
10662
        return isSetEx();
10663
      }
10664
      throw new IllegalStateException();
10665
    }
10666
 
10667
    public boolean isSet(int fieldID) {
10668
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10669
    }
10670
 
10671
    @Override
10672
    public boolean equals(Object that) {
10673
      if (that == null)
10674
        return false;
10675
      if (that instanceof addJacketNumber_result)
10676
        return this.equals((addJacketNumber_result)that);
10677
      return false;
10678
    }
10679
 
10680
    public boolean equals(addJacketNumber_result that) {
10681
      if (that == null)
10682
        return false;
10683
 
10684
      boolean this_present_success = true;
10685
      boolean that_present_success = true;
10686
      if (this_present_success || that_present_success) {
10687
        if (!(this_present_success && that_present_success))
10688
          return false;
10689
        if (this.success != that.success)
10690
          return false;
10691
      }
10692
 
10693
      boolean this_present_ex = true && this.isSetEx();
10694
      boolean that_present_ex = true && that.isSetEx();
10695
      if (this_present_ex || that_present_ex) {
10696
        if (!(this_present_ex && that_present_ex))
10697
          return false;
10698
        if (!this.ex.equals(that.ex))
10699
          return false;
10700
      }
10701
 
10702
      return true;
10703
    }
10704
 
10705
    @Override
10706
    public int hashCode() {
10707
      return 0;
10708
    }
10709
 
10710
    public int compareTo(addJacketNumber_result other) {
10711
      if (!getClass().equals(other.getClass())) {
10712
        return getClass().getName().compareTo(other.getClass().getName());
10713
      }
10714
 
10715
      int lastComparison = 0;
10716
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
10717
 
10718
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10719
      if (lastComparison != 0) {
10720
        return lastComparison;
10721
      }
10722
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10723
      if (lastComparison != 0) {
10724
        return lastComparison;
10725
      }
10726
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10727
      if (lastComparison != 0) {
10728
        return lastComparison;
10729
      }
10730
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10731
      if (lastComparison != 0) {
10732
        return lastComparison;
10733
      }
10734
      return 0;
10735
    }
10736
 
10737
    public void read(TProtocol iprot) throws TException {
10738
      TField field;
10739
      iprot.readStructBegin();
10740
      while (true)
10741
      {
10742
        field = iprot.readFieldBegin();
10743
        if (field.type == TType.STOP) { 
10744
          break;
10745
        }
10746
        _Fields fieldId = _Fields.findByThriftId(field.id);
10747
        if (fieldId == null) {
10748
          TProtocolUtil.skip(iprot, field.type);
10749
        } else {
10750
          switch (fieldId) {
10751
            case SUCCESS:
10752
              if (field.type == TType.BOOL) {
10753
                this.success = iprot.readBool();
10754
                setSuccessIsSet(true);
10755
              } else { 
10756
                TProtocolUtil.skip(iprot, field.type);
10757
              }
10758
              break;
10759
            case EX:
10760
              if (field.type == TType.STRUCT) {
10761
                this.ex = new TransactionServiceException();
10762
                this.ex.read(iprot);
10763
              } else { 
10764
                TProtocolUtil.skip(iprot, field.type);
10765
              }
10766
              break;
10767
          }
10768
          iprot.readFieldEnd();
10769
        }
10770
      }
10771
      iprot.readStructEnd();
10772
      validate();
10773
    }
10774
 
10775
    public void write(TProtocol oprot) throws TException {
10776
      oprot.writeStructBegin(STRUCT_DESC);
10777
 
10778
      if (this.isSetSuccess()) {
10779
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10780
        oprot.writeBool(this.success);
10781
        oprot.writeFieldEnd();
10782
      } else if (this.isSetEx()) {
10783
        oprot.writeFieldBegin(EX_FIELD_DESC);
10784
        this.ex.write(oprot);
10785
        oprot.writeFieldEnd();
10786
      }
10787
      oprot.writeFieldStop();
10788
      oprot.writeStructEnd();
10789
    }
10790
 
10791
    @Override
10792
    public String toString() {
10793
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
10794
      boolean first = true;
10795
 
10796
      sb.append("success:");
10797
      sb.append(this.success);
10798
      first = false;
10799
      if (!first) sb.append(", ");
10800
      sb.append("ex:");
10801
      if (this.ex == null) {
10802
        sb.append("null");
10803
      } else {
10804
        sb.append(this.ex);
10805
      }
10806
      first = false;
10807
      sb.append(")");
10808
      return sb.toString();
10809
    }
10810
 
10811
    public void validate() throws TException {
10812
      // check for required fields
10813
    }
10814
 
10815
  }
10816
 
923 rajveer 10817
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
10818
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
10819
 
10820
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10821
 
10822
    private long orderId;
10823
 
10824
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10825
    public enum _Fields implements TFieldIdEnum {
10826
      ORDER_ID((short)1, "orderId");
10827
 
10828
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10829
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10830
 
10831
      static {
10832
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10833
          byId.put((int)field._thriftId, field);
10834
          byName.put(field.getFieldName(), field);
10835
        }
10836
      }
10837
 
10838
      /**
10839
       * Find the _Fields constant that matches fieldId, or null if its not found.
10840
       */
10841
      public static _Fields findByThriftId(int fieldId) {
10842
        return byId.get(fieldId);
10843
      }
10844
 
10845
      /**
10846
       * Find the _Fields constant that matches fieldId, throwing an exception
10847
       * if it is not found.
10848
       */
10849
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10850
        _Fields fields = findByThriftId(fieldId);
10851
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10852
        return fields;
10853
      }
10854
 
10855
      /**
10856
       * Find the _Fields constant that matches name, or null if its not found.
10857
       */
10858
      public static _Fields findByName(String name) {
10859
        return byName.get(name);
10860
      }
10861
 
10862
      private final short _thriftId;
10863
      private final String _fieldName;
10864
 
10865
      _Fields(short thriftId, String fieldName) {
10866
        _thriftId = thriftId;
10867
        _fieldName = fieldName;
10868
      }
10869
 
10870
      public short getThriftFieldId() {
10871
        return _thriftId;
10872
      }
10873
 
10874
      public String getFieldName() {
10875
        return _fieldName;
10876
      }
10877
    }
10878
 
10879
    // isset id assignments
10880
    private static final int __ORDERID_ISSET_ID = 0;
10881
    private BitSet __isset_bit_vector = new BitSet(1);
10882
 
10883
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10884
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10885
          new FieldValueMetaData(TType.I64)));
10886
    }});
10887
 
10888
    static {
10889
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
10890
    }
10891
 
10892
    public acceptOrder_args() {
10893
    }
10894
 
10895
    public acceptOrder_args(
10896
      long orderId)
10897
    {
10898
      this();
10899
      this.orderId = orderId;
10900
      setOrderIdIsSet(true);
10901
    }
10902
 
10903
    /**
10904
     * Performs a deep copy on <i>other</i>.
10905
     */
10906
    public acceptOrder_args(acceptOrder_args other) {
10907
      __isset_bit_vector.clear();
10908
      __isset_bit_vector.or(other.__isset_bit_vector);
10909
      this.orderId = other.orderId;
10910
    }
10911
 
10912
    public acceptOrder_args deepCopy() {
10913
      return new acceptOrder_args(this);
10914
    }
10915
 
10916
    @Deprecated
10917
    public acceptOrder_args clone() {
10918
      return new acceptOrder_args(this);
10919
    }
10920
 
10921
    public long getOrderId() {
10922
      return this.orderId;
10923
    }
10924
 
10925
    public acceptOrder_args setOrderId(long orderId) {
10926
      this.orderId = orderId;
10927
      setOrderIdIsSet(true);
10928
      return this;
10929
    }
10930
 
10931
    public void unsetOrderId() {
10932
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10933
    }
10934
 
10935
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10936
    public boolean isSetOrderId() {
10937
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10938
    }
10939
 
10940
    public void setOrderIdIsSet(boolean value) {
10941
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10942
    }
10943
 
10944
    public void setFieldValue(_Fields field, Object value) {
10945
      switch (field) {
10946
      case ORDER_ID:
10947
        if (value == null) {
10948
          unsetOrderId();
10949
        } else {
10950
          setOrderId((Long)value);
10951
        }
10952
        break;
10953
 
10954
      }
10955
    }
10956
 
10957
    public void setFieldValue(int fieldID, Object value) {
10958
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10959
    }
10960
 
10961
    public Object getFieldValue(_Fields field) {
10962
      switch (field) {
10963
      case ORDER_ID:
10964
        return new Long(getOrderId());
10965
 
10966
      }
10967
      throw new IllegalStateException();
10968
    }
10969
 
10970
    public Object getFieldValue(int fieldId) {
10971
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10972
    }
10973
 
10974
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10975
    public boolean isSet(_Fields field) {
10976
      switch (field) {
10977
      case ORDER_ID:
10978
        return isSetOrderId();
10979
      }
10980
      throw new IllegalStateException();
10981
    }
10982
 
10983
    public boolean isSet(int fieldID) {
10984
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10985
    }
10986
 
10987
    @Override
10988
    public boolean equals(Object that) {
10989
      if (that == null)
10990
        return false;
10991
      if (that instanceof acceptOrder_args)
10992
        return this.equals((acceptOrder_args)that);
10993
      return false;
10994
    }
10995
 
10996
    public boolean equals(acceptOrder_args that) {
10997
      if (that == null)
10998
        return false;
10999
 
11000
      boolean this_present_orderId = true;
11001
      boolean that_present_orderId = true;
11002
      if (this_present_orderId || that_present_orderId) {
11003
        if (!(this_present_orderId && that_present_orderId))
11004
          return false;
11005
        if (this.orderId != that.orderId)
11006
          return false;
11007
      }
11008
 
11009
      return true;
11010
    }
11011
 
11012
    @Override
11013
    public int hashCode() {
11014
      return 0;
11015
    }
11016
 
11017
    public int compareTo(acceptOrder_args other) {
11018
      if (!getClass().equals(other.getClass())) {
11019
        return getClass().getName().compareTo(other.getClass().getName());
11020
      }
11021
 
11022
      int lastComparison = 0;
11023
      acceptOrder_args typedOther = (acceptOrder_args)other;
11024
 
11025
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11026
      if (lastComparison != 0) {
11027
        return lastComparison;
11028
      }
11029
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11030
      if (lastComparison != 0) {
11031
        return lastComparison;
11032
      }
11033
      return 0;
11034
    }
11035
 
11036
    public void read(TProtocol iprot) throws TException {
11037
      TField field;
11038
      iprot.readStructBegin();
11039
      while (true)
11040
      {
11041
        field = iprot.readFieldBegin();
11042
        if (field.type == TType.STOP) { 
11043
          break;
11044
        }
11045
        _Fields fieldId = _Fields.findByThriftId(field.id);
11046
        if (fieldId == null) {
11047
          TProtocolUtil.skip(iprot, field.type);
11048
        } else {
11049
          switch (fieldId) {
11050
            case ORDER_ID:
11051
              if (field.type == TType.I64) {
11052
                this.orderId = iprot.readI64();
11053
                setOrderIdIsSet(true);
11054
              } else { 
11055
                TProtocolUtil.skip(iprot, field.type);
11056
              }
11057
              break;
11058
          }
11059
          iprot.readFieldEnd();
11060
        }
11061
      }
11062
      iprot.readStructEnd();
11063
      validate();
11064
    }
11065
 
11066
    public void write(TProtocol oprot) throws TException {
11067
      validate();
11068
 
11069
      oprot.writeStructBegin(STRUCT_DESC);
11070
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11071
      oprot.writeI64(this.orderId);
11072
      oprot.writeFieldEnd();
11073
      oprot.writeFieldStop();
11074
      oprot.writeStructEnd();
11075
    }
11076
 
11077
    @Override
11078
    public String toString() {
11079
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
11080
      boolean first = true;
11081
 
11082
      sb.append("orderId:");
11083
      sb.append(this.orderId);
11084
      first = false;
11085
      sb.append(")");
11086
      return sb.toString();
11087
    }
11088
 
11089
    public void validate() throws TException {
11090
      // check for required fields
11091
    }
11092
 
11093
  }
11094
 
11095
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
11096
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
11097
 
11098
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11099
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11100
 
11101
    private boolean success;
11102
    private TransactionServiceException ex;
11103
 
11104
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11105
    public enum _Fields implements TFieldIdEnum {
11106
      SUCCESS((short)0, "success"),
11107
      EX((short)1, "ex");
11108
 
11109
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11110
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11111
 
11112
      static {
11113
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11114
          byId.put((int)field._thriftId, field);
11115
          byName.put(field.getFieldName(), field);
11116
        }
11117
      }
11118
 
11119
      /**
11120
       * Find the _Fields constant that matches fieldId, or null if its not found.
11121
       */
11122
      public static _Fields findByThriftId(int fieldId) {
11123
        return byId.get(fieldId);
11124
      }
11125
 
11126
      /**
11127
       * Find the _Fields constant that matches fieldId, throwing an exception
11128
       * if it is not found.
11129
       */
11130
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11131
        _Fields fields = findByThriftId(fieldId);
11132
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11133
        return fields;
11134
      }
11135
 
11136
      /**
11137
       * Find the _Fields constant that matches name, or null if its not found.
11138
       */
11139
      public static _Fields findByName(String name) {
11140
        return byName.get(name);
11141
      }
11142
 
11143
      private final short _thriftId;
11144
      private final String _fieldName;
11145
 
11146
      _Fields(short thriftId, String fieldName) {
11147
        _thriftId = thriftId;
11148
        _fieldName = fieldName;
11149
      }
11150
 
11151
      public short getThriftFieldId() {
11152
        return _thriftId;
11153
      }
11154
 
11155
      public String getFieldName() {
11156
        return _fieldName;
11157
      }
11158
    }
11159
 
11160
    // isset id assignments
11161
    private static final int __SUCCESS_ISSET_ID = 0;
11162
    private BitSet __isset_bit_vector = new BitSet(1);
11163
 
11164
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11165
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11166
          new FieldValueMetaData(TType.BOOL)));
11167
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11168
          new FieldValueMetaData(TType.STRUCT)));
11169
    }});
11170
 
11171
    static {
11172
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
11173
    }
11174
 
11175
    public acceptOrder_result() {
11176
    }
11177
 
11178
    public acceptOrder_result(
11179
      boolean success,
11180
      TransactionServiceException ex)
11181
    {
11182
      this();
11183
      this.success = success;
11184
      setSuccessIsSet(true);
11185
      this.ex = ex;
11186
    }
11187
 
11188
    /**
11189
     * Performs a deep copy on <i>other</i>.
11190
     */
11191
    public acceptOrder_result(acceptOrder_result other) {
11192
      __isset_bit_vector.clear();
11193
      __isset_bit_vector.or(other.__isset_bit_vector);
11194
      this.success = other.success;
11195
      if (other.isSetEx()) {
11196
        this.ex = new TransactionServiceException(other.ex);
11197
      }
11198
    }
11199
 
11200
    public acceptOrder_result deepCopy() {
11201
      return new acceptOrder_result(this);
11202
    }
11203
 
11204
    @Deprecated
11205
    public acceptOrder_result clone() {
11206
      return new acceptOrder_result(this);
11207
    }
11208
 
11209
    public boolean isSuccess() {
11210
      return this.success;
11211
    }
11212
 
11213
    public acceptOrder_result setSuccess(boolean success) {
11214
      this.success = success;
11215
      setSuccessIsSet(true);
11216
      return this;
11217
    }
11218
 
11219
    public void unsetSuccess() {
11220
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11221
    }
11222
 
11223
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11224
    public boolean isSetSuccess() {
11225
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11226
    }
11227
 
11228
    public void setSuccessIsSet(boolean value) {
11229
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11230
    }
11231
 
11232
    public TransactionServiceException getEx() {
11233
      return this.ex;
11234
    }
11235
 
11236
    public acceptOrder_result setEx(TransactionServiceException ex) {
11237
      this.ex = ex;
11238
      return this;
11239
    }
11240
 
11241
    public void unsetEx() {
11242
      this.ex = null;
11243
    }
11244
 
11245
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11246
    public boolean isSetEx() {
11247
      return this.ex != null;
11248
    }
11249
 
11250
    public void setExIsSet(boolean value) {
11251
      if (!value) {
11252
        this.ex = null;
11253
      }
11254
    }
11255
 
11256
    public void setFieldValue(_Fields field, Object value) {
11257
      switch (field) {
11258
      case SUCCESS:
11259
        if (value == null) {
11260
          unsetSuccess();
11261
        } else {
11262
          setSuccess((Boolean)value);
11263
        }
11264
        break;
11265
 
11266
      case EX:
11267
        if (value == null) {
11268
          unsetEx();
11269
        } else {
11270
          setEx((TransactionServiceException)value);
11271
        }
11272
        break;
11273
 
11274
      }
11275
    }
11276
 
11277
    public void setFieldValue(int fieldID, Object value) {
11278
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11279
    }
11280
 
11281
    public Object getFieldValue(_Fields field) {
11282
      switch (field) {
11283
      case SUCCESS:
11284
        return new Boolean(isSuccess());
11285
 
11286
      case EX:
11287
        return getEx();
11288
 
11289
      }
11290
      throw new IllegalStateException();
11291
    }
11292
 
11293
    public Object getFieldValue(int fieldId) {
11294
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11295
    }
11296
 
11297
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11298
    public boolean isSet(_Fields field) {
11299
      switch (field) {
11300
      case SUCCESS:
11301
        return isSetSuccess();
11302
      case EX:
11303
        return isSetEx();
11304
      }
11305
      throw new IllegalStateException();
11306
    }
11307
 
11308
    public boolean isSet(int fieldID) {
11309
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11310
    }
11311
 
11312
    @Override
11313
    public boolean equals(Object that) {
11314
      if (that == null)
11315
        return false;
11316
      if (that instanceof acceptOrder_result)
11317
        return this.equals((acceptOrder_result)that);
11318
      return false;
11319
    }
11320
 
11321
    public boolean equals(acceptOrder_result that) {
11322
      if (that == null)
11323
        return false;
11324
 
11325
      boolean this_present_success = true;
11326
      boolean that_present_success = true;
11327
      if (this_present_success || that_present_success) {
11328
        if (!(this_present_success && that_present_success))
11329
          return false;
11330
        if (this.success != that.success)
11331
          return false;
11332
      }
11333
 
11334
      boolean this_present_ex = true && this.isSetEx();
11335
      boolean that_present_ex = true && that.isSetEx();
11336
      if (this_present_ex || that_present_ex) {
11337
        if (!(this_present_ex && that_present_ex))
11338
          return false;
11339
        if (!this.ex.equals(that.ex))
11340
          return false;
11341
      }
11342
 
11343
      return true;
11344
    }
11345
 
11346
    @Override
11347
    public int hashCode() {
11348
      return 0;
11349
    }
11350
 
11351
    public int compareTo(acceptOrder_result other) {
11352
      if (!getClass().equals(other.getClass())) {
11353
        return getClass().getName().compareTo(other.getClass().getName());
11354
      }
11355
 
11356
      int lastComparison = 0;
11357
      acceptOrder_result typedOther = (acceptOrder_result)other;
11358
 
11359
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11360
      if (lastComparison != 0) {
11361
        return lastComparison;
11362
      }
11363
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11364
      if (lastComparison != 0) {
11365
        return lastComparison;
11366
      }
11367
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11368
      if (lastComparison != 0) {
11369
        return lastComparison;
11370
      }
11371
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11372
      if (lastComparison != 0) {
11373
        return lastComparison;
11374
      }
11375
      return 0;
11376
    }
11377
 
11378
    public void read(TProtocol iprot) throws TException {
11379
      TField field;
11380
      iprot.readStructBegin();
11381
      while (true)
11382
      {
11383
        field = iprot.readFieldBegin();
11384
        if (field.type == TType.STOP) { 
11385
          break;
11386
        }
11387
        _Fields fieldId = _Fields.findByThriftId(field.id);
11388
        if (fieldId == null) {
11389
          TProtocolUtil.skip(iprot, field.type);
11390
        } else {
11391
          switch (fieldId) {
11392
            case SUCCESS:
11393
              if (field.type == TType.BOOL) {
11394
                this.success = iprot.readBool();
11395
                setSuccessIsSet(true);
11396
              } else { 
11397
                TProtocolUtil.skip(iprot, field.type);
11398
              }
11399
              break;
11400
            case EX:
11401
              if (field.type == TType.STRUCT) {
11402
                this.ex = new TransactionServiceException();
11403
                this.ex.read(iprot);
11404
              } else { 
11405
                TProtocolUtil.skip(iprot, field.type);
11406
              }
11407
              break;
11408
          }
11409
          iprot.readFieldEnd();
11410
        }
11411
      }
11412
      iprot.readStructEnd();
11413
      validate();
11414
    }
11415
 
11416
    public void write(TProtocol oprot) throws TException {
11417
      oprot.writeStructBegin(STRUCT_DESC);
11418
 
11419
      if (this.isSetSuccess()) {
11420
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11421
        oprot.writeBool(this.success);
11422
        oprot.writeFieldEnd();
11423
      } else if (this.isSetEx()) {
11424
        oprot.writeFieldBegin(EX_FIELD_DESC);
11425
        this.ex.write(oprot);
11426
        oprot.writeFieldEnd();
11427
      }
11428
      oprot.writeFieldStop();
11429
      oprot.writeStructEnd();
11430
    }
11431
 
11432
    @Override
11433
    public String toString() {
11434
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
11435
      boolean first = true;
11436
 
11437
      sb.append("success:");
11438
      sb.append(this.success);
11439
      first = false;
11440
      if (!first) sb.append(", ");
11441
      sb.append("ex:");
11442
      if (this.ex == null) {
11443
        sb.append("null");
11444
      } else {
11445
        sb.append(this.ex);
11446
      }
11447
      first = false;
11448
      sb.append(")");
11449
      return sb.toString();
11450
    }
11451
 
11452
    public void validate() throws TException {
11453
      // check for required fields
11454
    }
11455
 
11456
  }
11457
 
11458
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
11459
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
11460
 
11461
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11462
 
11463
    private long orderId;
11464
 
11465
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11466
    public enum _Fields implements TFieldIdEnum {
11467
      ORDER_ID((short)1, "orderId");
11468
 
11469
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11470
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11471
 
11472
      static {
11473
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11474
          byId.put((int)field._thriftId, field);
11475
          byName.put(field.getFieldName(), field);
11476
        }
11477
      }
11478
 
11479
      /**
11480
       * Find the _Fields constant that matches fieldId, or null if its not found.
11481
       */
11482
      public static _Fields findByThriftId(int fieldId) {
11483
        return byId.get(fieldId);
11484
      }
11485
 
11486
      /**
11487
       * Find the _Fields constant that matches fieldId, throwing an exception
11488
       * if it is not found.
11489
       */
11490
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11491
        _Fields fields = findByThriftId(fieldId);
11492
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11493
        return fields;
11494
      }
11495
 
11496
      /**
11497
       * Find the _Fields constant that matches name, or null if its not found.
11498
       */
11499
      public static _Fields findByName(String name) {
11500
        return byName.get(name);
11501
      }
11502
 
11503
      private final short _thriftId;
11504
      private final String _fieldName;
11505
 
11506
      _Fields(short thriftId, String fieldName) {
11507
        _thriftId = thriftId;
11508
        _fieldName = fieldName;
11509
      }
11510
 
11511
      public short getThriftFieldId() {
11512
        return _thriftId;
11513
      }
11514
 
11515
      public String getFieldName() {
11516
        return _fieldName;
11517
      }
11518
    }
11519
 
11520
    // isset id assignments
11521
    private static final int __ORDERID_ISSET_ID = 0;
11522
    private BitSet __isset_bit_vector = new BitSet(1);
11523
 
11524
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11525
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
11526
          new FieldValueMetaData(TType.I64)));
11527
    }});
11528
 
11529
    static {
11530
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
11531
    }
11532
 
11533
    public billOrder_args() {
11534
    }
11535
 
11536
    public billOrder_args(
11537
      long orderId)
11538
    {
11539
      this();
11540
      this.orderId = orderId;
11541
      setOrderIdIsSet(true);
11542
    }
11543
 
11544
    /**
11545
     * Performs a deep copy on <i>other</i>.
11546
     */
11547
    public billOrder_args(billOrder_args other) {
11548
      __isset_bit_vector.clear();
11549
      __isset_bit_vector.or(other.__isset_bit_vector);
11550
      this.orderId = other.orderId;
11551
    }
11552
 
11553
    public billOrder_args deepCopy() {
11554
      return new billOrder_args(this);
11555
    }
11556
 
11557
    @Deprecated
11558
    public billOrder_args clone() {
11559
      return new billOrder_args(this);
11560
    }
11561
 
11562
    public long getOrderId() {
11563
      return this.orderId;
11564
    }
11565
 
11566
    public billOrder_args setOrderId(long orderId) {
11567
      this.orderId = orderId;
11568
      setOrderIdIsSet(true);
11569
      return this;
11570
    }
11571
 
11572
    public void unsetOrderId() {
11573
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11574
    }
11575
 
11576
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11577
    public boolean isSetOrderId() {
11578
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11579
    }
11580
 
11581
    public void setOrderIdIsSet(boolean value) {
11582
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11583
    }
11584
 
11585
    public void setFieldValue(_Fields field, Object value) {
11586
      switch (field) {
11587
      case ORDER_ID:
11588
        if (value == null) {
11589
          unsetOrderId();
11590
        } else {
11591
          setOrderId((Long)value);
11592
        }
11593
        break;
11594
 
11595
      }
11596
    }
11597
 
11598
    public void setFieldValue(int fieldID, Object value) {
11599
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11600
    }
11601
 
11602
    public Object getFieldValue(_Fields field) {
11603
      switch (field) {
11604
      case ORDER_ID:
11605
        return new Long(getOrderId());
11606
 
11607
      }
11608
      throw new IllegalStateException();
11609
    }
11610
 
11611
    public Object getFieldValue(int fieldId) {
11612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11613
    }
11614
 
11615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11616
    public boolean isSet(_Fields field) {
11617
      switch (field) {
11618
      case ORDER_ID:
11619
        return isSetOrderId();
11620
      }
11621
      throw new IllegalStateException();
11622
    }
11623
 
11624
    public boolean isSet(int fieldID) {
11625
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11626
    }
11627
 
11628
    @Override
11629
    public boolean equals(Object that) {
11630
      if (that == null)
11631
        return false;
11632
      if (that instanceof billOrder_args)
11633
        return this.equals((billOrder_args)that);
11634
      return false;
11635
    }
11636
 
11637
    public boolean equals(billOrder_args that) {
11638
      if (that == null)
11639
        return false;
11640
 
11641
      boolean this_present_orderId = true;
11642
      boolean that_present_orderId = true;
11643
      if (this_present_orderId || that_present_orderId) {
11644
        if (!(this_present_orderId && that_present_orderId))
11645
          return false;
11646
        if (this.orderId != that.orderId)
11647
          return false;
11648
      }
11649
 
11650
      return true;
11651
    }
11652
 
11653
    @Override
11654
    public int hashCode() {
11655
      return 0;
11656
    }
11657
 
11658
    public int compareTo(billOrder_args other) {
11659
      if (!getClass().equals(other.getClass())) {
11660
        return getClass().getName().compareTo(other.getClass().getName());
11661
      }
11662
 
11663
      int lastComparison = 0;
11664
      billOrder_args typedOther = (billOrder_args)other;
11665
 
11666
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11667
      if (lastComparison != 0) {
11668
        return lastComparison;
11669
      }
11670
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11671
      if (lastComparison != 0) {
11672
        return lastComparison;
11673
      }
11674
      return 0;
11675
    }
11676
 
11677
    public void read(TProtocol iprot) throws TException {
11678
      TField field;
11679
      iprot.readStructBegin();
11680
      while (true)
11681
      {
11682
        field = iprot.readFieldBegin();
11683
        if (field.type == TType.STOP) { 
11684
          break;
11685
        }
11686
        _Fields fieldId = _Fields.findByThriftId(field.id);
11687
        if (fieldId == null) {
11688
          TProtocolUtil.skip(iprot, field.type);
11689
        } else {
11690
          switch (fieldId) {
11691
            case ORDER_ID:
11692
              if (field.type == TType.I64) {
11693
                this.orderId = iprot.readI64();
11694
                setOrderIdIsSet(true);
11695
              } else { 
11696
                TProtocolUtil.skip(iprot, field.type);
11697
              }
11698
              break;
11699
          }
11700
          iprot.readFieldEnd();
11701
        }
11702
      }
11703
      iprot.readStructEnd();
11704
      validate();
11705
    }
11706
 
11707
    public void write(TProtocol oprot) throws TException {
11708
      validate();
11709
 
11710
      oprot.writeStructBegin(STRUCT_DESC);
11711
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11712
      oprot.writeI64(this.orderId);
11713
      oprot.writeFieldEnd();
11714
      oprot.writeFieldStop();
11715
      oprot.writeStructEnd();
11716
    }
11717
 
11718
    @Override
11719
    public String toString() {
11720
      StringBuilder sb = new StringBuilder("billOrder_args(");
11721
      boolean first = true;
11722
 
11723
      sb.append("orderId:");
11724
      sb.append(this.orderId);
11725
      first = false;
11726
      sb.append(")");
11727
      return sb.toString();
11728
    }
11729
 
11730
    public void validate() throws TException {
11731
      // check for required fields
11732
    }
11733
 
11734
  }
11735
 
11736
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
11737
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
11738
 
11739
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11740
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11741
 
11742
    private boolean success;
11743
    private TransactionServiceException ex;
11744
 
11745
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11746
    public enum _Fields implements TFieldIdEnum {
11747
      SUCCESS((short)0, "success"),
11748
      EX((short)1, "ex");
11749
 
11750
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11751
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11752
 
11753
      static {
11754
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11755
          byId.put((int)field._thriftId, field);
11756
          byName.put(field.getFieldName(), field);
11757
        }
11758
      }
11759
 
11760
      /**
11761
       * Find the _Fields constant that matches fieldId, or null if its not found.
11762
       */
11763
      public static _Fields findByThriftId(int fieldId) {
11764
        return byId.get(fieldId);
11765
      }
11766
 
11767
      /**
11768
       * Find the _Fields constant that matches fieldId, throwing an exception
11769
       * if it is not found.
11770
       */
11771
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11772
        _Fields fields = findByThriftId(fieldId);
11773
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11774
        return fields;
11775
      }
11776
 
11777
      /**
11778
       * Find the _Fields constant that matches name, or null if its not found.
11779
       */
11780
      public static _Fields findByName(String name) {
11781
        return byName.get(name);
11782
      }
11783
 
11784
      private final short _thriftId;
11785
      private final String _fieldName;
11786
 
11787
      _Fields(short thriftId, String fieldName) {
11788
        _thriftId = thriftId;
11789
        _fieldName = fieldName;
11790
      }
11791
 
11792
      public short getThriftFieldId() {
11793
        return _thriftId;
11794
      }
11795
 
11796
      public String getFieldName() {
11797
        return _fieldName;
11798
      }
11799
    }
11800
 
11801
    // isset id assignments
11802
    private static final int __SUCCESS_ISSET_ID = 0;
11803
    private BitSet __isset_bit_vector = new BitSet(1);
11804
 
11805
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11806
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11807
          new FieldValueMetaData(TType.BOOL)));
11808
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11809
          new FieldValueMetaData(TType.STRUCT)));
11810
    }});
11811
 
11812
    static {
11813
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
11814
    }
11815
 
11816
    public billOrder_result() {
11817
    }
11818
 
11819
    public billOrder_result(
11820
      boolean success,
11821
      TransactionServiceException ex)
11822
    {
11823
      this();
11824
      this.success = success;
11825
      setSuccessIsSet(true);
11826
      this.ex = ex;
11827
    }
11828
 
11829
    /**
11830
     * Performs a deep copy on <i>other</i>.
11831
     */
11832
    public billOrder_result(billOrder_result other) {
11833
      __isset_bit_vector.clear();
11834
      __isset_bit_vector.or(other.__isset_bit_vector);
11835
      this.success = other.success;
11836
      if (other.isSetEx()) {
11837
        this.ex = new TransactionServiceException(other.ex);
11838
      }
11839
    }
11840
 
11841
    public billOrder_result deepCopy() {
11842
      return new billOrder_result(this);
11843
    }
11844
 
11845
    @Deprecated
11846
    public billOrder_result clone() {
11847
      return new billOrder_result(this);
11848
    }
11849
 
11850
    public boolean isSuccess() {
11851
      return this.success;
11852
    }
11853
 
11854
    public billOrder_result setSuccess(boolean success) {
11855
      this.success = success;
11856
      setSuccessIsSet(true);
11857
      return this;
11858
    }
11859
 
11860
    public void unsetSuccess() {
11861
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11862
    }
11863
 
11864
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11865
    public boolean isSetSuccess() {
11866
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11867
    }
11868
 
11869
    public void setSuccessIsSet(boolean value) {
11870
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11871
    }
11872
 
11873
    public TransactionServiceException getEx() {
11874
      return this.ex;
11875
    }
11876
 
11877
    public billOrder_result setEx(TransactionServiceException ex) {
11878
      this.ex = ex;
11879
      return this;
11880
    }
11881
 
11882
    public void unsetEx() {
11883
      this.ex = null;
11884
    }
11885
 
11886
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11887
    public boolean isSetEx() {
11888
      return this.ex != null;
11889
    }
11890
 
11891
    public void setExIsSet(boolean value) {
11892
      if (!value) {
11893
        this.ex = null;
11894
      }
11895
    }
11896
 
11897
    public void setFieldValue(_Fields field, Object value) {
11898
      switch (field) {
11899
      case SUCCESS:
11900
        if (value == null) {
11901
          unsetSuccess();
11902
        } else {
11903
          setSuccess((Boolean)value);
11904
        }
11905
        break;
11906
 
11907
      case EX:
11908
        if (value == null) {
11909
          unsetEx();
11910
        } else {
11911
          setEx((TransactionServiceException)value);
11912
        }
11913
        break;
11914
 
11915
      }
11916
    }
11917
 
11918
    public void setFieldValue(int fieldID, Object value) {
11919
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11920
    }
11921
 
11922
    public Object getFieldValue(_Fields field) {
11923
      switch (field) {
11924
      case SUCCESS:
11925
        return new Boolean(isSuccess());
11926
 
11927
      case EX:
11928
        return getEx();
11929
 
11930
      }
11931
      throw new IllegalStateException();
11932
    }
11933
 
11934
    public Object getFieldValue(int fieldId) {
11935
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11936
    }
11937
 
11938
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11939
    public boolean isSet(_Fields field) {
11940
      switch (field) {
11941
      case SUCCESS:
11942
        return isSetSuccess();
11943
      case EX:
11944
        return isSetEx();
11945
      }
11946
      throw new IllegalStateException();
11947
    }
11948
 
11949
    public boolean isSet(int fieldID) {
11950
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11951
    }
11952
 
11953
    @Override
11954
    public boolean equals(Object that) {
11955
      if (that == null)
11956
        return false;
11957
      if (that instanceof billOrder_result)
11958
        return this.equals((billOrder_result)that);
11959
      return false;
11960
    }
11961
 
11962
    public boolean equals(billOrder_result that) {
11963
      if (that == null)
11964
        return false;
11965
 
11966
      boolean this_present_success = true;
11967
      boolean that_present_success = true;
11968
      if (this_present_success || that_present_success) {
11969
        if (!(this_present_success && that_present_success))
11970
          return false;
11971
        if (this.success != that.success)
11972
          return false;
11973
      }
11974
 
11975
      boolean this_present_ex = true && this.isSetEx();
11976
      boolean that_present_ex = true && that.isSetEx();
11977
      if (this_present_ex || that_present_ex) {
11978
        if (!(this_present_ex && that_present_ex))
11979
          return false;
11980
        if (!this.ex.equals(that.ex))
11981
          return false;
11982
      }
11983
 
11984
      return true;
11985
    }
11986
 
11987
    @Override
11988
    public int hashCode() {
11989
      return 0;
11990
    }
11991
 
11992
    public int compareTo(billOrder_result other) {
11993
      if (!getClass().equals(other.getClass())) {
11994
        return getClass().getName().compareTo(other.getClass().getName());
11995
      }
11996
 
11997
      int lastComparison = 0;
11998
      billOrder_result typedOther = (billOrder_result)other;
11999
 
12000
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12001
      if (lastComparison != 0) {
12002
        return lastComparison;
12003
      }
12004
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12005
      if (lastComparison != 0) {
12006
        return lastComparison;
12007
      }
12008
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12009
      if (lastComparison != 0) {
12010
        return lastComparison;
12011
      }
12012
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12013
      if (lastComparison != 0) {
12014
        return lastComparison;
12015
      }
12016
      return 0;
12017
    }
12018
 
12019
    public void read(TProtocol iprot) throws TException {
12020
      TField field;
12021
      iprot.readStructBegin();
12022
      while (true)
12023
      {
12024
        field = iprot.readFieldBegin();
12025
        if (field.type == TType.STOP) { 
12026
          break;
12027
        }
12028
        _Fields fieldId = _Fields.findByThriftId(field.id);
12029
        if (fieldId == null) {
12030
          TProtocolUtil.skip(iprot, field.type);
12031
        } else {
12032
          switch (fieldId) {
12033
            case SUCCESS:
12034
              if (field.type == TType.BOOL) {
12035
                this.success = iprot.readBool();
12036
                setSuccessIsSet(true);
12037
              } else { 
12038
                TProtocolUtil.skip(iprot, field.type);
12039
              }
12040
              break;
12041
            case EX:
12042
              if (field.type == TType.STRUCT) {
12043
                this.ex = new TransactionServiceException();
12044
                this.ex.read(iprot);
12045
              } else { 
12046
                TProtocolUtil.skip(iprot, field.type);
12047
              }
12048
              break;
12049
          }
12050
          iprot.readFieldEnd();
12051
        }
12052
      }
12053
      iprot.readStructEnd();
12054
      validate();
12055
    }
12056
 
12057
    public void write(TProtocol oprot) throws TException {
12058
      oprot.writeStructBegin(STRUCT_DESC);
12059
 
12060
      if (this.isSetSuccess()) {
12061
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12062
        oprot.writeBool(this.success);
12063
        oprot.writeFieldEnd();
12064
      } else if (this.isSetEx()) {
12065
        oprot.writeFieldBegin(EX_FIELD_DESC);
12066
        this.ex.write(oprot);
12067
        oprot.writeFieldEnd();
12068
      }
12069
      oprot.writeFieldStop();
12070
      oprot.writeStructEnd();
12071
    }
12072
 
12073
    @Override
12074
    public String toString() {
12075
      StringBuilder sb = new StringBuilder("billOrder_result(");
12076
      boolean first = true;
12077
 
12078
      sb.append("success:");
12079
      sb.append(this.success);
12080
      first = false;
12081
      if (!first) sb.append(", ");
12082
      sb.append("ex:");
12083
      if (this.ex == null) {
12084
        sb.append("null");
12085
      } else {
12086
        sb.append(this.ex);
12087
      }
12088
      first = false;
12089
      sb.append(")");
12090
      return sb.toString();
12091
    }
12092
 
12093
    public void validate() throws TException {
12094
      // check for required fields
12095
    }
12096
 
12097
  }
12098
 
483 rajveer 12099
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
12100
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 12101
 
12102
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
12103
 
12104
    private long transactionId;
12105
 
12106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12107
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12108
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 12109
 
12110
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12112
 
12113
      static {
12114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12115
          byId.put((int)field._thriftId, field);
12116
          byName.put(field.getFieldName(), field);
12117
        }
12118
      }
12119
 
12120
      /**
12121
       * Find the _Fields constant that matches fieldId, or null if its not found.
12122
       */
12123
      public static _Fields findByThriftId(int fieldId) {
12124
        return byId.get(fieldId);
12125
      }
12126
 
12127
      /**
12128
       * Find the _Fields constant that matches fieldId, throwing an exception
12129
       * if it is not found.
12130
       */
12131
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12132
        _Fields fields = findByThriftId(fieldId);
12133
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12134
        return fields;
12135
      }
12136
 
12137
      /**
12138
       * Find the _Fields constant that matches name, or null if its not found.
12139
       */
12140
      public static _Fields findByName(String name) {
12141
        return byName.get(name);
12142
      }
12143
 
12144
      private final short _thriftId;
12145
      private final String _fieldName;
12146
 
12147
      _Fields(short thriftId, String fieldName) {
12148
        _thriftId = thriftId;
12149
        _fieldName = fieldName;
12150
      }
12151
 
12152
      public short getThriftFieldId() {
12153
        return _thriftId;
12154
      }
12155
 
12156
      public String getFieldName() {
12157
        return _fieldName;
12158
      }
12159
    }
12160
 
12161
    // isset id assignments
12162
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 12163
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 12164
 
12165
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12166
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12167
          new FieldValueMetaData(TType.I64)));
12168
    }});
12169
 
12170
    static {
483 rajveer 12171
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 12172
    }
12173
 
483 rajveer 12174
    public getOrdersForTransaction_args() {
68 ashish 12175
    }
12176
 
483 rajveer 12177
    public getOrdersForTransaction_args(
12178
      long transactionId)
68 ashish 12179
    {
12180
      this();
12181
      this.transactionId = transactionId;
12182
      setTransactionIdIsSet(true);
12183
    }
12184
 
12185
    /**
12186
     * Performs a deep copy on <i>other</i>.
12187
     */
483 rajveer 12188
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 12189
      __isset_bit_vector.clear();
12190
      __isset_bit_vector.or(other.__isset_bit_vector);
12191
      this.transactionId = other.transactionId;
12192
    }
12193
 
483 rajveer 12194
    public getOrdersForTransaction_args deepCopy() {
12195
      return new getOrdersForTransaction_args(this);
68 ashish 12196
    }
12197
 
12198
    @Deprecated
483 rajveer 12199
    public getOrdersForTransaction_args clone() {
12200
      return new getOrdersForTransaction_args(this);
68 ashish 12201
    }
12202
 
12203
    public long getTransactionId() {
12204
      return this.transactionId;
12205
    }
12206
 
483 rajveer 12207
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 12208
      this.transactionId = transactionId;
12209
      setTransactionIdIsSet(true);
12210
      return this;
12211
    }
12212
 
12213
    public void unsetTransactionId() {
12214
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12215
    }
12216
 
12217
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12218
    public boolean isSetTransactionId() {
12219
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12220
    }
12221
 
12222
    public void setTransactionIdIsSet(boolean value) {
12223
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12224
    }
12225
 
12226
    public void setFieldValue(_Fields field, Object value) {
12227
      switch (field) {
12228
      case TRANSACTION_ID:
12229
        if (value == null) {
12230
          unsetTransactionId();
12231
        } else {
12232
          setTransactionId((Long)value);
12233
        }
12234
        break;
12235
 
12236
      }
12237
    }
12238
 
12239
    public void setFieldValue(int fieldID, Object value) {
12240
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12241
    }
12242
 
12243
    public Object getFieldValue(_Fields field) {
12244
      switch (field) {
12245
      case TRANSACTION_ID:
12246
        return new Long(getTransactionId());
12247
 
12248
      }
12249
      throw new IllegalStateException();
12250
    }
12251
 
12252
    public Object getFieldValue(int fieldId) {
12253
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12254
    }
12255
 
12256
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12257
    public boolean isSet(_Fields field) {
12258
      switch (field) {
12259
      case TRANSACTION_ID:
12260
        return isSetTransactionId();
12261
      }
12262
      throw new IllegalStateException();
12263
    }
12264
 
12265
    public boolean isSet(int fieldID) {
12266
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12267
    }
12268
 
12269
    @Override
12270
    public boolean equals(Object that) {
12271
      if (that == null)
12272
        return false;
483 rajveer 12273
      if (that instanceof getOrdersForTransaction_args)
12274
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 12275
      return false;
12276
    }
12277
 
483 rajveer 12278
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 12279
      if (that == null)
12280
        return false;
12281
 
12282
      boolean this_present_transactionId = true;
12283
      boolean that_present_transactionId = true;
12284
      if (this_present_transactionId || that_present_transactionId) {
12285
        if (!(this_present_transactionId && that_present_transactionId))
12286
          return false;
12287
        if (this.transactionId != that.transactionId)
12288
          return false;
12289
      }
12290
 
12291
      return true;
12292
    }
12293
 
12294
    @Override
12295
    public int hashCode() {
12296
      return 0;
12297
    }
12298
 
483 rajveer 12299
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 12300
      if (!getClass().equals(other.getClass())) {
12301
        return getClass().getName().compareTo(other.getClass().getName());
12302
      }
12303
 
12304
      int lastComparison = 0;
483 rajveer 12305
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 12306
 
12307
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
12308
      if (lastComparison != 0) {
12309
        return lastComparison;
12310
      }
12311
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
12312
      if (lastComparison != 0) {
12313
        return lastComparison;
12314
      }
12315
      return 0;
12316
    }
12317
 
12318
    public void read(TProtocol iprot) throws TException {
12319
      TField field;
12320
      iprot.readStructBegin();
12321
      while (true)
12322
      {
12323
        field = iprot.readFieldBegin();
12324
        if (field.type == TType.STOP) { 
12325
          break;
12326
        }
12327
        _Fields fieldId = _Fields.findByThriftId(field.id);
12328
        if (fieldId == null) {
12329
          TProtocolUtil.skip(iprot, field.type);
12330
        } else {
12331
          switch (fieldId) {
12332
            case TRANSACTION_ID:
12333
              if (field.type == TType.I64) {
12334
                this.transactionId = iprot.readI64();
12335
                setTransactionIdIsSet(true);
12336
              } else { 
12337
                TProtocolUtil.skip(iprot, field.type);
12338
              }
12339
              break;
12340
          }
12341
          iprot.readFieldEnd();
12342
        }
12343
      }
12344
      iprot.readStructEnd();
12345
      validate();
12346
    }
12347
 
12348
    public void write(TProtocol oprot) throws TException {
12349
      validate();
12350
 
12351
      oprot.writeStructBegin(STRUCT_DESC);
12352
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
12353
      oprot.writeI64(this.transactionId);
12354
      oprot.writeFieldEnd();
12355
      oprot.writeFieldStop();
12356
      oprot.writeStructEnd();
12357
    }
12358
 
12359
    @Override
12360
    public String toString() {
483 rajveer 12361
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 12362
      boolean first = true;
12363
 
12364
      sb.append("transactionId:");
12365
      sb.append(this.transactionId);
12366
      first = false;
12367
      sb.append(")");
12368
      return sb.toString();
12369
    }
12370
 
12371
    public void validate() throws TException {
12372
      // check for required fields
12373
    }
12374
 
12375
  }
12376
 
483 rajveer 12377
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
12378
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 12379
 
483 rajveer 12380
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 12381
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12382
 
483 rajveer 12383
    private List<Order> success;
68 ashish 12384
    private TransactionServiceException ex;
12385
 
12386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12387
    public enum _Fields implements TFieldIdEnum {
12388
      SUCCESS((short)0, "success"),
12389
      EX((short)1, "ex");
12390
 
12391
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12392
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12393
 
12394
      static {
12395
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12396
          byId.put((int)field._thriftId, field);
12397
          byName.put(field.getFieldName(), field);
12398
        }
12399
      }
12400
 
12401
      /**
12402
       * Find the _Fields constant that matches fieldId, or null if its not found.
12403
       */
12404
      public static _Fields findByThriftId(int fieldId) {
12405
        return byId.get(fieldId);
12406
      }
12407
 
12408
      /**
12409
       * Find the _Fields constant that matches fieldId, throwing an exception
12410
       * if it is not found.
12411
       */
12412
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12413
        _Fields fields = findByThriftId(fieldId);
12414
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12415
        return fields;
12416
      }
12417
 
12418
      /**
12419
       * Find the _Fields constant that matches name, or null if its not found.
12420
       */
12421
      public static _Fields findByName(String name) {
12422
        return byName.get(name);
12423
      }
12424
 
12425
      private final short _thriftId;
12426
      private final String _fieldName;
12427
 
12428
      _Fields(short thriftId, String fieldName) {
12429
        _thriftId = thriftId;
12430
        _fieldName = fieldName;
12431
      }
12432
 
12433
      public short getThriftFieldId() {
12434
        return _thriftId;
12435
      }
12436
 
12437
      public String getFieldName() {
12438
        return _fieldName;
12439
      }
12440
    }
12441
 
12442
    // isset id assignments
12443
 
12444
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12445
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12446
          new ListMetaData(TType.LIST, 
12447
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 12448
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12449
          new FieldValueMetaData(TType.STRUCT)));
12450
    }});
12451
 
12452
    static {
483 rajveer 12453
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 12454
    }
12455
 
483 rajveer 12456
    public getOrdersForTransaction_result() {
68 ashish 12457
    }
12458
 
483 rajveer 12459
    public getOrdersForTransaction_result(
12460
      List<Order> success,
68 ashish 12461
      TransactionServiceException ex)
12462
    {
12463
      this();
12464
      this.success = success;
12465
      this.ex = ex;
12466
    }
12467
 
12468
    /**
12469
     * Performs a deep copy on <i>other</i>.
12470
     */
483 rajveer 12471
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
12472
      if (other.isSetSuccess()) {
12473
        List<Order> __this__success = new ArrayList<Order>();
12474
        for (Order other_element : other.success) {
12475
          __this__success.add(new Order(other_element));
12476
        }
12477
        this.success = __this__success;
12478
      }
68 ashish 12479
      if (other.isSetEx()) {
12480
        this.ex = new TransactionServiceException(other.ex);
12481
      }
12482
    }
12483
 
483 rajveer 12484
    public getOrdersForTransaction_result deepCopy() {
12485
      return new getOrdersForTransaction_result(this);
68 ashish 12486
    }
12487
 
12488
    @Deprecated
483 rajveer 12489
    public getOrdersForTransaction_result clone() {
12490
      return new getOrdersForTransaction_result(this);
68 ashish 12491
    }
12492
 
483 rajveer 12493
    public int getSuccessSize() {
12494
      return (this.success == null) ? 0 : this.success.size();
12495
    }
12496
 
12497
    public java.util.Iterator<Order> getSuccessIterator() {
12498
      return (this.success == null) ? null : this.success.iterator();
12499
    }
12500
 
12501
    public void addToSuccess(Order elem) {
12502
      if (this.success == null) {
12503
        this.success = new ArrayList<Order>();
12504
      }
12505
      this.success.add(elem);
12506
    }
12507
 
12508
    public List<Order> getSuccess() {
68 ashish 12509
      return this.success;
12510
    }
12511
 
483 rajveer 12512
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 12513
      this.success = success;
12514
      return this;
12515
    }
12516
 
12517
    public void unsetSuccess() {
483 rajveer 12518
      this.success = null;
68 ashish 12519
    }
12520
 
12521
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12522
    public boolean isSetSuccess() {
483 rajveer 12523
      return this.success != null;
68 ashish 12524
    }
12525
 
12526
    public void setSuccessIsSet(boolean value) {
483 rajveer 12527
      if (!value) {
12528
        this.success = null;
12529
      }
68 ashish 12530
    }
12531
 
12532
    public TransactionServiceException getEx() {
12533
      return this.ex;
12534
    }
12535
 
483 rajveer 12536
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 12537
      this.ex = ex;
12538
      return this;
12539
    }
12540
 
12541
    public void unsetEx() {
12542
      this.ex = null;
12543
    }
12544
 
12545
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12546
    public boolean isSetEx() {
12547
      return this.ex != null;
12548
    }
12549
 
12550
    public void setExIsSet(boolean value) {
12551
      if (!value) {
12552
        this.ex = null;
12553
      }
12554
    }
12555
 
12556
    public void setFieldValue(_Fields field, Object value) {
12557
      switch (field) {
12558
      case SUCCESS:
12559
        if (value == null) {
12560
          unsetSuccess();
12561
        } else {
483 rajveer 12562
          setSuccess((List<Order>)value);
68 ashish 12563
        }
12564
        break;
12565
 
12566
      case EX:
12567
        if (value == null) {
12568
          unsetEx();
12569
        } else {
12570
          setEx((TransactionServiceException)value);
12571
        }
12572
        break;
12573
 
12574
      }
12575
    }
12576
 
12577
    public void setFieldValue(int fieldID, Object value) {
12578
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12579
    }
12580
 
12581
    public Object getFieldValue(_Fields field) {
12582
      switch (field) {
12583
      case SUCCESS:
483 rajveer 12584
        return getSuccess();
68 ashish 12585
 
12586
      case EX:
12587
        return getEx();
12588
 
12589
      }
12590
      throw new IllegalStateException();
12591
    }
12592
 
12593
    public Object getFieldValue(int fieldId) {
12594
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12595
    }
12596
 
12597
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12598
    public boolean isSet(_Fields field) {
12599
      switch (field) {
12600
      case SUCCESS:
12601
        return isSetSuccess();
12602
      case EX:
12603
        return isSetEx();
12604
      }
12605
      throw new IllegalStateException();
12606
    }
12607
 
12608
    public boolean isSet(int fieldID) {
12609
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12610
    }
12611
 
12612
    @Override
12613
    public boolean equals(Object that) {
12614
      if (that == null)
12615
        return false;
483 rajveer 12616
      if (that instanceof getOrdersForTransaction_result)
12617
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 12618
      return false;
12619
    }
12620
 
483 rajveer 12621
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 12622
      if (that == null)
12623
        return false;
12624
 
483 rajveer 12625
      boolean this_present_success = true && this.isSetSuccess();
12626
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12627
      if (this_present_success || that_present_success) {
12628
        if (!(this_present_success && that_present_success))
12629
          return false;
483 rajveer 12630
        if (!this.success.equals(that.success))
68 ashish 12631
          return false;
12632
      }
12633
 
12634
      boolean this_present_ex = true && this.isSetEx();
12635
      boolean that_present_ex = true && that.isSetEx();
12636
      if (this_present_ex || that_present_ex) {
12637
        if (!(this_present_ex && that_present_ex))
12638
          return false;
12639
        if (!this.ex.equals(that.ex))
12640
          return false;
12641
      }
12642
 
12643
      return true;
12644
    }
12645
 
12646
    @Override
12647
    public int hashCode() {
12648
      return 0;
12649
    }
12650
 
483 rajveer 12651
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 12652
      if (!getClass().equals(other.getClass())) {
12653
        return getClass().getName().compareTo(other.getClass().getName());
12654
      }
12655
 
12656
      int lastComparison = 0;
483 rajveer 12657
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 12658
 
12659
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12660
      if (lastComparison != 0) {
12661
        return lastComparison;
12662
      }
12663
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12664
      if (lastComparison != 0) {
12665
        return lastComparison;
12666
      }
12667
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12668
      if (lastComparison != 0) {
12669
        return lastComparison;
12670
      }
12671
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12672
      if (lastComparison != 0) {
12673
        return lastComparison;
12674
      }
12675
      return 0;
12676
    }
12677
 
12678
    public void read(TProtocol iprot) throws TException {
12679
      TField field;
12680
      iprot.readStructBegin();
12681
      while (true)
12682
      {
12683
        field = iprot.readFieldBegin();
12684
        if (field.type == TType.STOP) { 
12685
          break;
12686
        }
12687
        _Fields fieldId = _Fields.findByThriftId(field.id);
12688
        if (fieldId == null) {
12689
          TProtocolUtil.skip(iprot, field.type);
12690
        } else {
12691
          switch (fieldId) {
12692
            case SUCCESS:
483 rajveer 12693
              if (field.type == TType.LIST) {
12694
                {
1022 varun.gupt 12695
                  TList _list24 = iprot.readListBegin();
12696
                  this.success = new ArrayList<Order>(_list24.size);
12697
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 12698
                  {
1022 varun.gupt 12699
                    Order _elem26;
12700
                    _elem26 = new Order();
12701
                    _elem26.read(iprot);
12702
                    this.success.add(_elem26);
483 rajveer 12703
                  }
12704
                  iprot.readListEnd();
12705
                }
68 ashish 12706
              } else { 
12707
                TProtocolUtil.skip(iprot, field.type);
12708
              }
12709
              break;
12710
            case EX:
12711
              if (field.type == TType.STRUCT) {
12712
                this.ex = new TransactionServiceException();
12713
                this.ex.read(iprot);
12714
              } else { 
12715
                TProtocolUtil.skip(iprot, field.type);
12716
              }
12717
              break;
12718
          }
12719
          iprot.readFieldEnd();
12720
        }
12721
      }
12722
      iprot.readStructEnd();
12723
      validate();
12724
    }
12725
 
12726
    public void write(TProtocol oprot) throws TException {
12727
      oprot.writeStructBegin(STRUCT_DESC);
12728
 
12729
      if (this.isSetSuccess()) {
12730
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12731
        {
12732
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12733
          for (Order _iter27 : this.success)
483 rajveer 12734
          {
1022 varun.gupt 12735
            _iter27.write(oprot);
483 rajveer 12736
          }
12737
          oprot.writeListEnd();
12738
        }
68 ashish 12739
        oprot.writeFieldEnd();
12740
      } else if (this.isSetEx()) {
12741
        oprot.writeFieldBegin(EX_FIELD_DESC);
12742
        this.ex.write(oprot);
12743
        oprot.writeFieldEnd();
12744
      }
12745
      oprot.writeFieldStop();
12746
      oprot.writeStructEnd();
12747
    }
12748
 
12749
    @Override
12750
    public String toString() {
483 rajveer 12751
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 12752
      boolean first = true;
12753
 
12754
      sb.append("success:");
483 rajveer 12755
      if (this.success == null) {
12756
        sb.append("null");
12757
      } else {
12758
        sb.append(this.success);
12759
      }
68 ashish 12760
      first = false;
12761
      if (!first) sb.append(", ");
12762
      sb.append("ex:");
12763
      if (this.ex == null) {
12764
        sb.append("null");
12765
      } else {
12766
        sb.append(this.ex);
12767
      }
12768
      first = false;
12769
      sb.append(")");
12770
      return sb.toString();
12771
    }
12772
 
12773
    public void validate() throws TException {
12774
      // check for required fields
12775
    }
12776
 
12777
  }
12778
 
483 rajveer 12779
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
12780
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 12781
 
483 rajveer 12782
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
12783
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
12784
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
12785
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 12786
 
483 rajveer 12787
    private long customerId;
12788
    private long from_date;
12789
    private long to_date;
12790
    private OrderStatus status;
68 ashish 12791
 
12792
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12793
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12794
      CUSTOMER_ID((short)1, "customerId"),
12795
      FROM_DATE((short)2, "from_date"),
12796
      TO_DATE((short)3, "to_date"),
12797
      /**
12798
       * 
12799
       * @see OrderStatus
12800
       */
12801
      STATUS((short)4, "status");
68 ashish 12802
 
12803
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12804
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12805
 
12806
      static {
12807
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12808
          byId.put((int)field._thriftId, field);
12809
          byName.put(field.getFieldName(), field);
12810
        }
12811
      }
12812
 
12813
      /**
12814
       * Find the _Fields constant that matches fieldId, or null if its not found.
12815
       */
12816
      public static _Fields findByThriftId(int fieldId) {
12817
        return byId.get(fieldId);
12818
      }
12819
 
12820
      /**
12821
       * Find the _Fields constant that matches fieldId, throwing an exception
12822
       * if it is not found.
12823
       */
12824
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12825
        _Fields fields = findByThriftId(fieldId);
12826
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12827
        return fields;
12828
      }
12829
 
12830
      /**
12831
       * Find the _Fields constant that matches name, or null if its not found.
12832
       */
12833
      public static _Fields findByName(String name) {
12834
        return byName.get(name);
12835
      }
12836
 
12837
      private final short _thriftId;
12838
      private final String _fieldName;
12839
 
12840
      _Fields(short thriftId, String fieldName) {
12841
        _thriftId = thriftId;
12842
        _fieldName = fieldName;
12843
      }
12844
 
12845
      public short getThriftFieldId() {
12846
        return _thriftId;
12847
      }
12848
 
12849
      public String getFieldName() {
12850
        return _fieldName;
12851
      }
12852
    }
12853
 
12854
    // isset id assignments
483 rajveer 12855
    private static final int __CUSTOMERID_ISSET_ID = 0;
12856
    private static final int __FROM_DATE_ISSET_ID = 1;
12857
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 12858
    private BitSet __isset_bit_vector = new BitSet(3);
12859
 
12860
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12861
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 12862
          new FieldValueMetaData(TType.I64)));
483 rajveer 12863
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 12864
          new FieldValueMetaData(TType.I64)));
483 rajveer 12865
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 12866
          new FieldValueMetaData(TType.I64)));
483 rajveer 12867
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
12868
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 12869
    }});
12870
 
12871
    static {
483 rajveer 12872
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 12873
    }
12874
 
483 rajveer 12875
    public getOrdersForCustomer_args() {
68 ashish 12876
    }
12877
 
483 rajveer 12878
    public getOrdersForCustomer_args(
12879
      long customerId,
12880
      long from_date,
12881
      long to_date,
12882
      OrderStatus status)
68 ashish 12883
    {
12884
      this();
483 rajveer 12885
      this.customerId = customerId;
12886
      setCustomerIdIsSet(true);
12887
      this.from_date = from_date;
12888
      setFrom_dateIsSet(true);
12889
      this.to_date = to_date;
12890
      setTo_dateIsSet(true);
12891
      this.status = status;
68 ashish 12892
    }
12893
 
12894
    /**
12895
     * Performs a deep copy on <i>other</i>.
12896
     */
483 rajveer 12897
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 12898
      __isset_bit_vector.clear();
12899
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12900
      this.customerId = other.customerId;
12901
      this.from_date = other.from_date;
12902
      this.to_date = other.to_date;
12903
      if (other.isSetStatus()) {
12904
        this.status = other.status;
12905
      }
68 ashish 12906
    }
12907
 
483 rajveer 12908
    public getOrdersForCustomer_args deepCopy() {
12909
      return new getOrdersForCustomer_args(this);
68 ashish 12910
    }
12911
 
12912
    @Deprecated
483 rajveer 12913
    public getOrdersForCustomer_args clone() {
12914
      return new getOrdersForCustomer_args(this);
68 ashish 12915
    }
12916
 
483 rajveer 12917
    public long getCustomerId() {
12918
      return this.customerId;
68 ashish 12919
    }
12920
 
483 rajveer 12921
    public getOrdersForCustomer_args setCustomerId(long customerId) {
12922
      this.customerId = customerId;
12923
      setCustomerIdIsSet(true);
68 ashish 12924
      return this;
12925
    }
12926
 
483 rajveer 12927
    public void unsetCustomerId() {
12928
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 12929
    }
12930
 
483 rajveer 12931
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
12932
    public boolean isSetCustomerId() {
12933
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 12934
    }
12935
 
483 rajveer 12936
    public void setCustomerIdIsSet(boolean value) {
12937
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 12938
    }
12939
 
483 rajveer 12940
    public long getFrom_date() {
12941
      return this.from_date;
68 ashish 12942
    }
12943
 
483 rajveer 12944
    public getOrdersForCustomer_args setFrom_date(long from_date) {
12945
      this.from_date = from_date;
12946
      setFrom_dateIsSet(true);
68 ashish 12947
      return this;
12948
    }
12949
 
483 rajveer 12950
    public void unsetFrom_date() {
12951
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 12952
    }
12953
 
483 rajveer 12954
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
12955
    public boolean isSetFrom_date() {
12956
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 12957
    }
12958
 
483 rajveer 12959
    public void setFrom_dateIsSet(boolean value) {
12960
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 12961
    }
12962
 
483 rajveer 12963
    public long getTo_date() {
12964
      return this.to_date;
68 ashish 12965
    }
12966
 
483 rajveer 12967
    public getOrdersForCustomer_args setTo_date(long to_date) {
12968
      this.to_date = to_date;
12969
      setTo_dateIsSet(true);
68 ashish 12970
      return this;
12971
    }
12972
 
483 rajveer 12973
    public void unsetTo_date() {
12974
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 12975
    }
12976
 
483 rajveer 12977
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
12978
    public boolean isSetTo_date() {
12979
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 12980
    }
12981
 
483 rajveer 12982
    public void setTo_dateIsSet(boolean value) {
12983
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 12984
    }
12985
 
483 rajveer 12986
    /**
12987
     * 
12988
     * @see OrderStatus
12989
     */
12990
    public OrderStatus getStatus() {
12991
      return this.status;
12992
    }
12993
 
12994
    /**
12995
     * 
12996
     * @see OrderStatus
12997
     */
12998
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
12999
      this.status = status;
13000
      return this;
13001
    }
13002
 
13003
    public void unsetStatus() {
13004
      this.status = null;
13005
    }
13006
 
13007
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
13008
    public boolean isSetStatus() {
13009
      return this.status != null;
13010
    }
13011
 
13012
    public void setStatusIsSet(boolean value) {
13013
      if (!value) {
13014
        this.status = null;
13015
      }
13016
    }
13017
 
68 ashish 13018
    public void setFieldValue(_Fields field, Object value) {
13019
      switch (field) {
483 rajveer 13020
      case CUSTOMER_ID:
68 ashish 13021
        if (value == null) {
483 rajveer 13022
          unsetCustomerId();
68 ashish 13023
        } else {
483 rajveer 13024
          setCustomerId((Long)value);
68 ashish 13025
        }
13026
        break;
13027
 
483 rajveer 13028
      case FROM_DATE:
68 ashish 13029
        if (value == null) {
483 rajveer 13030
          unsetFrom_date();
68 ashish 13031
        } else {
483 rajveer 13032
          setFrom_date((Long)value);
68 ashish 13033
        }
13034
        break;
13035
 
483 rajveer 13036
      case TO_DATE:
68 ashish 13037
        if (value == null) {
483 rajveer 13038
          unsetTo_date();
68 ashish 13039
        } else {
483 rajveer 13040
          setTo_date((Long)value);
68 ashish 13041
        }
13042
        break;
13043
 
483 rajveer 13044
      case STATUS:
13045
        if (value == null) {
13046
          unsetStatus();
13047
        } else {
13048
          setStatus((OrderStatus)value);
13049
        }
13050
        break;
13051
 
68 ashish 13052
      }
13053
    }
13054
 
13055
    public void setFieldValue(int fieldID, Object value) {
13056
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13057
    }
13058
 
13059
    public Object getFieldValue(_Fields field) {
13060
      switch (field) {
483 rajveer 13061
      case CUSTOMER_ID:
13062
        return new Long(getCustomerId());
68 ashish 13063
 
483 rajveer 13064
      case FROM_DATE:
13065
        return new Long(getFrom_date());
68 ashish 13066
 
483 rajveer 13067
      case TO_DATE:
13068
        return new Long(getTo_date());
68 ashish 13069
 
483 rajveer 13070
      case STATUS:
13071
        return getStatus();
13072
 
68 ashish 13073
      }
13074
      throw new IllegalStateException();
13075
    }
13076
 
13077
    public Object getFieldValue(int fieldId) {
13078
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13079
    }
13080
 
13081
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13082
    public boolean isSet(_Fields field) {
13083
      switch (field) {
483 rajveer 13084
      case CUSTOMER_ID:
13085
        return isSetCustomerId();
13086
      case FROM_DATE:
13087
        return isSetFrom_date();
13088
      case TO_DATE:
13089
        return isSetTo_date();
13090
      case STATUS:
13091
        return isSetStatus();
68 ashish 13092
      }
13093
      throw new IllegalStateException();
13094
    }
13095
 
13096
    public boolean isSet(int fieldID) {
13097
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13098
    }
13099
 
13100
    @Override
13101
    public boolean equals(Object that) {
13102
      if (that == null)
13103
        return false;
483 rajveer 13104
      if (that instanceof getOrdersForCustomer_args)
13105
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 13106
      return false;
13107
    }
13108
 
483 rajveer 13109
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 13110
      if (that == null)
13111
        return false;
13112
 
483 rajveer 13113
      boolean this_present_customerId = true;
13114
      boolean that_present_customerId = true;
13115
      if (this_present_customerId || that_present_customerId) {
13116
        if (!(this_present_customerId && that_present_customerId))
68 ashish 13117
          return false;
483 rajveer 13118
        if (this.customerId != that.customerId)
68 ashish 13119
          return false;
13120
      }
13121
 
483 rajveer 13122
      boolean this_present_from_date = true;
13123
      boolean that_present_from_date = true;
13124
      if (this_present_from_date || that_present_from_date) {
13125
        if (!(this_present_from_date && that_present_from_date))
68 ashish 13126
          return false;
483 rajveer 13127
        if (this.from_date != that.from_date)
68 ashish 13128
          return false;
13129
      }
13130
 
483 rajveer 13131
      boolean this_present_to_date = true;
13132
      boolean that_present_to_date = true;
13133
      if (this_present_to_date || that_present_to_date) {
13134
        if (!(this_present_to_date && that_present_to_date))
68 ashish 13135
          return false;
483 rajveer 13136
        if (this.to_date != that.to_date)
68 ashish 13137
          return false;
13138
      }
13139
 
483 rajveer 13140
      boolean this_present_status = true && this.isSetStatus();
13141
      boolean that_present_status = true && that.isSetStatus();
13142
      if (this_present_status || that_present_status) {
13143
        if (!(this_present_status && that_present_status))
13144
          return false;
13145
        if (!this.status.equals(that.status))
13146
          return false;
13147
      }
13148
 
68 ashish 13149
      return true;
13150
    }
13151
 
13152
    @Override
13153
    public int hashCode() {
13154
      return 0;
13155
    }
13156
 
483 rajveer 13157
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 13158
      if (!getClass().equals(other.getClass())) {
13159
        return getClass().getName().compareTo(other.getClass().getName());
13160
      }
13161
 
13162
      int lastComparison = 0;
483 rajveer 13163
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 13164
 
483 rajveer 13165
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 13166
      if (lastComparison != 0) {
13167
        return lastComparison;
13168
      }
483 rajveer 13169
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 13170
      if (lastComparison != 0) {
13171
        return lastComparison;
13172
      }
483 rajveer 13173
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 13174
      if (lastComparison != 0) {
13175
        return lastComparison;
13176
      }
483 rajveer 13177
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 13178
      if (lastComparison != 0) {
13179
        return lastComparison;
13180
      }
483 rajveer 13181
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 13182
      if (lastComparison != 0) {
13183
        return lastComparison;
13184
      }
483 rajveer 13185
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 13186
      if (lastComparison != 0) {
13187
        return lastComparison;
13188
      }
483 rajveer 13189
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
13190
      if (lastComparison != 0) {
13191
        return lastComparison;
13192
      }
13193
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
13194
      if (lastComparison != 0) {
13195
        return lastComparison;
13196
      }
68 ashish 13197
      return 0;
13198
    }
13199
 
13200
    public void read(TProtocol iprot) throws TException {
13201
      TField field;
13202
      iprot.readStructBegin();
13203
      while (true)
13204
      {
13205
        field = iprot.readFieldBegin();
13206
        if (field.type == TType.STOP) { 
13207
          break;
13208
        }
13209
        _Fields fieldId = _Fields.findByThriftId(field.id);
13210
        if (fieldId == null) {
13211
          TProtocolUtil.skip(iprot, field.type);
13212
        } else {
13213
          switch (fieldId) {
483 rajveer 13214
            case CUSTOMER_ID:
68 ashish 13215
              if (field.type == TType.I64) {
483 rajveer 13216
                this.customerId = iprot.readI64();
13217
                setCustomerIdIsSet(true);
68 ashish 13218
              } else { 
13219
                TProtocolUtil.skip(iprot, field.type);
13220
              }
13221
              break;
483 rajveer 13222
            case FROM_DATE:
68 ashish 13223
              if (field.type == TType.I64) {
483 rajveer 13224
                this.from_date = iprot.readI64();
13225
                setFrom_dateIsSet(true);
68 ashish 13226
              } else { 
13227
                TProtocolUtil.skip(iprot, field.type);
13228
              }
13229
              break;
483 rajveer 13230
            case TO_DATE:
68 ashish 13231
              if (field.type == TType.I64) {
483 rajveer 13232
                this.to_date = iprot.readI64();
13233
                setTo_dateIsSet(true);
68 ashish 13234
              } else { 
13235
                TProtocolUtil.skip(iprot, field.type);
13236
              }
13237
              break;
483 rajveer 13238
            case STATUS:
13239
              if (field.type == TType.I32) {
13240
                this.status = OrderStatus.findByValue(iprot.readI32());
13241
              } else { 
13242
                TProtocolUtil.skip(iprot, field.type);
13243
              }
13244
              break;
68 ashish 13245
          }
13246
          iprot.readFieldEnd();
13247
        }
13248
      }
13249
      iprot.readStructEnd();
13250
      validate();
13251
    }
13252
 
13253
    public void write(TProtocol oprot) throws TException {
13254
      validate();
13255
 
13256
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13257
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
13258
      oprot.writeI64(this.customerId);
68 ashish 13259
      oprot.writeFieldEnd();
483 rajveer 13260
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
13261
      oprot.writeI64(this.from_date);
68 ashish 13262
      oprot.writeFieldEnd();
483 rajveer 13263
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
13264
      oprot.writeI64(this.to_date);
68 ashish 13265
      oprot.writeFieldEnd();
483 rajveer 13266
      if (this.status != null) {
13267
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
13268
        oprot.writeI32(this.status.getValue());
13269
        oprot.writeFieldEnd();
13270
      }
68 ashish 13271
      oprot.writeFieldStop();
13272
      oprot.writeStructEnd();
13273
    }
13274
 
13275
    @Override
13276
    public String toString() {
483 rajveer 13277
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 13278
      boolean first = true;
13279
 
483 rajveer 13280
      sb.append("customerId:");
13281
      sb.append(this.customerId);
68 ashish 13282
      first = false;
13283
      if (!first) sb.append(", ");
483 rajveer 13284
      sb.append("from_date:");
13285
      sb.append(this.from_date);
68 ashish 13286
      first = false;
13287
      if (!first) sb.append(", ");
483 rajveer 13288
      sb.append("to_date:");
13289
      sb.append(this.to_date);
68 ashish 13290
      first = false;
483 rajveer 13291
      if (!first) sb.append(", ");
13292
      sb.append("status:");
13293
      if (this.status == null) {
13294
        sb.append("null");
13295
      } else {
13296
        String status_name = status.name();
13297
        if (status_name != null) {
13298
          sb.append(status_name);
13299
          sb.append(" (");
13300
        }
13301
        sb.append(this.status);
13302
        if (status_name != null) {
13303
          sb.append(")");
13304
        }
13305
      }
13306
      first = false;
68 ashish 13307
      sb.append(")");
13308
      return sb.toString();
13309
    }
13310
 
13311
    public void validate() throws TException {
13312
      // check for required fields
13313
    }
13314
 
13315
  }
13316
 
483 rajveer 13317
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
13318
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 13319
 
483 rajveer 13320
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 13321
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13322
 
483 rajveer 13323
    private List<Order> success;
68 ashish 13324
    private TransactionServiceException ex;
13325
 
13326
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13327
    public enum _Fields implements TFieldIdEnum {
13328
      SUCCESS((short)0, "success"),
13329
      EX((short)1, "ex");
13330
 
13331
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13332
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13333
 
13334
      static {
13335
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13336
          byId.put((int)field._thriftId, field);
13337
          byName.put(field.getFieldName(), field);
13338
        }
13339
      }
13340
 
13341
      /**
13342
       * Find the _Fields constant that matches fieldId, or null if its not found.
13343
       */
13344
      public static _Fields findByThriftId(int fieldId) {
13345
        return byId.get(fieldId);
13346
      }
13347
 
13348
      /**
13349
       * Find the _Fields constant that matches fieldId, throwing an exception
13350
       * if it is not found.
13351
       */
13352
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13353
        _Fields fields = findByThriftId(fieldId);
13354
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13355
        return fields;
13356
      }
13357
 
13358
      /**
13359
       * Find the _Fields constant that matches name, or null if its not found.
13360
       */
13361
      public static _Fields findByName(String name) {
13362
        return byName.get(name);
13363
      }
13364
 
13365
      private final short _thriftId;
13366
      private final String _fieldName;
13367
 
13368
      _Fields(short thriftId, String fieldName) {
13369
        _thriftId = thriftId;
13370
        _fieldName = fieldName;
13371
      }
13372
 
13373
      public short getThriftFieldId() {
13374
        return _thriftId;
13375
      }
13376
 
13377
      public String getFieldName() {
13378
        return _fieldName;
13379
      }
13380
    }
13381
 
13382
    // isset id assignments
13383
 
13384
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13385
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13386
          new ListMetaData(TType.LIST, 
13387
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 13388
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13389
          new FieldValueMetaData(TType.STRUCT)));
13390
    }});
13391
 
13392
    static {
483 rajveer 13393
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 13394
    }
13395
 
483 rajveer 13396
    public getOrdersForCustomer_result() {
68 ashish 13397
    }
13398
 
483 rajveer 13399
    public getOrdersForCustomer_result(
13400
      List<Order> success,
68 ashish 13401
      TransactionServiceException ex)
13402
    {
13403
      this();
13404
      this.success = success;
13405
      this.ex = ex;
13406
    }
13407
 
13408
    /**
13409
     * Performs a deep copy on <i>other</i>.
13410
     */
483 rajveer 13411
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
13412
      if (other.isSetSuccess()) {
13413
        List<Order> __this__success = new ArrayList<Order>();
13414
        for (Order other_element : other.success) {
13415
          __this__success.add(new Order(other_element));
13416
        }
13417
        this.success = __this__success;
13418
      }
68 ashish 13419
      if (other.isSetEx()) {
13420
        this.ex = new TransactionServiceException(other.ex);
13421
      }
13422
    }
13423
 
483 rajveer 13424
    public getOrdersForCustomer_result deepCopy() {
13425
      return new getOrdersForCustomer_result(this);
68 ashish 13426
    }
13427
 
13428
    @Deprecated
483 rajveer 13429
    public getOrdersForCustomer_result clone() {
13430
      return new getOrdersForCustomer_result(this);
68 ashish 13431
    }
13432
 
483 rajveer 13433
    public int getSuccessSize() {
13434
      return (this.success == null) ? 0 : this.success.size();
13435
    }
13436
 
13437
    public java.util.Iterator<Order> getSuccessIterator() {
13438
      return (this.success == null) ? null : this.success.iterator();
13439
    }
13440
 
13441
    public void addToSuccess(Order elem) {
13442
      if (this.success == null) {
13443
        this.success = new ArrayList<Order>();
13444
      }
13445
      this.success.add(elem);
13446
    }
13447
 
13448
    public List<Order> getSuccess() {
68 ashish 13449
      return this.success;
13450
    }
13451
 
483 rajveer 13452
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 13453
      this.success = success;
13454
      return this;
13455
    }
13456
 
13457
    public void unsetSuccess() {
483 rajveer 13458
      this.success = null;
68 ashish 13459
    }
13460
 
13461
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13462
    public boolean isSetSuccess() {
483 rajveer 13463
      return this.success != null;
68 ashish 13464
    }
13465
 
13466
    public void setSuccessIsSet(boolean value) {
483 rajveer 13467
      if (!value) {
13468
        this.success = null;
13469
      }
68 ashish 13470
    }
13471
 
13472
    public TransactionServiceException getEx() {
13473
      return this.ex;
13474
    }
13475
 
483 rajveer 13476
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 13477
      this.ex = ex;
13478
      return this;
13479
    }
13480
 
13481
    public void unsetEx() {
13482
      this.ex = null;
13483
    }
13484
 
13485
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13486
    public boolean isSetEx() {
13487
      return this.ex != null;
13488
    }
13489
 
13490
    public void setExIsSet(boolean value) {
13491
      if (!value) {
13492
        this.ex = null;
13493
      }
13494
    }
13495
 
13496
    public void setFieldValue(_Fields field, Object value) {
13497
      switch (field) {
13498
      case SUCCESS:
13499
        if (value == null) {
13500
          unsetSuccess();
13501
        } else {
483 rajveer 13502
          setSuccess((List<Order>)value);
68 ashish 13503
        }
13504
        break;
13505
 
13506
      case EX:
13507
        if (value == null) {
13508
          unsetEx();
13509
        } else {
13510
          setEx((TransactionServiceException)value);
13511
        }
13512
        break;
13513
 
13514
      }
13515
    }
13516
 
13517
    public void setFieldValue(int fieldID, Object value) {
13518
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13519
    }
13520
 
13521
    public Object getFieldValue(_Fields field) {
13522
      switch (field) {
13523
      case SUCCESS:
483 rajveer 13524
        return getSuccess();
68 ashish 13525
 
13526
      case EX:
13527
        return getEx();
13528
 
13529
      }
13530
      throw new IllegalStateException();
13531
    }
13532
 
13533
    public Object getFieldValue(int fieldId) {
13534
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13535
    }
13536
 
13537
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13538
    public boolean isSet(_Fields field) {
13539
      switch (field) {
13540
      case SUCCESS:
13541
        return isSetSuccess();
13542
      case EX:
13543
        return isSetEx();
13544
      }
13545
      throw new IllegalStateException();
13546
    }
13547
 
13548
    public boolean isSet(int fieldID) {
13549
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13550
    }
13551
 
13552
    @Override
13553
    public boolean equals(Object that) {
13554
      if (that == null)
13555
        return false;
483 rajveer 13556
      if (that instanceof getOrdersForCustomer_result)
13557
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 13558
      return false;
13559
    }
13560
 
483 rajveer 13561
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 13562
      if (that == null)
13563
        return false;
13564
 
483 rajveer 13565
      boolean this_present_success = true && this.isSetSuccess();
13566
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 13567
      if (this_present_success || that_present_success) {
13568
        if (!(this_present_success && that_present_success))
13569
          return false;
483 rajveer 13570
        if (!this.success.equals(that.success))
68 ashish 13571
          return false;
13572
      }
13573
 
13574
      boolean this_present_ex = true && this.isSetEx();
13575
      boolean that_present_ex = true && that.isSetEx();
13576
      if (this_present_ex || that_present_ex) {
13577
        if (!(this_present_ex && that_present_ex))
13578
          return false;
13579
        if (!this.ex.equals(that.ex))
13580
          return false;
13581
      }
13582
 
13583
      return true;
13584
    }
13585
 
13586
    @Override
13587
    public int hashCode() {
13588
      return 0;
13589
    }
13590
 
483 rajveer 13591
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 13592
      if (!getClass().equals(other.getClass())) {
13593
        return getClass().getName().compareTo(other.getClass().getName());
13594
      }
13595
 
13596
      int lastComparison = 0;
483 rajveer 13597
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 13598
 
13599
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13600
      if (lastComparison != 0) {
13601
        return lastComparison;
13602
      }
13603
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13604
      if (lastComparison != 0) {
13605
        return lastComparison;
13606
      }
13607
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13608
      if (lastComparison != 0) {
13609
        return lastComparison;
13610
      }
13611
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13612
      if (lastComparison != 0) {
13613
        return lastComparison;
13614
      }
13615
      return 0;
13616
    }
13617
 
13618
    public void read(TProtocol iprot) throws TException {
13619
      TField field;
13620
      iprot.readStructBegin();
13621
      while (true)
13622
      {
13623
        field = iprot.readFieldBegin();
13624
        if (field.type == TType.STOP) { 
13625
          break;
13626
        }
13627
        _Fields fieldId = _Fields.findByThriftId(field.id);
13628
        if (fieldId == null) {
13629
          TProtocolUtil.skip(iprot, field.type);
13630
        } else {
13631
          switch (fieldId) {
13632
            case SUCCESS:
483 rajveer 13633
              if (field.type == TType.LIST) {
13634
                {
1022 varun.gupt 13635
                  TList _list28 = iprot.readListBegin();
13636
                  this.success = new ArrayList<Order>(_list28.size);
13637
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 13638
                  {
1022 varun.gupt 13639
                    Order _elem30;
13640
                    _elem30 = new Order();
13641
                    _elem30.read(iprot);
13642
                    this.success.add(_elem30);
483 rajveer 13643
                  }
13644
                  iprot.readListEnd();
13645
                }
68 ashish 13646
              } else { 
13647
                TProtocolUtil.skip(iprot, field.type);
13648
              }
13649
              break;
13650
            case EX:
13651
              if (field.type == TType.STRUCT) {
13652
                this.ex = new TransactionServiceException();
13653
                this.ex.read(iprot);
13654
              } else { 
13655
                TProtocolUtil.skip(iprot, field.type);
13656
              }
13657
              break;
13658
          }
13659
          iprot.readFieldEnd();
13660
        }
13661
      }
13662
      iprot.readStructEnd();
13663
      validate();
13664
    }
13665
 
13666
    public void write(TProtocol oprot) throws TException {
13667
      oprot.writeStructBegin(STRUCT_DESC);
13668
 
13669
      if (this.isSetSuccess()) {
13670
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13671
        {
13672
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 13673
          for (Order _iter31 : this.success)
483 rajveer 13674
          {
1022 varun.gupt 13675
            _iter31.write(oprot);
483 rajveer 13676
          }
13677
          oprot.writeListEnd();
13678
        }
68 ashish 13679
        oprot.writeFieldEnd();
13680
      } else if (this.isSetEx()) {
13681
        oprot.writeFieldBegin(EX_FIELD_DESC);
13682
        this.ex.write(oprot);
13683
        oprot.writeFieldEnd();
13684
      }
13685
      oprot.writeFieldStop();
13686
      oprot.writeStructEnd();
13687
    }
13688
 
13689
    @Override
13690
    public String toString() {
483 rajveer 13691
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 13692
      boolean first = true;
13693
 
13694
      sb.append("success:");
483 rajveer 13695
      if (this.success == null) {
13696
        sb.append("null");
13697
      } else {
13698
        sb.append(this.success);
13699
      }
68 ashish 13700
      first = false;
13701
      if (!first) sb.append(", ");
13702
      sb.append("ex:");
13703
      if (this.ex == null) {
13704
        sb.append("null");
13705
      } else {
13706
        sb.append(this.ex);
13707
      }
13708
      first = false;
13709
      sb.append(")");
13710
      return sb.toString();
13711
    }
13712
 
13713
    public void validate() throws TException {
13714
      // check for required fields
13715
    }
13716
 
13717
  }
13718
 
483 rajveer 13719
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
13720
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 13721
 
483 rajveer 13722
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 13723
 
483 rajveer 13724
    private Order order;
68 ashish 13725
 
13726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13727
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13728
      ORDER((short)1, "order");
68 ashish 13729
 
13730
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13732
 
13733
      static {
13734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13735
          byId.put((int)field._thriftId, field);
13736
          byName.put(field.getFieldName(), field);
13737
        }
13738
      }
13739
 
13740
      /**
13741
       * Find the _Fields constant that matches fieldId, or null if its not found.
13742
       */
13743
      public static _Fields findByThriftId(int fieldId) {
13744
        return byId.get(fieldId);
13745
      }
13746
 
13747
      /**
13748
       * Find the _Fields constant that matches fieldId, throwing an exception
13749
       * if it is not found.
13750
       */
13751
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13752
        _Fields fields = findByThriftId(fieldId);
13753
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13754
        return fields;
13755
      }
13756
 
13757
      /**
13758
       * Find the _Fields constant that matches name, or null if its not found.
13759
       */
13760
      public static _Fields findByName(String name) {
13761
        return byName.get(name);
13762
      }
13763
 
13764
      private final short _thriftId;
13765
      private final String _fieldName;
13766
 
13767
      _Fields(short thriftId, String fieldName) {
13768
        _thriftId = thriftId;
13769
        _fieldName = fieldName;
13770
      }
13771
 
13772
      public short getThriftFieldId() {
13773
        return _thriftId;
13774
      }
13775
 
13776
      public String getFieldName() {
13777
        return _fieldName;
13778
      }
13779
    }
13780
 
13781
    // isset id assignments
13782
 
13783
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13784
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
13785
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 13786
    }});
13787
 
13788
    static {
483 rajveer 13789
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 13790
    }
13791
 
483 rajveer 13792
    public createOrder_args() {
68 ashish 13793
    }
13794
 
483 rajveer 13795
    public createOrder_args(
13796
      Order order)
68 ashish 13797
    {
13798
      this();
483 rajveer 13799
      this.order = order;
68 ashish 13800
    }
13801
 
13802
    /**
13803
     * Performs a deep copy on <i>other</i>.
13804
     */
483 rajveer 13805
    public createOrder_args(createOrder_args other) {
13806
      if (other.isSetOrder()) {
13807
        this.order = new Order(other.order);
13808
      }
68 ashish 13809
    }
13810
 
483 rajveer 13811
    public createOrder_args deepCopy() {
13812
      return new createOrder_args(this);
68 ashish 13813
    }
13814
 
13815
    @Deprecated
483 rajveer 13816
    public createOrder_args clone() {
13817
      return new createOrder_args(this);
68 ashish 13818
    }
13819
 
483 rajveer 13820
    public Order getOrder() {
13821
      return this.order;
68 ashish 13822
    }
13823
 
483 rajveer 13824
    public createOrder_args setOrder(Order order) {
13825
      this.order = order;
68 ashish 13826
      return this;
13827
    }
13828
 
483 rajveer 13829
    public void unsetOrder() {
13830
      this.order = null;
68 ashish 13831
    }
13832
 
483 rajveer 13833
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
13834
    public boolean isSetOrder() {
13835
      return this.order != null;
68 ashish 13836
    }
13837
 
483 rajveer 13838
    public void setOrderIsSet(boolean value) {
13839
      if (!value) {
13840
        this.order = null;
13841
      }
68 ashish 13842
    }
13843
 
13844
    public void setFieldValue(_Fields field, Object value) {
13845
      switch (field) {
483 rajveer 13846
      case ORDER:
68 ashish 13847
        if (value == null) {
483 rajveer 13848
          unsetOrder();
68 ashish 13849
        } else {
483 rajveer 13850
          setOrder((Order)value);
68 ashish 13851
        }
13852
        break;
13853
 
13854
      }
13855
    }
13856
 
13857
    public void setFieldValue(int fieldID, Object value) {
13858
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13859
    }
13860
 
13861
    public Object getFieldValue(_Fields field) {
13862
      switch (field) {
483 rajveer 13863
      case ORDER:
13864
        return getOrder();
68 ashish 13865
 
13866
      }
13867
      throw new IllegalStateException();
13868
    }
13869
 
13870
    public Object getFieldValue(int fieldId) {
13871
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13872
    }
13873
 
13874
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13875
    public boolean isSet(_Fields field) {
13876
      switch (field) {
483 rajveer 13877
      case ORDER:
13878
        return isSetOrder();
68 ashish 13879
      }
13880
      throw new IllegalStateException();
13881
    }
13882
 
13883
    public boolean isSet(int fieldID) {
13884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13885
    }
13886
 
13887
    @Override
13888
    public boolean equals(Object that) {
13889
      if (that == null)
13890
        return false;
483 rajveer 13891
      if (that instanceof createOrder_args)
13892
        return this.equals((createOrder_args)that);
68 ashish 13893
      return false;
13894
    }
13895
 
483 rajveer 13896
    public boolean equals(createOrder_args that) {
68 ashish 13897
      if (that == null)
13898
        return false;
13899
 
483 rajveer 13900
      boolean this_present_order = true && this.isSetOrder();
13901
      boolean that_present_order = true && that.isSetOrder();
13902
      if (this_present_order || that_present_order) {
13903
        if (!(this_present_order && that_present_order))
68 ashish 13904
          return false;
483 rajveer 13905
        if (!this.order.equals(that.order))
68 ashish 13906
          return false;
13907
      }
13908
 
13909
      return true;
13910
    }
13911
 
13912
    @Override
13913
    public int hashCode() {
13914
      return 0;
13915
    }
13916
 
483 rajveer 13917
    public int compareTo(createOrder_args other) {
68 ashish 13918
      if (!getClass().equals(other.getClass())) {
13919
        return getClass().getName().compareTo(other.getClass().getName());
13920
      }
13921
 
13922
      int lastComparison = 0;
483 rajveer 13923
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 13924
 
483 rajveer 13925
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 13926
      if (lastComparison != 0) {
13927
        return lastComparison;
13928
      }
483 rajveer 13929
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 13930
      if (lastComparison != 0) {
13931
        return lastComparison;
13932
      }
13933
      return 0;
13934
    }
13935
 
13936
    public void read(TProtocol iprot) throws TException {
13937
      TField field;
13938
      iprot.readStructBegin();
13939
      while (true)
13940
      {
13941
        field = iprot.readFieldBegin();
13942
        if (field.type == TType.STOP) { 
13943
          break;
13944
        }
13945
        _Fields fieldId = _Fields.findByThriftId(field.id);
13946
        if (fieldId == null) {
13947
          TProtocolUtil.skip(iprot, field.type);
13948
        } else {
13949
          switch (fieldId) {
483 rajveer 13950
            case ORDER:
13951
              if (field.type == TType.STRUCT) {
13952
                this.order = new Order();
13953
                this.order.read(iprot);
68 ashish 13954
              } else { 
13955
                TProtocolUtil.skip(iprot, field.type);
13956
              }
13957
              break;
13958
          }
13959
          iprot.readFieldEnd();
13960
        }
13961
      }
13962
      iprot.readStructEnd();
13963
      validate();
13964
    }
13965
 
13966
    public void write(TProtocol oprot) throws TException {
13967
      validate();
13968
 
13969
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13970
      if (this.order != null) {
13971
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
13972
        this.order.write(oprot);
13973
        oprot.writeFieldEnd();
13974
      }
68 ashish 13975
      oprot.writeFieldStop();
13976
      oprot.writeStructEnd();
13977
    }
13978
 
13979
    @Override
13980
    public String toString() {
483 rajveer 13981
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 13982
      boolean first = true;
13983
 
483 rajveer 13984
      sb.append("order:");
13985
      if (this.order == null) {
13986
        sb.append("null");
13987
      } else {
13988
        sb.append(this.order);
13989
      }
68 ashish 13990
      first = false;
13991
      sb.append(")");
13992
      return sb.toString();
13993
    }
13994
 
13995
    public void validate() throws TException {
13996
      // check for required fields
13997
    }
13998
 
13999
  }
14000
 
483 rajveer 14001
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
14002
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 14003
 
483 rajveer 14004
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 14005
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14006
 
483 rajveer 14007
    private long success;
68 ashish 14008
    private TransactionServiceException ex;
14009
 
14010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14011
    public enum _Fields implements TFieldIdEnum {
14012
      SUCCESS((short)0, "success"),
14013
      EX((short)1, "ex");
14014
 
14015
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14016
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14017
 
14018
      static {
14019
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14020
          byId.put((int)field._thriftId, field);
14021
          byName.put(field.getFieldName(), field);
14022
        }
14023
      }
14024
 
14025
      /**
14026
       * Find the _Fields constant that matches fieldId, or null if its not found.
14027
       */
14028
      public static _Fields findByThriftId(int fieldId) {
14029
        return byId.get(fieldId);
14030
      }
14031
 
14032
      /**
14033
       * Find the _Fields constant that matches fieldId, throwing an exception
14034
       * if it is not found.
14035
       */
14036
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14037
        _Fields fields = findByThriftId(fieldId);
14038
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14039
        return fields;
14040
      }
14041
 
14042
      /**
14043
       * Find the _Fields constant that matches name, or null if its not found.
14044
       */
14045
      public static _Fields findByName(String name) {
14046
        return byName.get(name);
14047
      }
14048
 
14049
      private final short _thriftId;
14050
      private final String _fieldName;
14051
 
14052
      _Fields(short thriftId, String fieldName) {
14053
        _thriftId = thriftId;
14054
        _fieldName = fieldName;
14055
      }
14056
 
14057
      public short getThriftFieldId() {
14058
        return _thriftId;
14059
      }
14060
 
14061
      public String getFieldName() {
14062
        return _fieldName;
14063
      }
14064
    }
14065
 
14066
    // isset id assignments
14067
    private static final int __SUCCESS_ISSET_ID = 0;
14068
    private BitSet __isset_bit_vector = new BitSet(1);
14069
 
14070
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14071
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14072
          new FieldValueMetaData(TType.I64)));
68 ashish 14073
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14074
          new FieldValueMetaData(TType.STRUCT)));
14075
    }});
14076
 
14077
    static {
483 rajveer 14078
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 14079
    }
14080
 
483 rajveer 14081
    public createOrder_result() {
68 ashish 14082
    }
14083
 
483 rajveer 14084
    public createOrder_result(
14085
      long success,
68 ashish 14086
      TransactionServiceException ex)
14087
    {
14088
      this();
14089
      this.success = success;
14090
      setSuccessIsSet(true);
14091
      this.ex = ex;
14092
    }
14093
 
14094
    /**
14095
     * Performs a deep copy on <i>other</i>.
14096
     */
483 rajveer 14097
    public createOrder_result(createOrder_result other) {
68 ashish 14098
      __isset_bit_vector.clear();
14099
      __isset_bit_vector.or(other.__isset_bit_vector);
14100
      this.success = other.success;
14101
      if (other.isSetEx()) {
14102
        this.ex = new TransactionServiceException(other.ex);
14103
      }
14104
    }
14105
 
483 rajveer 14106
    public createOrder_result deepCopy() {
14107
      return new createOrder_result(this);
68 ashish 14108
    }
14109
 
14110
    @Deprecated
483 rajveer 14111
    public createOrder_result clone() {
14112
      return new createOrder_result(this);
68 ashish 14113
    }
14114
 
483 rajveer 14115
    public long getSuccess() {
68 ashish 14116
      return this.success;
14117
    }
14118
 
483 rajveer 14119
    public createOrder_result setSuccess(long success) {
68 ashish 14120
      this.success = success;
14121
      setSuccessIsSet(true);
14122
      return this;
14123
    }
14124
 
14125
    public void unsetSuccess() {
14126
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14127
    }
14128
 
14129
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14130
    public boolean isSetSuccess() {
14131
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14132
    }
14133
 
14134
    public void setSuccessIsSet(boolean value) {
14135
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14136
    }
14137
 
14138
    public TransactionServiceException getEx() {
14139
      return this.ex;
14140
    }
14141
 
483 rajveer 14142
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 14143
      this.ex = ex;
14144
      return this;
14145
    }
14146
 
14147
    public void unsetEx() {
14148
      this.ex = null;
14149
    }
14150
 
14151
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14152
    public boolean isSetEx() {
14153
      return this.ex != null;
14154
    }
14155
 
14156
    public void setExIsSet(boolean value) {
14157
      if (!value) {
14158
        this.ex = null;
14159
      }
14160
    }
14161
 
14162
    public void setFieldValue(_Fields field, Object value) {
14163
      switch (field) {
14164
      case SUCCESS:
14165
        if (value == null) {
14166
          unsetSuccess();
14167
        } else {
483 rajveer 14168
          setSuccess((Long)value);
68 ashish 14169
        }
14170
        break;
14171
 
14172
      case EX:
14173
        if (value == null) {
14174
          unsetEx();
14175
        } else {
14176
          setEx((TransactionServiceException)value);
14177
        }
14178
        break;
14179
 
14180
      }
14181
    }
14182
 
14183
    public void setFieldValue(int fieldID, Object value) {
14184
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14185
    }
14186
 
14187
    public Object getFieldValue(_Fields field) {
14188
      switch (field) {
14189
      case SUCCESS:
483 rajveer 14190
        return new Long(getSuccess());
68 ashish 14191
 
14192
      case EX:
14193
        return getEx();
14194
 
14195
      }
14196
      throw new IllegalStateException();
14197
    }
14198
 
14199
    public Object getFieldValue(int fieldId) {
14200
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14201
    }
14202
 
14203
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14204
    public boolean isSet(_Fields field) {
14205
      switch (field) {
14206
      case SUCCESS:
14207
        return isSetSuccess();
14208
      case EX:
14209
        return isSetEx();
14210
      }
14211
      throw new IllegalStateException();
14212
    }
14213
 
14214
    public boolean isSet(int fieldID) {
14215
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14216
    }
14217
 
14218
    @Override
14219
    public boolean equals(Object that) {
14220
      if (that == null)
14221
        return false;
483 rajveer 14222
      if (that instanceof createOrder_result)
14223
        return this.equals((createOrder_result)that);
68 ashish 14224
      return false;
14225
    }
14226
 
483 rajveer 14227
    public boolean equals(createOrder_result that) {
68 ashish 14228
      if (that == null)
14229
        return false;
14230
 
14231
      boolean this_present_success = true;
14232
      boolean that_present_success = true;
14233
      if (this_present_success || that_present_success) {
14234
        if (!(this_present_success && that_present_success))
14235
          return false;
14236
        if (this.success != that.success)
14237
          return false;
14238
      }
14239
 
14240
      boolean this_present_ex = true && this.isSetEx();
14241
      boolean that_present_ex = true && that.isSetEx();
14242
      if (this_present_ex || that_present_ex) {
14243
        if (!(this_present_ex && that_present_ex))
14244
          return false;
14245
        if (!this.ex.equals(that.ex))
14246
          return false;
14247
      }
14248
 
14249
      return true;
14250
    }
14251
 
14252
    @Override
14253
    public int hashCode() {
14254
      return 0;
14255
    }
14256
 
483 rajveer 14257
    public int compareTo(createOrder_result other) {
68 ashish 14258
      if (!getClass().equals(other.getClass())) {
14259
        return getClass().getName().compareTo(other.getClass().getName());
14260
      }
14261
 
14262
      int lastComparison = 0;
483 rajveer 14263
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 14264
 
14265
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14266
      if (lastComparison != 0) {
14267
        return lastComparison;
14268
      }
14269
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14270
      if (lastComparison != 0) {
14271
        return lastComparison;
14272
      }
14273
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14274
      if (lastComparison != 0) {
14275
        return lastComparison;
14276
      }
14277
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14278
      if (lastComparison != 0) {
14279
        return lastComparison;
14280
      }
14281
      return 0;
14282
    }
14283
 
14284
    public void read(TProtocol iprot) throws TException {
14285
      TField field;
14286
      iprot.readStructBegin();
14287
      while (true)
14288
      {
14289
        field = iprot.readFieldBegin();
14290
        if (field.type == TType.STOP) { 
14291
          break;
14292
        }
14293
        _Fields fieldId = _Fields.findByThriftId(field.id);
14294
        if (fieldId == null) {
14295
          TProtocolUtil.skip(iprot, field.type);
14296
        } else {
14297
          switch (fieldId) {
14298
            case SUCCESS:
483 rajveer 14299
              if (field.type == TType.I64) {
14300
                this.success = iprot.readI64();
68 ashish 14301
                setSuccessIsSet(true);
14302
              } else { 
14303
                TProtocolUtil.skip(iprot, field.type);
14304
              }
14305
              break;
14306
            case EX:
14307
              if (field.type == TType.STRUCT) {
14308
                this.ex = new TransactionServiceException();
14309
                this.ex.read(iprot);
14310
              } else { 
14311
                TProtocolUtil.skip(iprot, field.type);
14312
              }
14313
              break;
14314
          }
14315
          iprot.readFieldEnd();
14316
        }
14317
      }
14318
      iprot.readStructEnd();
14319
      validate();
14320
    }
14321
 
14322
    public void write(TProtocol oprot) throws TException {
14323
      oprot.writeStructBegin(STRUCT_DESC);
14324
 
14325
      if (this.isSetSuccess()) {
14326
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14327
        oprot.writeI64(this.success);
68 ashish 14328
        oprot.writeFieldEnd();
14329
      } else if (this.isSetEx()) {
14330
        oprot.writeFieldBegin(EX_FIELD_DESC);
14331
        this.ex.write(oprot);
14332
        oprot.writeFieldEnd();
14333
      }
14334
      oprot.writeFieldStop();
14335
      oprot.writeStructEnd();
14336
    }
14337
 
14338
    @Override
14339
    public String toString() {
483 rajveer 14340
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 14341
      boolean first = true;
14342
 
14343
      sb.append("success:");
14344
      sb.append(this.success);
14345
      first = false;
14346
      if (!first) sb.append(", ");
14347
      sb.append("ex:");
14348
      if (this.ex == null) {
14349
        sb.append("null");
14350
      } else {
14351
        sb.append(this.ex);
14352
      }
14353
      first = false;
14354
      sb.append(")");
14355
      return sb.toString();
14356
    }
14357
 
14358
    public void validate() throws TException {
14359
      // check for required fields
14360
    }
14361
 
14362
  }
14363
 
483 rajveer 14364
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
14365
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 14366
 
483 rajveer 14367
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 14368
 
483 rajveer 14369
    private long id;
68 ashish 14370
 
14371
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14372
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14373
      ID((short)1, "id");
68 ashish 14374
 
14375
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14376
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14377
 
14378
      static {
14379
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14380
          byId.put((int)field._thriftId, field);
14381
          byName.put(field.getFieldName(), field);
14382
        }
14383
      }
14384
 
14385
      /**
14386
       * Find the _Fields constant that matches fieldId, or null if its not found.
14387
       */
14388
      public static _Fields findByThriftId(int fieldId) {
14389
        return byId.get(fieldId);
14390
      }
14391
 
14392
      /**
14393
       * Find the _Fields constant that matches fieldId, throwing an exception
14394
       * if it is not found.
14395
       */
14396
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14397
        _Fields fields = findByThriftId(fieldId);
14398
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14399
        return fields;
14400
      }
14401
 
14402
      /**
14403
       * Find the _Fields constant that matches name, or null if its not found.
14404
       */
14405
      public static _Fields findByName(String name) {
14406
        return byName.get(name);
14407
      }
14408
 
14409
      private final short _thriftId;
14410
      private final String _fieldName;
14411
 
14412
      _Fields(short thriftId, String fieldName) {
14413
        _thriftId = thriftId;
14414
        _fieldName = fieldName;
14415
      }
14416
 
14417
      public short getThriftFieldId() {
14418
        return _thriftId;
14419
      }
14420
 
14421
      public String getFieldName() {
14422
        return _fieldName;
14423
      }
14424
    }
14425
 
14426
    // isset id assignments
483 rajveer 14427
    private static final int __ID_ISSET_ID = 0;
14428
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 14429
 
14430
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14431
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 14432
          new FieldValueMetaData(TType.I64)));
14433
    }});
14434
 
14435
    static {
483 rajveer 14436
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 14437
    }
14438
 
483 rajveer 14439
    public getOrder_args() {
68 ashish 14440
    }
14441
 
483 rajveer 14442
    public getOrder_args(
14443
      long id)
68 ashish 14444
    {
14445
      this();
483 rajveer 14446
      this.id = id;
14447
      setIdIsSet(true);
68 ashish 14448
    }
14449
 
14450
    /**
14451
     * Performs a deep copy on <i>other</i>.
14452
     */
483 rajveer 14453
    public getOrder_args(getOrder_args other) {
68 ashish 14454
      __isset_bit_vector.clear();
14455
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14456
      this.id = other.id;
68 ashish 14457
    }
14458
 
483 rajveer 14459
    public getOrder_args deepCopy() {
14460
      return new getOrder_args(this);
68 ashish 14461
    }
14462
 
14463
    @Deprecated
483 rajveer 14464
    public getOrder_args clone() {
14465
      return new getOrder_args(this);
68 ashish 14466
    }
14467
 
483 rajveer 14468
    public long getId() {
14469
      return this.id;
68 ashish 14470
    }
14471
 
483 rajveer 14472
    public getOrder_args setId(long id) {
14473
      this.id = id;
14474
      setIdIsSet(true);
68 ashish 14475
      return this;
14476
    }
14477
 
483 rajveer 14478
    public void unsetId() {
14479
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 14480
    }
14481
 
483 rajveer 14482
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
14483
    public boolean isSetId() {
14484
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 14485
    }
14486
 
483 rajveer 14487
    public void setIdIsSet(boolean value) {
14488
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 14489
    }
14490
 
14491
    public void setFieldValue(_Fields field, Object value) {
14492
      switch (field) {
483 rajveer 14493
      case ID:
68 ashish 14494
        if (value == null) {
483 rajveer 14495
          unsetId();
68 ashish 14496
        } else {
483 rajveer 14497
          setId((Long)value);
68 ashish 14498
        }
14499
        break;
14500
 
14501
      }
14502
    }
14503
 
14504
    public void setFieldValue(int fieldID, Object value) {
14505
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14506
    }
14507
 
14508
    public Object getFieldValue(_Fields field) {
14509
      switch (field) {
483 rajveer 14510
      case ID:
14511
        return new Long(getId());
68 ashish 14512
 
14513
      }
14514
      throw new IllegalStateException();
14515
    }
14516
 
14517
    public Object getFieldValue(int fieldId) {
14518
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14519
    }
14520
 
14521
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14522
    public boolean isSet(_Fields field) {
14523
      switch (field) {
483 rajveer 14524
      case ID:
14525
        return isSetId();
68 ashish 14526
      }
14527
      throw new IllegalStateException();
14528
    }
14529
 
14530
    public boolean isSet(int fieldID) {
14531
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14532
    }
14533
 
14534
    @Override
14535
    public boolean equals(Object that) {
14536
      if (that == null)
14537
        return false;
483 rajveer 14538
      if (that instanceof getOrder_args)
14539
        return this.equals((getOrder_args)that);
68 ashish 14540
      return false;
14541
    }
14542
 
483 rajveer 14543
    public boolean equals(getOrder_args that) {
68 ashish 14544
      if (that == null)
14545
        return false;
14546
 
483 rajveer 14547
      boolean this_present_id = true;
14548
      boolean that_present_id = true;
14549
      if (this_present_id || that_present_id) {
14550
        if (!(this_present_id && that_present_id))
68 ashish 14551
          return false;
483 rajveer 14552
        if (this.id != that.id)
68 ashish 14553
          return false;
14554
      }
14555
 
14556
      return true;
14557
    }
14558
 
14559
    @Override
14560
    public int hashCode() {
14561
      return 0;
14562
    }
14563
 
483 rajveer 14564
    public int compareTo(getOrder_args other) {
68 ashish 14565
      if (!getClass().equals(other.getClass())) {
14566
        return getClass().getName().compareTo(other.getClass().getName());
14567
      }
14568
 
14569
      int lastComparison = 0;
483 rajveer 14570
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 14571
 
483 rajveer 14572
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 14573
      if (lastComparison != 0) {
14574
        return lastComparison;
14575
      }
483 rajveer 14576
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 14577
      if (lastComparison != 0) {
14578
        return lastComparison;
14579
      }
14580
      return 0;
14581
    }
14582
 
14583
    public void read(TProtocol iprot) throws TException {
14584
      TField field;
14585
      iprot.readStructBegin();
14586
      while (true)
14587
      {
14588
        field = iprot.readFieldBegin();
14589
        if (field.type == TType.STOP) { 
14590
          break;
14591
        }
14592
        _Fields fieldId = _Fields.findByThriftId(field.id);
14593
        if (fieldId == null) {
14594
          TProtocolUtil.skip(iprot, field.type);
14595
        } else {
14596
          switch (fieldId) {
483 rajveer 14597
            case ID:
68 ashish 14598
              if (field.type == TType.I64) {
483 rajveer 14599
                this.id = iprot.readI64();
14600
                setIdIsSet(true);
68 ashish 14601
              } else { 
14602
                TProtocolUtil.skip(iprot, field.type);
14603
              }
14604
              break;
14605
          }
14606
          iprot.readFieldEnd();
14607
        }
14608
      }
14609
      iprot.readStructEnd();
14610
      validate();
14611
    }
14612
 
14613
    public void write(TProtocol oprot) throws TException {
14614
      validate();
14615
 
14616
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14617
      oprot.writeFieldBegin(ID_FIELD_DESC);
14618
      oprot.writeI64(this.id);
68 ashish 14619
      oprot.writeFieldEnd();
14620
      oprot.writeFieldStop();
14621
      oprot.writeStructEnd();
14622
    }
14623
 
14624
    @Override
14625
    public String toString() {
483 rajveer 14626
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 14627
      boolean first = true;
14628
 
483 rajveer 14629
      sb.append("id:");
14630
      sb.append(this.id);
68 ashish 14631
      first = false;
14632
      sb.append(")");
14633
      return sb.toString();
14634
    }
14635
 
14636
    public void validate() throws TException {
14637
      // check for required fields
14638
    }
14639
 
14640
  }
14641
 
483 rajveer 14642
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
14643
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 14644
 
483 rajveer 14645
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 14646
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14647
 
483 rajveer 14648
    private Order success;
68 ashish 14649
    private TransactionServiceException ex;
14650
 
14651
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14652
    public enum _Fields implements TFieldIdEnum {
14653
      SUCCESS((short)0, "success"),
14654
      EX((short)1, "ex");
14655
 
14656
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14658
 
14659
      static {
14660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14661
          byId.put((int)field._thriftId, field);
14662
          byName.put(field.getFieldName(), field);
14663
        }
14664
      }
14665
 
14666
      /**
14667
       * Find the _Fields constant that matches fieldId, or null if its not found.
14668
       */
14669
      public static _Fields findByThriftId(int fieldId) {
14670
        return byId.get(fieldId);
14671
      }
14672
 
14673
      /**
14674
       * Find the _Fields constant that matches fieldId, throwing an exception
14675
       * if it is not found.
14676
       */
14677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14678
        _Fields fields = findByThriftId(fieldId);
14679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14680
        return fields;
14681
      }
14682
 
14683
      /**
14684
       * Find the _Fields constant that matches name, or null if its not found.
14685
       */
14686
      public static _Fields findByName(String name) {
14687
        return byName.get(name);
14688
      }
14689
 
14690
      private final short _thriftId;
14691
      private final String _fieldName;
14692
 
14693
      _Fields(short thriftId, String fieldName) {
14694
        _thriftId = thriftId;
14695
        _fieldName = fieldName;
14696
      }
14697
 
14698
      public short getThriftFieldId() {
14699
        return _thriftId;
14700
      }
14701
 
14702
      public String getFieldName() {
14703
        return _fieldName;
14704
      }
14705
    }
14706
 
14707
    // isset id assignments
14708
 
14709
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14710
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14711
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 14712
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14713
          new FieldValueMetaData(TType.STRUCT)));
14714
    }});
14715
 
14716
    static {
483 rajveer 14717
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 14718
    }
14719
 
483 rajveer 14720
    public getOrder_result() {
68 ashish 14721
    }
14722
 
483 rajveer 14723
    public getOrder_result(
14724
      Order success,
68 ashish 14725
      TransactionServiceException ex)
14726
    {
14727
      this();
14728
      this.success = success;
14729
      this.ex = ex;
14730
    }
14731
 
14732
    /**
14733
     * Performs a deep copy on <i>other</i>.
14734
     */
483 rajveer 14735
    public getOrder_result(getOrder_result other) {
14736
      if (other.isSetSuccess()) {
14737
        this.success = new Order(other.success);
14738
      }
68 ashish 14739
      if (other.isSetEx()) {
14740
        this.ex = new TransactionServiceException(other.ex);
14741
      }
14742
    }
14743
 
483 rajveer 14744
    public getOrder_result deepCopy() {
14745
      return new getOrder_result(this);
68 ashish 14746
    }
14747
 
14748
    @Deprecated
483 rajveer 14749
    public getOrder_result clone() {
14750
      return new getOrder_result(this);
68 ashish 14751
    }
14752
 
483 rajveer 14753
    public Order getSuccess() {
68 ashish 14754
      return this.success;
14755
    }
14756
 
483 rajveer 14757
    public getOrder_result setSuccess(Order success) {
68 ashish 14758
      this.success = success;
14759
      return this;
14760
    }
14761
 
14762
    public void unsetSuccess() {
483 rajveer 14763
      this.success = null;
68 ashish 14764
    }
14765
 
14766
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14767
    public boolean isSetSuccess() {
483 rajveer 14768
      return this.success != null;
68 ashish 14769
    }
14770
 
14771
    public void setSuccessIsSet(boolean value) {
483 rajveer 14772
      if (!value) {
14773
        this.success = null;
14774
      }
68 ashish 14775
    }
14776
 
14777
    public TransactionServiceException getEx() {
14778
      return this.ex;
14779
    }
14780
 
483 rajveer 14781
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 14782
      this.ex = ex;
14783
      return this;
14784
    }
14785
 
14786
    public void unsetEx() {
14787
      this.ex = null;
14788
    }
14789
 
14790
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14791
    public boolean isSetEx() {
14792
      return this.ex != null;
14793
    }
14794
 
14795
    public void setExIsSet(boolean value) {
14796
      if (!value) {
14797
        this.ex = null;
14798
      }
14799
    }
14800
 
14801
    public void setFieldValue(_Fields field, Object value) {
14802
      switch (field) {
14803
      case SUCCESS:
14804
        if (value == null) {
14805
          unsetSuccess();
14806
        } else {
483 rajveer 14807
          setSuccess((Order)value);
68 ashish 14808
        }
14809
        break;
14810
 
14811
      case EX:
14812
        if (value == null) {
14813
          unsetEx();
14814
        } else {
14815
          setEx((TransactionServiceException)value);
14816
        }
14817
        break;
14818
 
14819
      }
14820
    }
14821
 
14822
    public void setFieldValue(int fieldID, Object value) {
14823
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14824
    }
14825
 
14826
    public Object getFieldValue(_Fields field) {
14827
      switch (field) {
14828
      case SUCCESS:
483 rajveer 14829
        return getSuccess();
68 ashish 14830
 
14831
      case EX:
14832
        return getEx();
14833
 
14834
      }
14835
      throw new IllegalStateException();
14836
    }
14837
 
14838
    public Object getFieldValue(int fieldId) {
14839
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14840
    }
14841
 
14842
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14843
    public boolean isSet(_Fields field) {
14844
      switch (field) {
14845
      case SUCCESS:
14846
        return isSetSuccess();
14847
      case EX:
14848
        return isSetEx();
14849
      }
14850
      throw new IllegalStateException();
14851
    }
14852
 
14853
    public boolean isSet(int fieldID) {
14854
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14855
    }
14856
 
14857
    @Override
14858
    public boolean equals(Object that) {
14859
      if (that == null)
14860
        return false;
483 rajveer 14861
      if (that instanceof getOrder_result)
14862
        return this.equals((getOrder_result)that);
68 ashish 14863
      return false;
14864
    }
14865
 
483 rajveer 14866
    public boolean equals(getOrder_result that) {
68 ashish 14867
      if (that == null)
14868
        return false;
14869
 
483 rajveer 14870
      boolean this_present_success = true && this.isSetSuccess();
14871
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 14872
      if (this_present_success || that_present_success) {
14873
        if (!(this_present_success && that_present_success))
14874
          return false;
483 rajveer 14875
        if (!this.success.equals(that.success))
68 ashish 14876
          return false;
14877
      }
14878
 
14879
      boolean this_present_ex = true && this.isSetEx();
14880
      boolean that_present_ex = true && that.isSetEx();
14881
      if (this_present_ex || that_present_ex) {
14882
        if (!(this_present_ex && that_present_ex))
14883
          return false;
14884
        if (!this.ex.equals(that.ex))
14885
          return false;
14886
      }
14887
 
14888
      return true;
14889
    }
14890
 
14891
    @Override
14892
    public int hashCode() {
14893
      return 0;
14894
    }
14895
 
483 rajveer 14896
    public int compareTo(getOrder_result other) {
68 ashish 14897
      if (!getClass().equals(other.getClass())) {
14898
        return getClass().getName().compareTo(other.getClass().getName());
14899
      }
14900
 
14901
      int lastComparison = 0;
483 rajveer 14902
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 14903
 
14904
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14905
      if (lastComparison != 0) {
14906
        return lastComparison;
14907
      }
14908
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14909
      if (lastComparison != 0) {
14910
        return lastComparison;
14911
      }
14912
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14913
      if (lastComparison != 0) {
14914
        return lastComparison;
14915
      }
14916
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14917
      if (lastComparison != 0) {
14918
        return lastComparison;
14919
      }
14920
      return 0;
14921
    }
14922
 
14923
    public void read(TProtocol iprot) throws TException {
14924
      TField field;
14925
      iprot.readStructBegin();
14926
      while (true)
14927
      {
14928
        field = iprot.readFieldBegin();
14929
        if (field.type == TType.STOP) { 
14930
          break;
14931
        }
14932
        _Fields fieldId = _Fields.findByThriftId(field.id);
14933
        if (fieldId == null) {
14934
          TProtocolUtil.skip(iprot, field.type);
14935
        } else {
14936
          switch (fieldId) {
14937
            case SUCCESS:
483 rajveer 14938
              if (field.type == TType.STRUCT) {
14939
                this.success = new Order();
14940
                this.success.read(iprot);
68 ashish 14941
              } else { 
14942
                TProtocolUtil.skip(iprot, field.type);
14943
              }
14944
              break;
14945
            case EX:
14946
              if (field.type == TType.STRUCT) {
14947
                this.ex = new TransactionServiceException();
14948
                this.ex.read(iprot);
14949
              } else { 
14950
                TProtocolUtil.skip(iprot, field.type);
14951
              }
14952
              break;
14953
          }
14954
          iprot.readFieldEnd();
14955
        }
14956
      }
14957
      iprot.readStructEnd();
14958
      validate();
14959
    }
14960
 
14961
    public void write(TProtocol oprot) throws TException {
14962
      oprot.writeStructBegin(STRUCT_DESC);
14963
 
14964
      if (this.isSetSuccess()) {
14965
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14966
        this.success.write(oprot);
68 ashish 14967
        oprot.writeFieldEnd();
14968
      } else if (this.isSetEx()) {
14969
        oprot.writeFieldBegin(EX_FIELD_DESC);
14970
        this.ex.write(oprot);
14971
        oprot.writeFieldEnd();
14972
      }
14973
      oprot.writeFieldStop();
14974
      oprot.writeStructEnd();
14975
    }
14976
 
14977
    @Override
14978
    public String toString() {
483 rajveer 14979
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 14980
      boolean first = true;
14981
 
14982
      sb.append("success:");
483 rajveer 14983
      if (this.success == null) {
14984
        sb.append("null");
14985
      } else {
14986
        sb.append(this.success);
14987
      }
68 ashish 14988
      first = false;
14989
      if (!first) sb.append(", ");
14990
      sb.append("ex:");
14991
      if (this.ex == null) {
14992
        sb.append("null");
14993
      } else {
14994
        sb.append(this.ex);
14995
      }
14996
      first = false;
14997
      sb.append(")");
14998
      return sb.toString();
14999
    }
15000
 
15001
    public void validate() throws TException {
15002
      // check for required fields
15003
    }
15004
 
15005
  }
15006
 
483 rajveer 15007
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
15008
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 15009
 
483 rajveer 15010
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 15011
 
483 rajveer 15012
    private long orderId;
68 ashish 15013
 
15014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15015
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15016
      ORDER_ID((short)1, "orderId");
68 ashish 15017
 
15018
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15019
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15020
 
15021
      static {
15022
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15023
          byId.put((int)field._thriftId, field);
15024
          byName.put(field.getFieldName(), field);
15025
        }
15026
      }
15027
 
15028
      /**
15029
       * Find the _Fields constant that matches fieldId, or null if its not found.
15030
       */
15031
      public static _Fields findByThriftId(int fieldId) {
15032
        return byId.get(fieldId);
15033
      }
15034
 
15035
      /**
15036
       * Find the _Fields constant that matches fieldId, throwing an exception
15037
       * if it is not found.
15038
       */
15039
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15040
        _Fields fields = findByThriftId(fieldId);
15041
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15042
        return fields;
15043
      }
15044
 
15045
      /**
15046
       * Find the _Fields constant that matches name, or null if its not found.
15047
       */
15048
      public static _Fields findByName(String name) {
15049
        return byName.get(name);
15050
      }
15051
 
15052
      private final short _thriftId;
15053
      private final String _fieldName;
15054
 
15055
      _Fields(short thriftId, String fieldName) {
15056
        _thriftId = thriftId;
15057
        _fieldName = fieldName;
15058
      }
15059
 
15060
      public short getThriftFieldId() {
15061
        return _thriftId;
15062
      }
15063
 
15064
      public String getFieldName() {
15065
        return _fieldName;
15066
      }
15067
    }
15068
 
15069
    // isset id assignments
483 rajveer 15070
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 15071
    private BitSet __isset_bit_vector = new BitSet(1);
15072
 
15073
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15074
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 15075
          new FieldValueMetaData(TType.I64)));
15076
    }});
15077
 
15078
    static {
483 rajveer 15079
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 15080
    }
15081
 
483 rajveer 15082
    public getLineItemsForOrder_args() {
68 ashish 15083
    }
15084
 
483 rajveer 15085
    public getLineItemsForOrder_args(
15086
      long orderId)
68 ashish 15087
    {
15088
      this();
483 rajveer 15089
      this.orderId = orderId;
15090
      setOrderIdIsSet(true);
68 ashish 15091
    }
15092
 
15093
    /**
15094
     * Performs a deep copy on <i>other</i>.
15095
     */
483 rajveer 15096
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 15097
      __isset_bit_vector.clear();
15098
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15099
      this.orderId = other.orderId;
68 ashish 15100
    }
15101
 
483 rajveer 15102
    public getLineItemsForOrder_args deepCopy() {
15103
      return new getLineItemsForOrder_args(this);
68 ashish 15104
    }
15105
 
15106
    @Deprecated
483 rajveer 15107
    public getLineItemsForOrder_args clone() {
15108
      return new getLineItemsForOrder_args(this);
68 ashish 15109
    }
15110
 
483 rajveer 15111
    public long getOrderId() {
15112
      return this.orderId;
68 ashish 15113
    }
15114
 
483 rajveer 15115
    public getLineItemsForOrder_args setOrderId(long orderId) {
15116
      this.orderId = orderId;
15117
      setOrderIdIsSet(true);
68 ashish 15118
      return this;
15119
    }
15120
 
483 rajveer 15121
    public void unsetOrderId() {
15122
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 15123
    }
15124
 
483 rajveer 15125
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15126
    public boolean isSetOrderId() {
15127
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 15128
    }
15129
 
483 rajveer 15130
    public void setOrderIdIsSet(boolean value) {
15131
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 15132
    }
15133
 
15134
    public void setFieldValue(_Fields field, Object value) {
15135
      switch (field) {
483 rajveer 15136
      case ORDER_ID:
68 ashish 15137
        if (value == null) {
483 rajveer 15138
          unsetOrderId();
68 ashish 15139
        } else {
483 rajveer 15140
          setOrderId((Long)value);
68 ashish 15141
        }
15142
        break;
15143
 
15144
      }
15145
    }
15146
 
15147
    public void setFieldValue(int fieldID, Object value) {
15148
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15149
    }
15150
 
15151
    public Object getFieldValue(_Fields field) {
15152
      switch (field) {
483 rajveer 15153
      case ORDER_ID:
15154
        return new Long(getOrderId());
68 ashish 15155
 
15156
      }
15157
      throw new IllegalStateException();
15158
    }
15159
 
15160
    public Object getFieldValue(int fieldId) {
15161
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15162
    }
15163
 
15164
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15165
    public boolean isSet(_Fields field) {
15166
      switch (field) {
483 rajveer 15167
      case ORDER_ID:
15168
        return isSetOrderId();
68 ashish 15169
      }
15170
      throw new IllegalStateException();
15171
    }
15172
 
15173
    public boolean isSet(int fieldID) {
15174
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15175
    }
15176
 
15177
    @Override
15178
    public boolean equals(Object that) {
15179
      if (that == null)
15180
        return false;
483 rajveer 15181
      if (that instanceof getLineItemsForOrder_args)
15182
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 15183
      return false;
15184
    }
15185
 
483 rajveer 15186
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 15187
      if (that == null)
15188
        return false;
15189
 
483 rajveer 15190
      boolean this_present_orderId = true;
15191
      boolean that_present_orderId = true;
15192
      if (this_present_orderId || that_present_orderId) {
15193
        if (!(this_present_orderId && that_present_orderId))
68 ashish 15194
          return false;
483 rajveer 15195
        if (this.orderId != that.orderId)
68 ashish 15196
          return false;
15197
      }
15198
 
15199
      return true;
15200
    }
15201
 
15202
    @Override
15203
    public int hashCode() {
15204
      return 0;
15205
    }
15206
 
483 rajveer 15207
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 15208
      if (!getClass().equals(other.getClass())) {
15209
        return getClass().getName().compareTo(other.getClass().getName());
15210
      }
15211
 
15212
      int lastComparison = 0;
483 rajveer 15213
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 15214
 
483 rajveer 15215
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 15216
      if (lastComparison != 0) {
15217
        return lastComparison;
15218
      }
483 rajveer 15219
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 15220
      if (lastComparison != 0) {
15221
        return lastComparison;
15222
      }
15223
      return 0;
15224
    }
15225
 
15226
    public void read(TProtocol iprot) throws TException {
15227
      TField field;
15228
      iprot.readStructBegin();
15229
      while (true)
15230
      {
15231
        field = iprot.readFieldBegin();
15232
        if (field.type == TType.STOP) { 
15233
          break;
15234
        }
15235
        _Fields fieldId = _Fields.findByThriftId(field.id);
15236
        if (fieldId == null) {
15237
          TProtocolUtil.skip(iprot, field.type);
15238
        } else {
15239
          switch (fieldId) {
483 rajveer 15240
            case ORDER_ID:
68 ashish 15241
              if (field.type == TType.I64) {
483 rajveer 15242
                this.orderId = iprot.readI64();
15243
                setOrderIdIsSet(true);
68 ashish 15244
              } else { 
15245
                TProtocolUtil.skip(iprot, field.type);
15246
              }
15247
              break;
15248
          }
15249
          iprot.readFieldEnd();
15250
        }
15251
      }
15252
      iprot.readStructEnd();
15253
      validate();
15254
    }
15255
 
15256
    public void write(TProtocol oprot) throws TException {
15257
      validate();
15258
 
15259
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15260
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15261
      oprot.writeI64(this.orderId);
68 ashish 15262
      oprot.writeFieldEnd();
15263
      oprot.writeFieldStop();
15264
      oprot.writeStructEnd();
15265
    }
15266
 
15267
    @Override
15268
    public String toString() {
483 rajveer 15269
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 15270
      boolean first = true;
15271
 
483 rajveer 15272
      sb.append("orderId:");
15273
      sb.append(this.orderId);
68 ashish 15274
      first = false;
15275
      sb.append(")");
15276
      return sb.toString();
15277
    }
15278
 
15279
    public void validate() throws TException {
15280
      // check for required fields
15281
    }
15282
 
15283
  }
15284
 
483 rajveer 15285
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
15286
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 15287
 
483 rajveer 15288
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15289
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15290
 
483 rajveer 15291
    private List<LineItem> success;
68 ashish 15292
    private TransactionServiceException ex;
15293
 
15294
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15295
    public enum _Fields implements TFieldIdEnum {
15296
      SUCCESS((short)0, "success"),
15297
      EX((short)1, "ex");
15298
 
15299
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15300
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15301
 
15302
      static {
15303
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15304
          byId.put((int)field._thriftId, field);
15305
          byName.put(field.getFieldName(), field);
15306
        }
15307
      }
15308
 
15309
      /**
15310
       * Find the _Fields constant that matches fieldId, or null if its not found.
15311
       */
15312
      public static _Fields findByThriftId(int fieldId) {
15313
        return byId.get(fieldId);
15314
      }
15315
 
15316
      /**
15317
       * Find the _Fields constant that matches fieldId, throwing an exception
15318
       * if it is not found.
15319
       */
15320
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15321
        _Fields fields = findByThriftId(fieldId);
15322
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15323
        return fields;
15324
      }
15325
 
15326
      /**
15327
       * Find the _Fields constant that matches name, or null if its not found.
15328
       */
15329
      public static _Fields findByName(String name) {
15330
        return byName.get(name);
15331
      }
15332
 
15333
      private final short _thriftId;
15334
      private final String _fieldName;
15335
 
15336
      _Fields(short thriftId, String fieldName) {
15337
        _thriftId = thriftId;
15338
        _fieldName = fieldName;
15339
      }
15340
 
15341
      public short getThriftFieldId() {
15342
        return _thriftId;
15343
      }
15344
 
15345
      public String getFieldName() {
15346
        return _fieldName;
15347
      }
15348
    }
15349
 
15350
    // isset id assignments
15351
 
15352
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15353
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15354
          new ListMetaData(TType.LIST, 
15355
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 15356
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15357
          new FieldValueMetaData(TType.STRUCT)));
15358
    }});
15359
 
15360
    static {
483 rajveer 15361
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 15362
    }
15363
 
483 rajveer 15364
    public getLineItemsForOrder_result() {
68 ashish 15365
    }
15366
 
483 rajveer 15367
    public getLineItemsForOrder_result(
15368
      List<LineItem> success,
68 ashish 15369
      TransactionServiceException ex)
15370
    {
15371
      this();
15372
      this.success = success;
15373
      this.ex = ex;
15374
    }
15375
 
15376
    /**
15377
     * Performs a deep copy on <i>other</i>.
15378
     */
483 rajveer 15379
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
15380
      if (other.isSetSuccess()) {
15381
        List<LineItem> __this__success = new ArrayList<LineItem>();
15382
        for (LineItem other_element : other.success) {
15383
          __this__success.add(new LineItem(other_element));
15384
        }
15385
        this.success = __this__success;
15386
      }
68 ashish 15387
      if (other.isSetEx()) {
15388
        this.ex = new TransactionServiceException(other.ex);
15389
      }
15390
    }
15391
 
483 rajveer 15392
    public getLineItemsForOrder_result deepCopy() {
15393
      return new getLineItemsForOrder_result(this);
68 ashish 15394
    }
15395
 
15396
    @Deprecated
483 rajveer 15397
    public getLineItemsForOrder_result clone() {
15398
      return new getLineItemsForOrder_result(this);
68 ashish 15399
    }
15400
 
483 rajveer 15401
    public int getSuccessSize() {
15402
      return (this.success == null) ? 0 : this.success.size();
15403
    }
15404
 
15405
    public java.util.Iterator<LineItem> getSuccessIterator() {
15406
      return (this.success == null) ? null : this.success.iterator();
15407
    }
15408
 
15409
    public void addToSuccess(LineItem elem) {
15410
      if (this.success == null) {
15411
        this.success = new ArrayList<LineItem>();
15412
      }
15413
      this.success.add(elem);
15414
    }
15415
 
15416
    public List<LineItem> getSuccess() {
68 ashish 15417
      return this.success;
15418
    }
15419
 
483 rajveer 15420
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 15421
      this.success = success;
15422
      return this;
15423
    }
15424
 
15425
    public void unsetSuccess() {
483 rajveer 15426
      this.success = null;
68 ashish 15427
    }
15428
 
15429
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15430
    public boolean isSetSuccess() {
483 rajveer 15431
      return this.success != null;
68 ashish 15432
    }
15433
 
15434
    public void setSuccessIsSet(boolean value) {
483 rajveer 15435
      if (!value) {
15436
        this.success = null;
15437
      }
68 ashish 15438
    }
15439
 
15440
    public TransactionServiceException getEx() {
15441
      return this.ex;
15442
    }
15443
 
483 rajveer 15444
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 15445
      this.ex = ex;
15446
      return this;
15447
    }
15448
 
15449
    public void unsetEx() {
15450
      this.ex = null;
15451
    }
15452
 
15453
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15454
    public boolean isSetEx() {
15455
      return this.ex != null;
15456
    }
15457
 
15458
    public void setExIsSet(boolean value) {
15459
      if (!value) {
15460
        this.ex = null;
15461
      }
15462
    }
15463
 
15464
    public void setFieldValue(_Fields field, Object value) {
15465
      switch (field) {
15466
      case SUCCESS:
15467
        if (value == null) {
15468
          unsetSuccess();
15469
        } else {
483 rajveer 15470
          setSuccess((List<LineItem>)value);
68 ashish 15471
        }
15472
        break;
15473
 
15474
      case EX:
15475
        if (value == null) {
15476
          unsetEx();
15477
        } else {
15478
          setEx((TransactionServiceException)value);
15479
        }
15480
        break;
15481
 
15482
      }
15483
    }
15484
 
15485
    public void setFieldValue(int fieldID, Object value) {
15486
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15487
    }
15488
 
15489
    public Object getFieldValue(_Fields field) {
15490
      switch (field) {
15491
      case SUCCESS:
483 rajveer 15492
        return getSuccess();
68 ashish 15493
 
15494
      case EX:
15495
        return getEx();
15496
 
15497
      }
15498
      throw new IllegalStateException();
15499
    }
15500
 
15501
    public Object getFieldValue(int fieldId) {
15502
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15503
    }
15504
 
15505
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15506
    public boolean isSet(_Fields field) {
15507
      switch (field) {
15508
      case SUCCESS:
15509
        return isSetSuccess();
15510
      case EX:
15511
        return isSetEx();
15512
      }
15513
      throw new IllegalStateException();
15514
    }
15515
 
15516
    public boolean isSet(int fieldID) {
15517
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15518
    }
15519
 
15520
    @Override
15521
    public boolean equals(Object that) {
15522
      if (that == null)
15523
        return false;
483 rajveer 15524
      if (that instanceof getLineItemsForOrder_result)
15525
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 15526
      return false;
15527
    }
15528
 
483 rajveer 15529
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 15530
      if (that == null)
15531
        return false;
15532
 
483 rajveer 15533
      boolean this_present_success = true && this.isSetSuccess();
15534
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15535
      if (this_present_success || that_present_success) {
15536
        if (!(this_present_success && that_present_success))
15537
          return false;
483 rajveer 15538
        if (!this.success.equals(that.success))
68 ashish 15539
          return false;
15540
      }
15541
 
15542
      boolean this_present_ex = true && this.isSetEx();
15543
      boolean that_present_ex = true && that.isSetEx();
15544
      if (this_present_ex || that_present_ex) {
15545
        if (!(this_present_ex && that_present_ex))
15546
          return false;
15547
        if (!this.ex.equals(that.ex))
15548
          return false;
15549
      }
15550
 
15551
      return true;
15552
    }
15553
 
15554
    @Override
15555
    public int hashCode() {
15556
      return 0;
15557
    }
15558
 
483 rajveer 15559
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 15560
      if (!getClass().equals(other.getClass())) {
15561
        return getClass().getName().compareTo(other.getClass().getName());
15562
      }
15563
 
15564
      int lastComparison = 0;
483 rajveer 15565
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 15566
 
15567
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15568
      if (lastComparison != 0) {
15569
        return lastComparison;
15570
      }
15571
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15572
      if (lastComparison != 0) {
15573
        return lastComparison;
15574
      }
15575
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15576
      if (lastComparison != 0) {
15577
        return lastComparison;
15578
      }
15579
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15580
      if (lastComparison != 0) {
15581
        return lastComparison;
15582
      }
15583
      return 0;
15584
    }
15585
 
15586
    public void read(TProtocol iprot) throws TException {
15587
      TField field;
15588
      iprot.readStructBegin();
15589
      while (true)
15590
      {
15591
        field = iprot.readFieldBegin();
15592
        if (field.type == TType.STOP) { 
15593
          break;
15594
        }
15595
        _Fields fieldId = _Fields.findByThriftId(field.id);
15596
        if (fieldId == null) {
15597
          TProtocolUtil.skip(iprot, field.type);
15598
        } else {
15599
          switch (fieldId) {
15600
            case SUCCESS:
483 rajveer 15601
              if (field.type == TType.LIST) {
15602
                {
1022 varun.gupt 15603
                  TList _list32 = iprot.readListBegin();
15604
                  this.success = new ArrayList<LineItem>(_list32.size);
15605
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15606
                  {
1022 varun.gupt 15607
                    LineItem _elem34;
15608
                    _elem34 = new LineItem();
15609
                    _elem34.read(iprot);
15610
                    this.success.add(_elem34);
483 rajveer 15611
                  }
15612
                  iprot.readListEnd();
15613
                }
68 ashish 15614
              } else { 
15615
                TProtocolUtil.skip(iprot, field.type);
15616
              }
15617
              break;
15618
            case EX:
15619
              if (field.type == TType.STRUCT) {
15620
                this.ex = new TransactionServiceException();
15621
                this.ex.read(iprot);
15622
              } else { 
15623
                TProtocolUtil.skip(iprot, field.type);
15624
              }
15625
              break;
15626
          }
15627
          iprot.readFieldEnd();
15628
        }
15629
      }
15630
      iprot.readStructEnd();
15631
      validate();
15632
    }
15633
 
15634
    public void write(TProtocol oprot) throws TException {
15635
      oprot.writeStructBegin(STRUCT_DESC);
15636
 
15637
      if (this.isSetSuccess()) {
15638
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15639
        {
15640
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 15641
          for (LineItem _iter35 : this.success)
483 rajveer 15642
          {
1022 varun.gupt 15643
            _iter35.write(oprot);
483 rajveer 15644
          }
15645
          oprot.writeListEnd();
15646
        }
68 ashish 15647
        oprot.writeFieldEnd();
15648
      } else if (this.isSetEx()) {
15649
        oprot.writeFieldBegin(EX_FIELD_DESC);
15650
        this.ex.write(oprot);
15651
        oprot.writeFieldEnd();
15652
      }
15653
      oprot.writeFieldStop();
15654
      oprot.writeStructEnd();
15655
    }
15656
 
15657
    @Override
15658
    public String toString() {
483 rajveer 15659
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 15660
      boolean first = true;
15661
 
15662
      sb.append("success:");
483 rajveer 15663
      if (this.success == null) {
15664
        sb.append("null");
15665
      } else {
15666
        sb.append(this.success);
15667
      }
68 ashish 15668
      first = false;
15669
      if (!first) sb.append(", ");
15670
      sb.append("ex:");
15671
      if (this.ex == null) {
15672
        sb.append("null");
15673
      } else {
15674
        sb.append(this.ex);
15675
      }
15676
      first = false;
15677
      sb.append(")");
15678
      return sb.toString();
15679
    }
15680
 
15681
    public void validate() throws TException {
15682
      // check for required fields
15683
    }
15684
 
15685
  }
15686
 
758 chandransh 15687
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
15688
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
15689
 
15690
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
15691
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
15692
 
15693
    private long warehouseId;
15694
    private long providerId;
15695
 
15696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15697
    public enum _Fields implements TFieldIdEnum {
15698
      WAREHOUSE_ID((short)1, "warehouseId"),
15699
      PROVIDER_ID((short)2, "providerId");
15700
 
15701
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15703
 
15704
      static {
15705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15706
          byId.put((int)field._thriftId, field);
15707
          byName.put(field.getFieldName(), field);
15708
        }
15709
      }
15710
 
15711
      /**
15712
       * Find the _Fields constant that matches fieldId, or null if its not found.
15713
       */
15714
      public static _Fields findByThriftId(int fieldId) {
15715
        return byId.get(fieldId);
15716
      }
15717
 
15718
      /**
15719
       * Find the _Fields constant that matches fieldId, throwing an exception
15720
       * if it is not found.
15721
       */
15722
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15723
        _Fields fields = findByThriftId(fieldId);
15724
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15725
        return fields;
15726
      }
15727
 
15728
      /**
15729
       * Find the _Fields constant that matches name, or null if its not found.
15730
       */
15731
      public static _Fields findByName(String name) {
15732
        return byName.get(name);
15733
      }
15734
 
15735
      private final short _thriftId;
15736
      private final String _fieldName;
15737
 
15738
      _Fields(short thriftId, String fieldName) {
15739
        _thriftId = thriftId;
15740
        _fieldName = fieldName;
15741
      }
15742
 
15743
      public short getThriftFieldId() {
15744
        return _thriftId;
15745
      }
15746
 
15747
      public String getFieldName() {
15748
        return _fieldName;
15749
      }
15750
    }
15751
 
15752
    // isset id assignments
15753
    private static final int __WAREHOUSEID_ISSET_ID = 0;
15754
    private static final int __PROVIDERID_ISSET_ID = 1;
15755
    private BitSet __isset_bit_vector = new BitSet(2);
15756
 
15757
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15758
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
15759
          new FieldValueMetaData(TType.I64)));
15760
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
15761
          new FieldValueMetaData(TType.I64)));
15762
    }});
15763
 
15764
    static {
15765
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
15766
    }
15767
 
15768
    public markOrdersAsManifested_args() {
15769
    }
15770
 
15771
    public markOrdersAsManifested_args(
15772
      long warehouseId,
15773
      long providerId)
15774
    {
15775
      this();
15776
      this.warehouseId = warehouseId;
15777
      setWarehouseIdIsSet(true);
15778
      this.providerId = providerId;
15779
      setProviderIdIsSet(true);
15780
    }
15781
 
15782
    /**
15783
     * Performs a deep copy on <i>other</i>.
15784
     */
15785
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
15786
      __isset_bit_vector.clear();
15787
      __isset_bit_vector.or(other.__isset_bit_vector);
15788
      this.warehouseId = other.warehouseId;
15789
      this.providerId = other.providerId;
15790
    }
15791
 
15792
    public markOrdersAsManifested_args deepCopy() {
15793
      return new markOrdersAsManifested_args(this);
15794
    }
15795
 
15796
    @Deprecated
15797
    public markOrdersAsManifested_args clone() {
15798
      return new markOrdersAsManifested_args(this);
15799
    }
15800
 
15801
    public long getWarehouseId() {
15802
      return this.warehouseId;
15803
    }
15804
 
15805
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
15806
      this.warehouseId = warehouseId;
15807
      setWarehouseIdIsSet(true);
15808
      return this;
15809
    }
15810
 
15811
    public void unsetWarehouseId() {
15812
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
15813
    }
15814
 
15815
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
15816
    public boolean isSetWarehouseId() {
15817
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
15818
    }
15819
 
15820
    public void setWarehouseIdIsSet(boolean value) {
15821
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
15822
    }
15823
 
15824
    public long getProviderId() {
15825
      return this.providerId;
15826
    }
15827
 
15828
    public markOrdersAsManifested_args setProviderId(long providerId) {
15829
      this.providerId = providerId;
15830
      setProviderIdIsSet(true);
15831
      return this;
15832
    }
15833
 
15834
    public void unsetProviderId() {
15835
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
15836
    }
15837
 
15838
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
15839
    public boolean isSetProviderId() {
15840
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
15841
    }
15842
 
15843
    public void setProviderIdIsSet(boolean value) {
15844
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
15845
    }
15846
 
15847
    public void setFieldValue(_Fields field, Object value) {
15848
      switch (field) {
15849
      case WAREHOUSE_ID:
15850
        if (value == null) {
15851
          unsetWarehouseId();
15852
        } else {
15853
          setWarehouseId((Long)value);
15854
        }
15855
        break;
15856
 
15857
      case PROVIDER_ID:
15858
        if (value == null) {
15859
          unsetProviderId();
15860
        } else {
15861
          setProviderId((Long)value);
15862
        }
15863
        break;
15864
 
15865
      }
15866
    }
15867
 
15868
    public void setFieldValue(int fieldID, Object value) {
15869
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15870
    }
15871
 
15872
    public Object getFieldValue(_Fields field) {
15873
      switch (field) {
15874
      case WAREHOUSE_ID:
15875
        return new Long(getWarehouseId());
15876
 
15877
      case PROVIDER_ID:
15878
        return new Long(getProviderId());
15879
 
15880
      }
15881
      throw new IllegalStateException();
15882
    }
15883
 
15884
    public Object getFieldValue(int fieldId) {
15885
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15886
    }
15887
 
15888
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15889
    public boolean isSet(_Fields field) {
15890
      switch (field) {
15891
      case WAREHOUSE_ID:
15892
        return isSetWarehouseId();
15893
      case PROVIDER_ID:
15894
        return isSetProviderId();
15895
      }
15896
      throw new IllegalStateException();
15897
    }
15898
 
15899
    public boolean isSet(int fieldID) {
15900
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15901
    }
15902
 
15903
    @Override
15904
    public boolean equals(Object that) {
15905
      if (that == null)
15906
        return false;
15907
      if (that instanceof markOrdersAsManifested_args)
15908
        return this.equals((markOrdersAsManifested_args)that);
15909
      return false;
15910
    }
15911
 
15912
    public boolean equals(markOrdersAsManifested_args that) {
15913
      if (that == null)
15914
        return false;
15915
 
15916
      boolean this_present_warehouseId = true;
15917
      boolean that_present_warehouseId = true;
15918
      if (this_present_warehouseId || that_present_warehouseId) {
15919
        if (!(this_present_warehouseId && that_present_warehouseId))
15920
          return false;
15921
        if (this.warehouseId != that.warehouseId)
15922
          return false;
15923
      }
15924
 
15925
      boolean this_present_providerId = true;
15926
      boolean that_present_providerId = true;
15927
      if (this_present_providerId || that_present_providerId) {
15928
        if (!(this_present_providerId && that_present_providerId))
15929
          return false;
15930
        if (this.providerId != that.providerId)
15931
          return false;
15932
      }
15933
 
15934
      return true;
15935
    }
15936
 
15937
    @Override
15938
    public int hashCode() {
15939
      return 0;
15940
    }
15941
 
15942
    public int compareTo(markOrdersAsManifested_args other) {
15943
      if (!getClass().equals(other.getClass())) {
15944
        return getClass().getName().compareTo(other.getClass().getName());
15945
      }
15946
 
15947
      int lastComparison = 0;
15948
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
15949
 
15950
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
15951
      if (lastComparison != 0) {
15952
        return lastComparison;
15953
      }
15954
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
15955
      if (lastComparison != 0) {
15956
        return lastComparison;
15957
      }
15958
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
15959
      if (lastComparison != 0) {
15960
        return lastComparison;
15961
      }
15962
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
15963
      if (lastComparison != 0) {
15964
        return lastComparison;
15965
      }
15966
      return 0;
15967
    }
15968
 
15969
    public void read(TProtocol iprot) throws TException {
15970
      TField field;
15971
      iprot.readStructBegin();
15972
      while (true)
15973
      {
15974
        field = iprot.readFieldBegin();
15975
        if (field.type == TType.STOP) { 
15976
          break;
15977
        }
15978
        _Fields fieldId = _Fields.findByThriftId(field.id);
15979
        if (fieldId == null) {
15980
          TProtocolUtil.skip(iprot, field.type);
15981
        } else {
15982
          switch (fieldId) {
15983
            case WAREHOUSE_ID:
15984
              if (field.type == TType.I64) {
15985
                this.warehouseId = iprot.readI64();
15986
                setWarehouseIdIsSet(true);
15987
              } else { 
15988
                TProtocolUtil.skip(iprot, field.type);
15989
              }
15990
              break;
15991
            case PROVIDER_ID:
15992
              if (field.type == TType.I64) {
15993
                this.providerId = iprot.readI64();
15994
                setProviderIdIsSet(true);
15995
              } else { 
15996
                TProtocolUtil.skip(iprot, field.type);
15997
              }
15998
              break;
15999
          }
16000
          iprot.readFieldEnd();
16001
        }
16002
      }
16003
      iprot.readStructEnd();
16004
      validate();
16005
    }
16006
 
16007
    public void write(TProtocol oprot) throws TException {
16008
      validate();
16009
 
16010
      oprot.writeStructBegin(STRUCT_DESC);
16011
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
16012
      oprot.writeI64(this.warehouseId);
16013
      oprot.writeFieldEnd();
16014
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
16015
      oprot.writeI64(this.providerId);
16016
      oprot.writeFieldEnd();
16017
      oprot.writeFieldStop();
16018
      oprot.writeStructEnd();
16019
    }
16020
 
16021
    @Override
16022
    public String toString() {
16023
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
16024
      boolean first = true;
16025
 
16026
      sb.append("warehouseId:");
16027
      sb.append(this.warehouseId);
16028
      first = false;
16029
      if (!first) sb.append(", ");
16030
      sb.append("providerId:");
16031
      sb.append(this.providerId);
16032
      first = false;
16033
      sb.append(")");
16034
      return sb.toString();
16035
    }
16036
 
16037
    public void validate() throws TException {
16038
      // check for required fields
16039
    }
16040
 
16041
  }
16042
 
16043
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
16044
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
16045
 
16046
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16047
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16048
 
16049
    private boolean success;
16050
    private TransactionServiceException ex;
16051
 
16052
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16053
    public enum _Fields implements TFieldIdEnum {
16054
      SUCCESS((short)0, "success"),
16055
      EX((short)1, "ex");
16056
 
16057
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16058
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16059
 
16060
      static {
16061
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16062
          byId.put((int)field._thriftId, field);
16063
          byName.put(field.getFieldName(), field);
16064
        }
16065
      }
16066
 
16067
      /**
16068
       * Find the _Fields constant that matches fieldId, or null if its not found.
16069
       */
16070
      public static _Fields findByThriftId(int fieldId) {
16071
        return byId.get(fieldId);
16072
      }
16073
 
16074
      /**
16075
       * Find the _Fields constant that matches fieldId, throwing an exception
16076
       * if it is not found.
16077
       */
16078
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16079
        _Fields fields = findByThriftId(fieldId);
16080
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16081
        return fields;
16082
      }
16083
 
16084
      /**
16085
       * Find the _Fields constant that matches name, or null if its not found.
16086
       */
16087
      public static _Fields findByName(String name) {
16088
        return byName.get(name);
16089
      }
16090
 
16091
      private final short _thriftId;
16092
      private final String _fieldName;
16093
 
16094
      _Fields(short thriftId, String fieldName) {
16095
        _thriftId = thriftId;
16096
        _fieldName = fieldName;
16097
      }
16098
 
16099
      public short getThriftFieldId() {
16100
        return _thriftId;
16101
      }
16102
 
16103
      public String getFieldName() {
16104
        return _fieldName;
16105
      }
16106
    }
16107
 
16108
    // isset id assignments
16109
    private static final int __SUCCESS_ISSET_ID = 0;
16110
    private BitSet __isset_bit_vector = new BitSet(1);
16111
 
16112
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16113
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16114
          new FieldValueMetaData(TType.BOOL)));
16115
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16116
          new FieldValueMetaData(TType.STRUCT)));
16117
    }});
16118
 
16119
    static {
16120
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
16121
    }
16122
 
16123
    public markOrdersAsManifested_result() {
16124
    }
16125
 
16126
    public markOrdersAsManifested_result(
16127
      boolean success,
16128
      TransactionServiceException ex)
16129
    {
16130
      this();
16131
      this.success = success;
16132
      setSuccessIsSet(true);
16133
      this.ex = ex;
16134
    }
16135
 
16136
    /**
16137
     * Performs a deep copy on <i>other</i>.
16138
     */
16139
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
16140
      __isset_bit_vector.clear();
16141
      __isset_bit_vector.or(other.__isset_bit_vector);
16142
      this.success = other.success;
16143
      if (other.isSetEx()) {
16144
        this.ex = new TransactionServiceException(other.ex);
16145
      }
16146
    }
16147
 
16148
    public markOrdersAsManifested_result deepCopy() {
16149
      return new markOrdersAsManifested_result(this);
16150
    }
16151
 
16152
    @Deprecated
16153
    public markOrdersAsManifested_result clone() {
16154
      return new markOrdersAsManifested_result(this);
16155
    }
16156
 
16157
    public boolean isSuccess() {
16158
      return this.success;
16159
    }
16160
 
16161
    public markOrdersAsManifested_result setSuccess(boolean success) {
16162
      this.success = success;
16163
      setSuccessIsSet(true);
16164
      return this;
16165
    }
16166
 
16167
    public void unsetSuccess() {
16168
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16169
    }
16170
 
16171
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16172
    public boolean isSetSuccess() {
16173
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16174
    }
16175
 
16176
    public void setSuccessIsSet(boolean value) {
16177
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16178
    }
16179
 
16180
    public TransactionServiceException getEx() {
16181
      return this.ex;
16182
    }
16183
 
16184
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
16185
      this.ex = ex;
16186
      return this;
16187
    }
16188
 
16189
    public void unsetEx() {
16190
      this.ex = null;
16191
    }
16192
 
16193
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16194
    public boolean isSetEx() {
16195
      return this.ex != null;
16196
    }
16197
 
16198
    public void setExIsSet(boolean value) {
16199
      if (!value) {
16200
        this.ex = null;
16201
      }
16202
    }
16203
 
16204
    public void setFieldValue(_Fields field, Object value) {
16205
      switch (field) {
16206
      case SUCCESS:
16207
        if (value == null) {
16208
          unsetSuccess();
16209
        } else {
16210
          setSuccess((Boolean)value);
16211
        }
16212
        break;
16213
 
16214
      case EX:
16215
        if (value == null) {
16216
          unsetEx();
16217
        } else {
16218
          setEx((TransactionServiceException)value);
16219
        }
16220
        break;
16221
 
16222
      }
16223
    }
16224
 
16225
    public void setFieldValue(int fieldID, Object value) {
16226
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16227
    }
16228
 
16229
    public Object getFieldValue(_Fields field) {
16230
      switch (field) {
16231
      case SUCCESS:
16232
        return new Boolean(isSuccess());
16233
 
16234
      case EX:
16235
        return getEx();
16236
 
16237
      }
16238
      throw new IllegalStateException();
16239
    }
16240
 
16241
    public Object getFieldValue(int fieldId) {
16242
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16243
    }
16244
 
16245
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16246
    public boolean isSet(_Fields field) {
16247
      switch (field) {
16248
      case SUCCESS:
16249
        return isSetSuccess();
16250
      case EX:
16251
        return isSetEx();
16252
      }
16253
      throw new IllegalStateException();
16254
    }
16255
 
16256
    public boolean isSet(int fieldID) {
16257
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16258
    }
16259
 
16260
    @Override
16261
    public boolean equals(Object that) {
16262
      if (that == null)
16263
        return false;
16264
      if (that instanceof markOrdersAsManifested_result)
16265
        return this.equals((markOrdersAsManifested_result)that);
16266
      return false;
16267
    }
16268
 
16269
    public boolean equals(markOrdersAsManifested_result that) {
16270
      if (that == null)
16271
        return false;
16272
 
16273
      boolean this_present_success = true;
16274
      boolean that_present_success = true;
16275
      if (this_present_success || that_present_success) {
16276
        if (!(this_present_success && that_present_success))
16277
          return false;
16278
        if (this.success != that.success)
16279
          return false;
16280
      }
16281
 
16282
      boolean this_present_ex = true && this.isSetEx();
16283
      boolean that_present_ex = true && that.isSetEx();
16284
      if (this_present_ex || that_present_ex) {
16285
        if (!(this_present_ex && that_present_ex))
16286
          return false;
16287
        if (!this.ex.equals(that.ex))
16288
          return false;
16289
      }
16290
 
16291
      return true;
16292
    }
16293
 
16294
    @Override
16295
    public int hashCode() {
16296
      return 0;
16297
    }
16298
 
16299
    public int compareTo(markOrdersAsManifested_result other) {
16300
      if (!getClass().equals(other.getClass())) {
16301
        return getClass().getName().compareTo(other.getClass().getName());
16302
      }
16303
 
16304
      int lastComparison = 0;
16305
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
16306
 
16307
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16308
      if (lastComparison != 0) {
16309
        return lastComparison;
16310
      }
16311
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16312
      if (lastComparison != 0) {
16313
        return lastComparison;
16314
      }
16315
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16316
      if (lastComparison != 0) {
16317
        return lastComparison;
16318
      }
16319
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16320
      if (lastComparison != 0) {
16321
        return lastComparison;
16322
      }
16323
      return 0;
16324
    }
16325
 
16326
    public void read(TProtocol iprot) throws TException {
16327
      TField field;
16328
      iprot.readStructBegin();
16329
      while (true)
16330
      {
16331
        field = iprot.readFieldBegin();
16332
        if (field.type == TType.STOP) { 
16333
          break;
16334
        }
16335
        _Fields fieldId = _Fields.findByThriftId(field.id);
16336
        if (fieldId == null) {
16337
          TProtocolUtil.skip(iprot, field.type);
16338
        } else {
16339
          switch (fieldId) {
16340
            case SUCCESS:
16341
              if (field.type == TType.BOOL) {
16342
                this.success = iprot.readBool();
16343
                setSuccessIsSet(true);
16344
              } else { 
16345
                TProtocolUtil.skip(iprot, field.type);
16346
              }
16347
              break;
16348
            case EX:
16349
              if (field.type == TType.STRUCT) {
16350
                this.ex = new TransactionServiceException();
16351
                this.ex.read(iprot);
16352
              } else { 
16353
                TProtocolUtil.skip(iprot, field.type);
16354
              }
16355
              break;
16356
          }
16357
          iprot.readFieldEnd();
16358
        }
16359
      }
16360
      iprot.readStructEnd();
16361
      validate();
16362
    }
16363
 
16364
    public void write(TProtocol oprot) throws TException {
16365
      oprot.writeStructBegin(STRUCT_DESC);
16366
 
16367
      if (this.isSetSuccess()) {
16368
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16369
        oprot.writeBool(this.success);
16370
        oprot.writeFieldEnd();
16371
      } else if (this.isSetEx()) {
16372
        oprot.writeFieldBegin(EX_FIELD_DESC);
16373
        this.ex.write(oprot);
16374
        oprot.writeFieldEnd();
16375
      }
16376
      oprot.writeFieldStop();
16377
      oprot.writeStructEnd();
16378
    }
16379
 
16380
    @Override
16381
    public String toString() {
16382
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
16383
      boolean first = true;
16384
 
16385
      sb.append("success:");
16386
      sb.append(this.success);
16387
      first = false;
16388
      if (!first) sb.append(", ");
16389
      sb.append("ex:");
16390
      if (this.ex == null) {
16391
        sb.append("null");
16392
      } else {
16393
        sb.append(this.ex);
16394
      }
16395
      first = false;
16396
      sb.append(")");
16397
      return sb.toString();
16398
    }
16399
 
16400
    public void validate() throws TException {
16401
      // check for required fields
16402
    }
16403
 
16404
  }
16405
 
1114 chandransh 16406
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
16407
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
16408
 
16409
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
16410
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
16411
 
16412
    private long providerId;
16413
    private Map<String,Long> pickupDetails;
16414
 
16415
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16416
    public enum _Fields implements TFieldIdEnum {
16417
      PROVIDER_ID((short)1, "providerId"),
16418
      PICKUP_DETAILS((short)2, "pickupDetails");
16419
 
16420
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16421
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16422
 
16423
      static {
16424
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16425
          byId.put((int)field._thriftId, field);
16426
          byName.put(field.getFieldName(), field);
16427
        }
16428
      }
16429
 
16430
      /**
16431
       * Find the _Fields constant that matches fieldId, or null if its not found.
16432
       */
16433
      public static _Fields findByThriftId(int fieldId) {
16434
        return byId.get(fieldId);
16435
      }
16436
 
16437
      /**
16438
       * Find the _Fields constant that matches fieldId, throwing an exception
16439
       * if it is not found.
16440
       */
16441
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16442
        _Fields fields = findByThriftId(fieldId);
16443
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16444
        return fields;
16445
      }
16446
 
16447
      /**
16448
       * Find the _Fields constant that matches name, or null if its not found.
16449
       */
16450
      public static _Fields findByName(String name) {
16451
        return byName.get(name);
16452
      }
16453
 
16454
      private final short _thriftId;
16455
      private final String _fieldName;
16456
 
16457
      _Fields(short thriftId, String fieldName) {
16458
        _thriftId = thriftId;
16459
        _fieldName = fieldName;
16460
      }
16461
 
16462
      public short getThriftFieldId() {
16463
        return _thriftId;
16464
      }
16465
 
16466
      public String getFieldName() {
16467
        return _fieldName;
16468
      }
16469
    }
16470
 
16471
    // isset id assignments
16472
    private static final int __PROVIDERID_ISSET_ID = 0;
16473
    private BitSet __isset_bit_vector = new BitSet(1);
16474
 
16475
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16476
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
16477
          new FieldValueMetaData(TType.I64)));
16478
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
16479
          new MapMetaData(TType.MAP, 
16480
              new FieldValueMetaData(TType.STRING), 
16481
              new FieldValueMetaData(TType.I64))));
16482
    }});
16483
 
16484
    static {
16485
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
16486
    }
16487
 
16488
    public markOrdersAsPickedUp_args() {
16489
    }
16490
 
16491
    public markOrdersAsPickedUp_args(
16492
      long providerId,
16493
      Map<String,Long> pickupDetails)
16494
    {
16495
      this();
16496
      this.providerId = providerId;
16497
      setProviderIdIsSet(true);
16498
      this.pickupDetails = pickupDetails;
16499
    }
16500
 
16501
    /**
16502
     * Performs a deep copy on <i>other</i>.
16503
     */
16504
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
16505
      __isset_bit_vector.clear();
16506
      __isset_bit_vector.or(other.__isset_bit_vector);
16507
      this.providerId = other.providerId;
16508
      if (other.isSetPickupDetails()) {
16509
        Map<String,Long> __this__pickupDetails = new HashMap<String,Long>();
16510
        for (Map.Entry<String, Long> other_element : other.pickupDetails.entrySet()) {
16511
 
16512
          String other_element_key = other_element.getKey();
16513
          Long other_element_value = other_element.getValue();
16514
 
16515
          String __this__pickupDetails_copy_key = other_element_key;
16516
 
16517
          Long __this__pickupDetails_copy_value = other_element_value;
16518
 
16519
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
16520
        }
16521
        this.pickupDetails = __this__pickupDetails;
16522
      }
16523
    }
16524
 
16525
    public markOrdersAsPickedUp_args deepCopy() {
16526
      return new markOrdersAsPickedUp_args(this);
16527
    }
16528
 
16529
    @Deprecated
16530
    public markOrdersAsPickedUp_args clone() {
16531
      return new markOrdersAsPickedUp_args(this);
16532
    }
16533
 
16534
    public long getProviderId() {
16535
      return this.providerId;
16536
    }
16537
 
16538
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
16539
      this.providerId = providerId;
16540
      setProviderIdIsSet(true);
16541
      return this;
16542
    }
16543
 
16544
    public void unsetProviderId() {
16545
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
16546
    }
16547
 
16548
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
16549
    public boolean isSetProviderId() {
16550
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
16551
    }
16552
 
16553
    public void setProviderIdIsSet(boolean value) {
16554
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
16555
    }
16556
 
16557
    public int getPickupDetailsSize() {
16558
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
16559
    }
16560
 
16561
    public void putToPickupDetails(String key, long val) {
16562
      if (this.pickupDetails == null) {
16563
        this.pickupDetails = new HashMap<String,Long>();
16564
      }
16565
      this.pickupDetails.put(key, val);
16566
    }
16567
 
16568
    public Map<String,Long> getPickupDetails() {
16569
      return this.pickupDetails;
16570
    }
16571
 
16572
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,Long> pickupDetails) {
16573
      this.pickupDetails = pickupDetails;
16574
      return this;
16575
    }
16576
 
16577
    public void unsetPickupDetails() {
16578
      this.pickupDetails = null;
16579
    }
16580
 
16581
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
16582
    public boolean isSetPickupDetails() {
16583
      return this.pickupDetails != null;
16584
    }
16585
 
16586
    public void setPickupDetailsIsSet(boolean value) {
16587
      if (!value) {
16588
        this.pickupDetails = null;
16589
      }
16590
    }
16591
 
16592
    public void setFieldValue(_Fields field, Object value) {
16593
      switch (field) {
16594
      case PROVIDER_ID:
16595
        if (value == null) {
16596
          unsetProviderId();
16597
        } else {
16598
          setProviderId((Long)value);
16599
        }
16600
        break;
16601
 
16602
      case PICKUP_DETAILS:
16603
        if (value == null) {
16604
          unsetPickupDetails();
16605
        } else {
16606
          setPickupDetails((Map<String,Long>)value);
16607
        }
16608
        break;
16609
 
16610
      }
16611
    }
16612
 
16613
    public void setFieldValue(int fieldID, Object value) {
16614
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16615
    }
16616
 
16617
    public Object getFieldValue(_Fields field) {
16618
      switch (field) {
16619
      case PROVIDER_ID:
16620
        return new Long(getProviderId());
16621
 
16622
      case PICKUP_DETAILS:
16623
        return getPickupDetails();
16624
 
16625
      }
16626
      throw new IllegalStateException();
16627
    }
16628
 
16629
    public Object getFieldValue(int fieldId) {
16630
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16631
    }
16632
 
16633
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16634
    public boolean isSet(_Fields field) {
16635
      switch (field) {
16636
      case PROVIDER_ID:
16637
        return isSetProviderId();
16638
      case PICKUP_DETAILS:
16639
        return isSetPickupDetails();
16640
      }
16641
      throw new IllegalStateException();
16642
    }
16643
 
16644
    public boolean isSet(int fieldID) {
16645
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16646
    }
16647
 
16648
    @Override
16649
    public boolean equals(Object that) {
16650
      if (that == null)
16651
        return false;
16652
      if (that instanceof markOrdersAsPickedUp_args)
16653
        return this.equals((markOrdersAsPickedUp_args)that);
16654
      return false;
16655
    }
16656
 
16657
    public boolean equals(markOrdersAsPickedUp_args that) {
16658
      if (that == null)
16659
        return false;
16660
 
16661
      boolean this_present_providerId = true;
16662
      boolean that_present_providerId = true;
16663
      if (this_present_providerId || that_present_providerId) {
16664
        if (!(this_present_providerId && that_present_providerId))
16665
          return false;
16666
        if (this.providerId != that.providerId)
16667
          return false;
16668
      }
16669
 
16670
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
16671
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
16672
      if (this_present_pickupDetails || that_present_pickupDetails) {
16673
        if (!(this_present_pickupDetails && that_present_pickupDetails))
16674
          return false;
16675
        if (!this.pickupDetails.equals(that.pickupDetails))
16676
          return false;
16677
      }
16678
 
16679
      return true;
16680
    }
16681
 
16682
    @Override
16683
    public int hashCode() {
16684
      return 0;
16685
    }
16686
 
16687
    public void read(TProtocol iprot) throws TException {
16688
      TField field;
16689
      iprot.readStructBegin();
16690
      while (true)
16691
      {
16692
        field = iprot.readFieldBegin();
16693
        if (field.type == TType.STOP) { 
16694
          break;
16695
        }
16696
        _Fields fieldId = _Fields.findByThriftId(field.id);
16697
        if (fieldId == null) {
16698
          TProtocolUtil.skip(iprot, field.type);
16699
        } else {
16700
          switch (fieldId) {
16701
            case PROVIDER_ID:
16702
              if (field.type == TType.I64) {
16703
                this.providerId = iprot.readI64();
16704
                setProviderIdIsSet(true);
16705
              } else { 
16706
                TProtocolUtil.skip(iprot, field.type);
16707
              }
16708
              break;
16709
            case PICKUP_DETAILS:
16710
              if (field.type == TType.MAP) {
16711
                {
16712
                  TMap _map36 = iprot.readMapBegin();
16713
                  this.pickupDetails = new HashMap<String,Long>(2*_map36.size);
16714
                  for (int _i37 = 0; _i37 < _map36.size; ++_i37)
16715
                  {
16716
                    String _key38;
16717
                    long _val39;
16718
                    _key38 = iprot.readString();
16719
                    _val39 = iprot.readI64();
16720
                    this.pickupDetails.put(_key38, _val39);
16721
                  }
16722
                  iprot.readMapEnd();
16723
                }
16724
              } else { 
16725
                TProtocolUtil.skip(iprot, field.type);
16726
              }
16727
              break;
16728
          }
16729
          iprot.readFieldEnd();
16730
        }
16731
      }
16732
      iprot.readStructEnd();
16733
      validate();
16734
    }
16735
 
16736
    public void write(TProtocol oprot) throws TException {
16737
      validate();
16738
 
16739
      oprot.writeStructBegin(STRUCT_DESC);
16740
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
16741
      oprot.writeI64(this.providerId);
16742
      oprot.writeFieldEnd();
16743
      if (this.pickupDetails != null) {
16744
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
16745
        {
16746
          oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.pickupDetails.size()));
16747
          for (Map.Entry<String, Long> _iter40 : this.pickupDetails.entrySet())
16748
          {
16749
            oprot.writeString(_iter40.getKey());
16750
            oprot.writeI64(_iter40.getValue());
16751
          }
16752
          oprot.writeMapEnd();
16753
        }
16754
        oprot.writeFieldEnd();
16755
      }
16756
      oprot.writeFieldStop();
16757
      oprot.writeStructEnd();
16758
    }
16759
 
16760
    @Override
16761
    public String toString() {
16762
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
16763
      boolean first = true;
16764
 
16765
      sb.append("providerId:");
16766
      sb.append(this.providerId);
16767
      first = false;
16768
      if (!first) sb.append(", ");
16769
      sb.append("pickupDetails:");
16770
      if (this.pickupDetails == null) {
16771
        sb.append("null");
16772
      } else {
16773
        sb.append(this.pickupDetails);
16774
      }
16775
      first = false;
16776
      sb.append(")");
16777
      return sb.toString();
16778
    }
16779
 
16780
    public void validate() throws TException {
16781
      // check for required fields
16782
    }
16783
 
16784
  }
16785
 
16786
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
16787
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
16788
 
16789
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16790
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16791
 
16792
    private List<Order> success;
16793
    private TransactionServiceException ex;
16794
 
16795
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16796
    public enum _Fields implements TFieldIdEnum {
16797
      SUCCESS((short)0, "success"),
16798
      EX((short)1, "ex");
16799
 
16800
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16801
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16802
 
16803
      static {
16804
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16805
          byId.put((int)field._thriftId, field);
16806
          byName.put(field.getFieldName(), field);
16807
        }
16808
      }
16809
 
16810
      /**
16811
       * Find the _Fields constant that matches fieldId, or null if its not found.
16812
       */
16813
      public static _Fields findByThriftId(int fieldId) {
16814
        return byId.get(fieldId);
16815
      }
16816
 
16817
      /**
16818
       * Find the _Fields constant that matches fieldId, throwing an exception
16819
       * if it is not found.
16820
       */
16821
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16822
        _Fields fields = findByThriftId(fieldId);
16823
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16824
        return fields;
16825
      }
16826
 
16827
      /**
16828
       * Find the _Fields constant that matches name, or null if its not found.
16829
       */
16830
      public static _Fields findByName(String name) {
16831
        return byName.get(name);
16832
      }
16833
 
16834
      private final short _thriftId;
16835
      private final String _fieldName;
16836
 
16837
      _Fields(short thriftId, String fieldName) {
16838
        _thriftId = thriftId;
16839
        _fieldName = fieldName;
16840
      }
16841
 
16842
      public short getThriftFieldId() {
16843
        return _thriftId;
16844
      }
16845
 
16846
      public String getFieldName() {
16847
        return _fieldName;
16848
      }
16849
    }
16850
 
16851
    // isset id assignments
16852
 
16853
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16854
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16855
          new ListMetaData(TType.LIST, 
16856
              new StructMetaData(TType.STRUCT, Order.class))));
16857
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16858
          new FieldValueMetaData(TType.STRUCT)));
16859
    }});
16860
 
16861
    static {
16862
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
16863
    }
16864
 
16865
    public markOrdersAsPickedUp_result() {
16866
    }
16867
 
16868
    public markOrdersAsPickedUp_result(
16869
      List<Order> success,
16870
      TransactionServiceException ex)
16871
    {
16872
      this();
16873
      this.success = success;
16874
      this.ex = ex;
16875
    }
16876
 
16877
    /**
16878
     * Performs a deep copy on <i>other</i>.
16879
     */
16880
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
16881
      if (other.isSetSuccess()) {
16882
        List<Order> __this__success = new ArrayList<Order>();
16883
        for (Order other_element : other.success) {
16884
          __this__success.add(new Order(other_element));
16885
        }
16886
        this.success = __this__success;
16887
      }
16888
      if (other.isSetEx()) {
16889
        this.ex = new TransactionServiceException(other.ex);
16890
      }
16891
    }
16892
 
16893
    public markOrdersAsPickedUp_result deepCopy() {
16894
      return new markOrdersAsPickedUp_result(this);
16895
    }
16896
 
16897
    @Deprecated
16898
    public markOrdersAsPickedUp_result clone() {
16899
      return new markOrdersAsPickedUp_result(this);
16900
    }
16901
 
16902
    public int getSuccessSize() {
16903
      return (this.success == null) ? 0 : this.success.size();
16904
    }
16905
 
16906
    public java.util.Iterator<Order> getSuccessIterator() {
16907
      return (this.success == null) ? null : this.success.iterator();
16908
    }
16909
 
16910
    public void addToSuccess(Order elem) {
16911
      if (this.success == null) {
16912
        this.success = new ArrayList<Order>();
16913
      }
16914
      this.success.add(elem);
16915
    }
16916
 
16917
    public List<Order> getSuccess() {
16918
      return this.success;
16919
    }
16920
 
16921
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
16922
      this.success = success;
16923
      return this;
16924
    }
16925
 
16926
    public void unsetSuccess() {
16927
      this.success = null;
16928
    }
16929
 
16930
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16931
    public boolean isSetSuccess() {
16932
      return this.success != null;
16933
    }
16934
 
16935
    public void setSuccessIsSet(boolean value) {
16936
      if (!value) {
16937
        this.success = null;
16938
      }
16939
    }
16940
 
16941
    public TransactionServiceException getEx() {
16942
      return this.ex;
16943
    }
16944
 
16945
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
16946
      this.ex = ex;
16947
      return this;
16948
    }
16949
 
16950
    public void unsetEx() {
16951
      this.ex = null;
16952
    }
16953
 
16954
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16955
    public boolean isSetEx() {
16956
      return this.ex != null;
16957
    }
16958
 
16959
    public void setExIsSet(boolean value) {
16960
      if (!value) {
16961
        this.ex = null;
16962
      }
16963
    }
16964
 
16965
    public void setFieldValue(_Fields field, Object value) {
16966
      switch (field) {
16967
      case SUCCESS:
16968
        if (value == null) {
16969
          unsetSuccess();
16970
        } else {
16971
          setSuccess((List<Order>)value);
16972
        }
16973
        break;
16974
 
16975
      case EX:
16976
        if (value == null) {
16977
          unsetEx();
16978
        } else {
16979
          setEx((TransactionServiceException)value);
16980
        }
16981
        break;
16982
 
16983
      }
16984
    }
16985
 
16986
    public void setFieldValue(int fieldID, Object value) {
16987
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16988
    }
16989
 
16990
    public Object getFieldValue(_Fields field) {
16991
      switch (field) {
16992
      case SUCCESS:
16993
        return getSuccess();
16994
 
16995
      case EX:
16996
        return getEx();
16997
 
16998
      }
16999
      throw new IllegalStateException();
17000
    }
17001
 
17002
    public Object getFieldValue(int fieldId) {
17003
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17004
    }
17005
 
17006
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17007
    public boolean isSet(_Fields field) {
17008
      switch (field) {
17009
      case SUCCESS:
17010
        return isSetSuccess();
17011
      case EX:
17012
        return isSetEx();
17013
      }
17014
      throw new IllegalStateException();
17015
    }
17016
 
17017
    public boolean isSet(int fieldID) {
17018
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17019
    }
17020
 
17021
    @Override
17022
    public boolean equals(Object that) {
17023
      if (that == null)
17024
        return false;
17025
      if (that instanceof markOrdersAsPickedUp_result)
17026
        return this.equals((markOrdersAsPickedUp_result)that);
17027
      return false;
17028
    }
17029
 
17030
    public boolean equals(markOrdersAsPickedUp_result that) {
17031
      if (that == null)
17032
        return false;
17033
 
17034
      boolean this_present_success = true && this.isSetSuccess();
17035
      boolean that_present_success = true && that.isSetSuccess();
17036
      if (this_present_success || that_present_success) {
17037
        if (!(this_present_success && that_present_success))
17038
          return false;
17039
        if (!this.success.equals(that.success))
17040
          return false;
17041
      }
17042
 
17043
      boolean this_present_ex = true && this.isSetEx();
17044
      boolean that_present_ex = true && that.isSetEx();
17045
      if (this_present_ex || that_present_ex) {
17046
        if (!(this_present_ex && that_present_ex))
17047
          return false;
17048
        if (!this.ex.equals(that.ex))
17049
          return false;
17050
      }
17051
 
17052
      return true;
17053
    }
17054
 
17055
    @Override
17056
    public int hashCode() {
17057
      return 0;
17058
    }
17059
 
17060
    public int compareTo(markOrdersAsPickedUp_result other) {
17061
      if (!getClass().equals(other.getClass())) {
17062
        return getClass().getName().compareTo(other.getClass().getName());
17063
      }
17064
 
17065
      int lastComparison = 0;
17066
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
17067
 
17068
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17069
      if (lastComparison != 0) {
17070
        return lastComparison;
17071
      }
17072
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17073
      if (lastComparison != 0) {
17074
        return lastComparison;
17075
      }
17076
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17077
      if (lastComparison != 0) {
17078
        return lastComparison;
17079
      }
17080
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17081
      if (lastComparison != 0) {
17082
        return lastComparison;
17083
      }
17084
      return 0;
17085
    }
17086
 
17087
    public void read(TProtocol iprot) throws TException {
17088
      TField field;
17089
      iprot.readStructBegin();
17090
      while (true)
17091
      {
17092
        field = iprot.readFieldBegin();
17093
        if (field.type == TType.STOP) { 
17094
          break;
17095
        }
17096
        _Fields fieldId = _Fields.findByThriftId(field.id);
17097
        if (fieldId == null) {
17098
          TProtocolUtil.skip(iprot, field.type);
17099
        } else {
17100
          switch (fieldId) {
17101
            case SUCCESS:
17102
              if (field.type == TType.LIST) {
17103
                {
17104
                  TList _list41 = iprot.readListBegin();
17105
                  this.success = new ArrayList<Order>(_list41.size);
17106
                  for (int _i42 = 0; _i42 < _list41.size; ++_i42)
17107
                  {
17108
                    Order _elem43;
17109
                    _elem43 = new Order();
17110
                    _elem43.read(iprot);
17111
                    this.success.add(_elem43);
17112
                  }
17113
                  iprot.readListEnd();
17114
                }
17115
              } else { 
17116
                TProtocolUtil.skip(iprot, field.type);
17117
              }
17118
              break;
17119
            case EX:
17120
              if (field.type == TType.STRUCT) {
17121
                this.ex = new TransactionServiceException();
17122
                this.ex.read(iprot);
17123
              } else { 
17124
                TProtocolUtil.skip(iprot, field.type);
17125
              }
17126
              break;
17127
          }
17128
          iprot.readFieldEnd();
17129
        }
17130
      }
17131
      iprot.readStructEnd();
17132
      validate();
17133
    }
17134
 
17135
    public void write(TProtocol oprot) throws TException {
17136
      oprot.writeStructBegin(STRUCT_DESC);
17137
 
17138
      if (this.isSetSuccess()) {
17139
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17140
        {
17141
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
17142
          for (Order _iter44 : this.success)
17143
          {
17144
            _iter44.write(oprot);
17145
          }
17146
          oprot.writeListEnd();
17147
        }
17148
        oprot.writeFieldEnd();
17149
      } else if (this.isSetEx()) {
17150
        oprot.writeFieldBegin(EX_FIELD_DESC);
17151
        this.ex.write(oprot);
17152
        oprot.writeFieldEnd();
17153
      }
17154
      oprot.writeFieldStop();
17155
      oprot.writeStructEnd();
17156
    }
17157
 
17158
    @Override
17159
    public String toString() {
17160
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
17161
      boolean first = true;
17162
 
17163
      sb.append("success:");
17164
      if (this.success == null) {
17165
        sb.append("null");
17166
      } else {
17167
        sb.append(this.success);
17168
      }
17169
      first = false;
17170
      if (!first) sb.append(", ");
17171
      sb.append("ex:");
17172
      if (this.ex == null) {
17173
        sb.append("null");
17174
      } else {
17175
        sb.append(this.ex);
17176
      }
17177
      first = false;
17178
      sb.append(")");
17179
      return sb.toString();
17180
    }
17181
 
17182
    public void validate() throws TException {
17183
      // check for required fields
17184
    }
17185
 
17186
  }
17187
 
1133 chandransh 17188
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
17189
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
17190
 
17191
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
17192
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
17193
 
17194
    private long providerId;
17195
    private Map<String,String> deliveredOrders;
17196
 
17197
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17198
    public enum _Fields implements TFieldIdEnum {
17199
      PROVIDER_ID((short)1, "providerId"),
17200
      DELIVERED_ORDERS((short)2, "deliveredOrders");
17201
 
17202
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17203
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17204
 
17205
      static {
17206
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17207
          byId.put((int)field._thriftId, field);
17208
          byName.put(field.getFieldName(), field);
17209
        }
17210
      }
17211
 
17212
      /**
17213
       * Find the _Fields constant that matches fieldId, or null if its not found.
17214
       */
17215
      public static _Fields findByThriftId(int fieldId) {
17216
        return byId.get(fieldId);
17217
      }
17218
 
17219
      /**
17220
       * Find the _Fields constant that matches fieldId, throwing an exception
17221
       * if it is not found.
17222
       */
17223
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17224
        _Fields fields = findByThriftId(fieldId);
17225
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17226
        return fields;
17227
      }
17228
 
17229
      /**
17230
       * Find the _Fields constant that matches name, or null if its not found.
17231
       */
17232
      public static _Fields findByName(String name) {
17233
        return byName.get(name);
17234
      }
17235
 
17236
      private final short _thriftId;
17237
      private final String _fieldName;
17238
 
17239
      _Fields(short thriftId, String fieldName) {
17240
        _thriftId = thriftId;
17241
        _fieldName = fieldName;
17242
      }
17243
 
17244
      public short getThriftFieldId() {
17245
        return _thriftId;
17246
      }
17247
 
17248
      public String getFieldName() {
17249
        return _fieldName;
17250
      }
17251
    }
17252
 
17253
    // isset id assignments
17254
    private static final int __PROVIDERID_ISSET_ID = 0;
17255
    private BitSet __isset_bit_vector = new BitSet(1);
17256
 
17257
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17258
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17259
          new FieldValueMetaData(TType.I64)));
17260
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
17261
          new MapMetaData(TType.MAP, 
17262
              new FieldValueMetaData(TType.STRING), 
17263
              new FieldValueMetaData(TType.STRING))));
17264
    }});
17265
 
17266
    static {
17267
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
17268
    }
17269
 
17270
    public markOrdersAsDelivered_args() {
17271
    }
17272
 
17273
    public markOrdersAsDelivered_args(
17274
      long providerId,
17275
      Map<String,String> deliveredOrders)
17276
    {
17277
      this();
17278
      this.providerId = providerId;
17279
      setProviderIdIsSet(true);
17280
      this.deliveredOrders = deliveredOrders;
17281
    }
17282
 
17283
    /**
17284
     * Performs a deep copy on <i>other</i>.
17285
     */
17286
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
17287
      __isset_bit_vector.clear();
17288
      __isset_bit_vector.or(other.__isset_bit_vector);
17289
      this.providerId = other.providerId;
17290
      if (other.isSetDeliveredOrders()) {
17291
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
17292
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
17293
 
17294
          String other_element_key = other_element.getKey();
17295
          String other_element_value = other_element.getValue();
17296
 
17297
          String __this__deliveredOrders_copy_key = other_element_key;
17298
 
17299
          String __this__deliveredOrders_copy_value = other_element_value;
17300
 
17301
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
17302
        }
17303
        this.deliveredOrders = __this__deliveredOrders;
17304
      }
17305
    }
17306
 
17307
    public markOrdersAsDelivered_args deepCopy() {
17308
      return new markOrdersAsDelivered_args(this);
17309
    }
17310
 
17311
    @Deprecated
17312
    public markOrdersAsDelivered_args clone() {
17313
      return new markOrdersAsDelivered_args(this);
17314
    }
17315
 
17316
    public long getProviderId() {
17317
      return this.providerId;
17318
    }
17319
 
17320
    public markOrdersAsDelivered_args setProviderId(long providerId) {
17321
      this.providerId = providerId;
17322
      setProviderIdIsSet(true);
17323
      return this;
17324
    }
17325
 
17326
    public void unsetProviderId() {
17327
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
17328
    }
17329
 
17330
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
17331
    public boolean isSetProviderId() {
17332
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
17333
    }
17334
 
17335
    public void setProviderIdIsSet(boolean value) {
17336
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
17337
    }
17338
 
17339
    public int getDeliveredOrdersSize() {
17340
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
17341
    }
17342
 
17343
    public void putToDeliveredOrders(String key, String val) {
17344
      if (this.deliveredOrders == null) {
17345
        this.deliveredOrders = new HashMap<String,String>();
17346
      }
17347
      this.deliveredOrders.put(key, val);
17348
    }
17349
 
17350
    public Map<String,String> getDeliveredOrders() {
17351
      return this.deliveredOrders;
17352
    }
17353
 
17354
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
17355
      this.deliveredOrders = deliveredOrders;
17356
      return this;
17357
    }
17358
 
17359
    public void unsetDeliveredOrders() {
17360
      this.deliveredOrders = null;
17361
    }
17362
 
17363
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
17364
    public boolean isSetDeliveredOrders() {
17365
      return this.deliveredOrders != null;
17366
    }
17367
 
17368
    public void setDeliveredOrdersIsSet(boolean value) {
17369
      if (!value) {
17370
        this.deliveredOrders = null;
17371
      }
17372
    }
17373
 
17374
    public void setFieldValue(_Fields field, Object value) {
17375
      switch (field) {
17376
      case PROVIDER_ID:
17377
        if (value == null) {
17378
          unsetProviderId();
17379
        } else {
17380
          setProviderId((Long)value);
17381
        }
17382
        break;
17383
 
17384
      case DELIVERED_ORDERS:
17385
        if (value == null) {
17386
          unsetDeliveredOrders();
17387
        } else {
17388
          setDeliveredOrders((Map<String,String>)value);
17389
        }
17390
        break;
17391
 
17392
      }
17393
    }
17394
 
17395
    public void setFieldValue(int fieldID, Object value) {
17396
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17397
    }
17398
 
17399
    public Object getFieldValue(_Fields field) {
17400
      switch (field) {
17401
      case PROVIDER_ID:
17402
        return new Long(getProviderId());
17403
 
17404
      case DELIVERED_ORDERS:
17405
        return getDeliveredOrders();
17406
 
17407
      }
17408
      throw new IllegalStateException();
17409
    }
17410
 
17411
    public Object getFieldValue(int fieldId) {
17412
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17413
    }
17414
 
17415
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17416
    public boolean isSet(_Fields field) {
17417
      switch (field) {
17418
      case PROVIDER_ID:
17419
        return isSetProviderId();
17420
      case DELIVERED_ORDERS:
17421
        return isSetDeliveredOrders();
17422
      }
17423
      throw new IllegalStateException();
17424
    }
17425
 
17426
    public boolean isSet(int fieldID) {
17427
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17428
    }
17429
 
17430
    @Override
17431
    public boolean equals(Object that) {
17432
      if (that == null)
17433
        return false;
17434
      if (that instanceof markOrdersAsDelivered_args)
17435
        return this.equals((markOrdersAsDelivered_args)that);
17436
      return false;
17437
    }
17438
 
17439
    public boolean equals(markOrdersAsDelivered_args that) {
17440
      if (that == null)
17441
        return false;
17442
 
17443
      boolean this_present_providerId = true;
17444
      boolean that_present_providerId = true;
17445
      if (this_present_providerId || that_present_providerId) {
17446
        if (!(this_present_providerId && that_present_providerId))
17447
          return false;
17448
        if (this.providerId != that.providerId)
17449
          return false;
17450
      }
17451
 
17452
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
17453
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
17454
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
17455
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
17456
          return false;
17457
        if (!this.deliveredOrders.equals(that.deliveredOrders))
17458
          return false;
17459
      }
17460
 
17461
      return true;
17462
    }
17463
 
17464
    @Override
17465
    public int hashCode() {
17466
      return 0;
17467
    }
17468
 
17469
    public void read(TProtocol iprot) throws TException {
17470
      TField field;
17471
      iprot.readStructBegin();
17472
      while (true)
17473
      {
17474
        field = iprot.readFieldBegin();
17475
        if (field.type == TType.STOP) { 
17476
          break;
17477
        }
17478
        _Fields fieldId = _Fields.findByThriftId(field.id);
17479
        if (fieldId == null) {
17480
          TProtocolUtil.skip(iprot, field.type);
17481
        } else {
17482
          switch (fieldId) {
17483
            case PROVIDER_ID:
17484
              if (field.type == TType.I64) {
17485
                this.providerId = iprot.readI64();
17486
                setProviderIdIsSet(true);
17487
              } else { 
17488
                TProtocolUtil.skip(iprot, field.type);
17489
              }
17490
              break;
17491
            case DELIVERED_ORDERS:
17492
              if (field.type == TType.MAP) {
17493
                {
17494
                  TMap _map45 = iprot.readMapBegin();
17495
                  this.deliveredOrders = new HashMap<String,String>(2*_map45.size);
17496
                  for (int _i46 = 0; _i46 < _map45.size; ++_i46)
17497
                  {
17498
                    String _key47;
17499
                    String _val48;
17500
                    _key47 = iprot.readString();
17501
                    _val48 = iprot.readString();
17502
                    this.deliveredOrders.put(_key47, _val48);
17503
                  }
17504
                  iprot.readMapEnd();
17505
                }
17506
              } else { 
17507
                TProtocolUtil.skip(iprot, field.type);
17508
              }
17509
              break;
17510
          }
17511
          iprot.readFieldEnd();
17512
        }
17513
      }
17514
      iprot.readStructEnd();
17515
      validate();
17516
    }
17517
 
17518
    public void write(TProtocol oprot) throws TException {
17519
      validate();
17520
 
17521
      oprot.writeStructBegin(STRUCT_DESC);
17522
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
17523
      oprot.writeI64(this.providerId);
17524
      oprot.writeFieldEnd();
17525
      if (this.deliveredOrders != null) {
17526
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
17527
        {
17528
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
17529
          for (Map.Entry<String, String> _iter49 : this.deliveredOrders.entrySet())
17530
          {
17531
            oprot.writeString(_iter49.getKey());
17532
            oprot.writeString(_iter49.getValue());
17533
          }
17534
          oprot.writeMapEnd();
17535
        }
17536
        oprot.writeFieldEnd();
17537
      }
17538
      oprot.writeFieldStop();
17539
      oprot.writeStructEnd();
17540
    }
17541
 
17542
    @Override
17543
    public String toString() {
17544
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
17545
      boolean first = true;
17546
 
17547
      sb.append("providerId:");
17548
      sb.append(this.providerId);
17549
      first = false;
17550
      if (!first) sb.append(", ");
17551
      sb.append("deliveredOrders:");
17552
      if (this.deliveredOrders == null) {
17553
        sb.append("null");
17554
      } else {
17555
        sb.append(this.deliveredOrders);
17556
      }
17557
      first = false;
17558
      sb.append(")");
17559
      return sb.toString();
17560
    }
17561
 
17562
    public void validate() throws TException {
17563
      // check for required fields
17564
    }
17565
 
17566
  }
17567
 
17568
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
17569
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
17570
 
17571
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17572
 
17573
    private TransactionServiceException ex;
17574
 
17575
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17576
    public enum _Fields implements TFieldIdEnum {
17577
      EX((short)1, "ex");
17578
 
17579
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17580
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17581
 
17582
      static {
17583
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17584
          byId.put((int)field._thriftId, field);
17585
          byName.put(field.getFieldName(), field);
17586
        }
17587
      }
17588
 
17589
      /**
17590
       * Find the _Fields constant that matches fieldId, or null if its not found.
17591
       */
17592
      public static _Fields findByThriftId(int fieldId) {
17593
        return byId.get(fieldId);
17594
      }
17595
 
17596
      /**
17597
       * Find the _Fields constant that matches fieldId, throwing an exception
17598
       * if it is not found.
17599
       */
17600
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17601
        _Fields fields = findByThriftId(fieldId);
17602
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17603
        return fields;
17604
      }
17605
 
17606
      /**
17607
       * Find the _Fields constant that matches name, or null if its not found.
17608
       */
17609
      public static _Fields findByName(String name) {
17610
        return byName.get(name);
17611
      }
17612
 
17613
      private final short _thriftId;
17614
      private final String _fieldName;
17615
 
17616
      _Fields(short thriftId, String fieldName) {
17617
        _thriftId = thriftId;
17618
        _fieldName = fieldName;
17619
      }
17620
 
17621
      public short getThriftFieldId() {
17622
        return _thriftId;
17623
      }
17624
 
17625
      public String getFieldName() {
17626
        return _fieldName;
17627
      }
17628
    }
17629
 
17630
    // isset id assignments
17631
 
17632
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17633
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17634
          new FieldValueMetaData(TType.STRUCT)));
17635
    }});
17636
 
17637
    static {
17638
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
17639
    }
17640
 
17641
    public markOrdersAsDelivered_result() {
17642
    }
17643
 
17644
    public markOrdersAsDelivered_result(
17645
      TransactionServiceException ex)
17646
    {
17647
      this();
17648
      this.ex = ex;
17649
    }
17650
 
17651
    /**
17652
     * Performs a deep copy on <i>other</i>.
17653
     */
17654
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
17655
      if (other.isSetEx()) {
17656
        this.ex = new TransactionServiceException(other.ex);
17657
      }
17658
    }
17659
 
17660
    public markOrdersAsDelivered_result deepCopy() {
17661
      return new markOrdersAsDelivered_result(this);
17662
    }
17663
 
17664
    @Deprecated
17665
    public markOrdersAsDelivered_result clone() {
17666
      return new markOrdersAsDelivered_result(this);
17667
    }
17668
 
17669
    public TransactionServiceException getEx() {
17670
      return this.ex;
17671
    }
17672
 
17673
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
17674
      this.ex = ex;
17675
      return this;
17676
    }
17677
 
17678
    public void unsetEx() {
17679
      this.ex = null;
17680
    }
17681
 
17682
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17683
    public boolean isSetEx() {
17684
      return this.ex != null;
17685
    }
17686
 
17687
    public void setExIsSet(boolean value) {
17688
      if (!value) {
17689
        this.ex = null;
17690
      }
17691
    }
17692
 
17693
    public void setFieldValue(_Fields field, Object value) {
17694
      switch (field) {
17695
      case EX:
17696
        if (value == null) {
17697
          unsetEx();
17698
        } else {
17699
          setEx((TransactionServiceException)value);
17700
        }
17701
        break;
17702
 
17703
      }
17704
    }
17705
 
17706
    public void setFieldValue(int fieldID, Object value) {
17707
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17708
    }
17709
 
17710
    public Object getFieldValue(_Fields field) {
17711
      switch (field) {
17712
      case EX:
17713
        return getEx();
17714
 
17715
      }
17716
      throw new IllegalStateException();
17717
    }
17718
 
17719
    public Object getFieldValue(int fieldId) {
17720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17721
    }
17722
 
17723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17724
    public boolean isSet(_Fields field) {
17725
      switch (field) {
17726
      case EX:
17727
        return isSetEx();
17728
      }
17729
      throw new IllegalStateException();
17730
    }
17731
 
17732
    public boolean isSet(int fieldID) {
17733
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17734
    }
17735
 
17736
    @Override
17737
    public boolean equals(Object that) {
17738
      if (that == null)
17739
        return false;
17740
      if (that instanceof markOrdersAsDelivered_result)
17741
        return this.equals((markOrdersAsDelivered_result)that);
17742
      return false;
17743
    }
17744
 
17745
    public boolean equals(markOrdersAsDelivered_result that) {
17746
      if (that == null)
17747
        return false;
17748
 
17749
      boolean this_present_ex = true && this.isSetEx();
17750
      boolean that_present_ex = true && that.isSetEx();
17751
      if (this_present_ex || that_present_ex) {
17752
        if (!(this_present_ex && that_present_ex))
17753
          return false;
17754
        if (!this.ex.equals(that.ex))
17755
          return false;
17756
      }
17757
 
17758
      return true;
17759
    }
17760
 
17761
    @Override
17762
    public int hashCode() {
17763
      return 0;
17764
    }
17765
 
17766
    public int compareTo(markOrdersAsDelivered_result other) {
17767
      if (!getClass().equals(other.getClass())) {
17768
        return getClass().getName().compareTo(other.getClass().getName());
17769
      }
17770
 
17771
      int lastComparison = 0;
17772
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
17773
 
17774
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17775
      if (lastComparison != 0) {
17776
        return lastComparison;
17777
      }
17778
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17779
      if (lastComparison != 0) {
17780
        return lastComparison;
17781
      }
17782
      return 0;
17783
    }
17784
 
17785
    public void read(TProtocol iprot) throws TException {
17786
      TField field;
17787
      iprot.readStructBegin();
17788
      while (true)
17789
      {
17790
        field = iprot.readFieldBegin();
17791
        if (field.type == TType.STOP) { 
17792
          break;
17793
        }
17794
        _Fields fieldId = _Fields.findByThriftId(field.id);
17795
        if (fieldId == null) {
17796
          TProtocolUtil.skip(iprot, field.type);
17797
        } else {
17798
          switch (fieldId) {
17799
            case EX:
17800
              if (field.type == TType.STRUCT) {
17801
                this.ex = new TransactionServiceException();
17802
                this.ex.read(iprot);
17803
              } else { 
17804
                TProtocolUtil.skip(iprot, field.type);
17805
              }
17806
              break;
17807
          }
17808
          iprot.readFieldEnd();
17809
        }
17810
      }
17811
      iprot.readStructEnd();
17812
      validate();
17813
    }
17814
 
17815
    public void write(TProtocol oprot) throws TException {
17816
      oprot.writeStructBegin(STRUCT_DESC);
17817
 
17818
      if (this.isSetEx()) {
17819
        oprot.writeFieldBegin(EX_FIELD_DESC);
17820
        this.ex.write(oprot);
17821
        oprot.writeFieldEnd();
17822
      }
17823
      oprot.writeFieldStop();
17824
      oprot.writeStructEnd();
17825
    }
17826
 
17827
    @Override
17828
    public String toString() {
17829
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
17830
      boolean first = true;
17831
 
17832
      sb.append("ex:");
17833
      if (this.ex == null) {
17834
        sb.append("null");
17835
      } else {
17836
        sb.append(this.ex);
17837
      }
17838
      first = false;
17839
      sb.append(")");
17840
      return sb.toString();
17841
    }
17842
 
17843
    public void validate() throws TException {
17844
      // check for required fields
17845
    }
17846
 
17847
  }
17848
 
17849
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
17850
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
17851
 
17852
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
17853
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
17854
 
17855
    private long providerId;
17856
    private Map<String,String> returnedOrders;
17857
 
17858
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17859
    public enum _Fields implements TFieldIdEnum {
17860
      PROVIDER_ID((short)1, "providerId"),
17861
      RETURNED_ORDERS((short)2, "returnedOrders");
17862
 
17863
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17864
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17865
 
17866
      static {
17867
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17868
          byId.put((int)field._thriftId, field);
17869
          byName.put(field.getFieldName(), field);
17870
        }
17871
      }
17872
 
17873
      /**
17874
       * Find the _Fields constant that matches fieldId, or null if its not found.
17875
       */
17876
      public static _Fields findByThriftId(int fieldId) {
17877
        return byId.get(fieldId);
17878
      }
17879
 
17880
      /**
17881
       * Find the _Fields constant that matches fieldId, throwing an exception
17882
       * if it is not found.
17883
       */
17884
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17885
        _Fields fields = findByThriftId(fieldId);
17886
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17887
        return fields;
17888
      }
17889
 
17890
      /**
17891
       * Find the _Fields constant that matches name, or null if its not found.
17892
       */
17893
      public static _Fields findByName(String name) {
17894
        return byName.get(name);
17895
      }
17896
 
17897
      private final short _thriftId;
17898
      private final String _fieldName;
17899
 
17900
      _Fields(short thriftId, String fieldName) {
17901
        _thriftId = thriftId;
17902
        _fieldName = fieldName;
17903
      }
17904
 
17905
      public short getThriftFieldId() {
17906
        return _thriftId;
17907
      }
17908
 
17909
      public String getFieldName() {
17910
        return _fieldName;
17911
      }
17912
    }
17913
 
17914
    // isset id assignments
17915
    private static final int __PROVIDERID_ISSET_ID = 0;
17916
    private BitSet __isset_bit_vector = new BitSet(1);
17917
 
17918
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17919
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17920
          new FieldValueMetaData(TType.I64)));
17921
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
17922
          new MapMetaData(TType.MAP, 
17923
              new FieldValueMetaData(TType.STRING), 
17924
              new FieldValueMetaData(TType.STRING))));
17925
    }});
17926
 
17927
    static {
17928
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
17929
    }
17930
 
17931
    public markOrdersAsFailed_args() {
17932
    }
17933
 
17934
    public markOrdersAsFailed_args(
17935
      long providerId,
17936
      Map<String,String> returnedOrders)
17937
    {
17938
      this();
17939
      this.providerId = providerId;
17940
      setProviderIdIsSet(true);
17941
      this.returnedOrders = returnedOrders;
17942
    }
17943
 
17944
    /**
17945
     * Performs a deep copy on <i>other</i>.
17946
     */
17947
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
17948
      __isset_bit_vector.clear();
17949
      __isset_bit_vector.or(other.__isset_bit_vector);
17950
      this.providerId = other.providerId;
17951
      if (other.isSetReturnedOrders()) {
17952
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
17953
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
17954
 
17955
          String other_element_key = other_element.getKey();
17956
          String other_element_value = other_element.getValue();
17957
 
17958
          String __this__returnedOrders_copy_key = other_element_key;
17959
 
17960
          String __this__returnedOrders_copy_value = other_element_value;
17961
 
17962
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
17963
        }
17964
        this.returnedOrders = __this__returnedOrders;
17965
      }
17966
    }
17967
 
17968
    public markOrdersAsFailed_args deepCopy() {
17969
      return new markOrdersAsFailed_args(this);
17970
    }
17971
 
17972
    @Deprecated
17973
    public markOrdersAsFailed_args clone() {
17974
      return new markOrdersAsFailed_args(this);
17975
    }
17976
 
17977
    public long getProviderId() {
17978
      return this.providerId;
17979
    }
17980
 
17981
    public markOrdersAsFailed_args setProviderId(long providerId) {
17982
      this.providerId = providerId;
17983
      setProviderIdIsSet(true);
17984
      return this;
17985
    }
17986
 
17987
    public void unsetProviderId() {
17988
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
17989
    }
17990
 
17991
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
17992
    public boolean isSetProviderId() {
17993
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
17994
    }
17995
 
17996
    public void setProviderIdIsSet(boolean value) {
17997
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
17998
    }
17999
 
18000
    public int getReturnedOrdersSize() {
18001
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
18002
    }
18003
 
18004
    public void putToReturnedOrders(String key, String val) {
18005
      if (this.returnedOrders == null) {
18006
        this.returnedOrders = new HashMap<String,String>();
18007
      }
18008
      this.returnedOrders.put(key, val);
18009
    }
18010
 
18011
    public Map<String,String> getReturnedOrders() {
18012
      return this.returnedOrders;
18013
    }
18014
 
18015
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
18016
      this.returnedOrders = returnedOrders;
18017
      return this;
18018
    }
18019
 
18020
    public void unsetReturnedOrders() {
18021
      this.returnedOrders = null;
18022
    }
18023
 
18024
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
18025
    public boolean isSetReturnedOrders() {
18026
      return this.returnedOrders != null;
18027
    }
18028
 
18029
    public void setReturnedOrdersIsSet(boolean value) {
18030
      if (!value) {
18031
        this.returnedOrders = null;
18032
      }
18033
    }
18034
 
18035
    public void setFieldValue(_Fields field, Object value) {
18036
      switch (field) {
18037
      case PROVIDER_ID:
18038
        if (value == null) {
18039
          unsetProviderId();
18040
        } else {
18041
          setProviderId((Long)value);
18042
        }
18043
        break;
18044
 
18045
      case RETURNED_ORDERS:
18046
        if (value == null) {
18047
          unsetReturnedOrders();
18048
        } else {
18049
          setReturnedOrders((Map<String,String>)value);
18050
        }
18051
        break;
18052
 
18053
      }
18054
    }
18055
 
18056
    public void setFieldValue(int fieldID, Object value) {
18057
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18058
    }
18059
 
18060
    public Object getFieldValue(_Fields field) {
18061
      switch (field) {
18062
      case PROVIDER_ID:
18063
        return new Long(getProviderId());
18064
 
18065
      case RETURNED_ORDERS:
18066
        return getReturnedOrders();
18067
 
18068
      }
18069
      throw new IllegalStateException();
18070
    }
18071
 
18072
    public Object getFieldValue(int fieldId) {
18073
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18074
    }
18075
 
18076
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18077
    public boolean isSet(_Fields field) {
18078
      switch (field) {
18079
      case PROVIDER_ID:
18080
        return isSetProviderId();
18081
      case RETURNED_ORDERS:
18082
        return isSetReturnedOrders();
18083
      }
18084
      throw new IllegalStateException();
18085
    }
18086
 
18087
    public boolean isSet(int fieldID) {
18088
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18089
    }
18090
 
18091
    @Override
18092
    public boolean equals(Object that) {
18093
      if (that == null)
18094
        return false;
18095
      if (that instanceof markOrdersAsFailed_args)
18096
        return this.equals((markOrdersAsFailed_args)that);
18097
      return false;
18098
    }
18099
 
18100
    public boolean equals(markOrdersAsFailed_args that) {
18101
      if (that == null)
18102
        return false;
18103
 
18104
      boolean this_present_providerId = true;
18105
      boolean that_present_providerId = true;
18106
      if (this_present_providerId || that_present_providerId) {
18107
        if (!(this_present_providerId && that_present_providerId))
18108
          return false;
18109
        if (this.providerId != that.providerId)
18110
          return false;
18111
      }
18112
 
18113
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
18114
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
18115
      if (this_present_returnedOrders || that_present_returnedOrders) {
18116
        if (!(this_present_returnedOrders && that_present_returnedOrders))
18117
          return false;
18118
        if (!this.returnedOrders.equals(that.returnedOrders))
18119
          return false;
18120
      }
18121
 
18122
      return true;
18123
    }
18124
 
18125
    @Override
18126
    public int hashCode() {
18127
      return 0;
18128
    }
18129
 
18130
    public void read(TProtocol iprot) throws TException {
18131
      TField field;
18132
      iprot.readStructBegin();
18133
      while (true)
18134
      {
18135
        field = iprot.readFieldBegin();
18136
        if (field.type == TType.STOP) { 
18137
          break;
18138
        }
18139
        _Fields fieldId = _Fields.findByThriftId(field.id);
18140
        if (fieldId == null) {
18141
          TProtocolUtil.skip(iprot, field.type);
18142
        } else {
18143
          switch (fieldId) {
18144
            case PROVIDER_ID:
18145
              if (field.type == TType.I64) {
18146
                this.providerId = iprot.readI64();
18147
                setProviderIdIsSet(true);
18148
              } else { 
18149
                TProtocolUtil.skip(iprot, field.type);
18150
              }
18151
              break;
18152
            case RETURNED_ORDERS:
18153
              if (field.type == TType.MAP) {
18154
                {
18155
                  TMap _map50 = iprot.readMapBegin();
18156
                  this.returnedOrders = new HashMap<String,String>(2*_map50.size);
18157
                  for (int _i51 = 0; _i51 < _map50.size; ++_i51)
18158
                  {
18159
                    String _key52;
18160
                    String _val53;
18161
                    _key52 = iprot.readString();
18162
                    _val53 = iprot.readString();
18163
                    this.returnedOrders.put(_key52, _val53);
18164
                  }
18165
                  iprot.readMapEnd();
18166
                }
18167
              } else { 
18168
                TProtocolUtil.skip(iprot, field.type);
18169
              }
18170
              break;
18171
          }
18172
          iprot.readFieldEnd();
18173
        }
18174
      }
18175
      iprot.readStructEnd();
18176
      validate();
18177
    }
18178
 
18179
    public void write(TProtocol oprot) throws TException {
18180
      validate();
18181
 
18182
      oprot.writeStructBegin(STRUCT_DESC);
18183
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
18184
      oprot.writeI64(this.providerId);
18185
      oprot.writeFieldEnd();
18186
      if (this.returnedOrders != null) {
18187
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
18188
        {
18189
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
18190
          for (Map.Entry<String, String> _iter54 : this.returnedOrders.entrySet())
18191
          {
18192
            oprot.writeString(_iter54.getKey());
18193
            oprot.writeString(_iter54.getValue());
18194
          }
18195
          oprot.writeMapEnd();
18196
        }
18197
        oprot.writeFieldEnd();
18198
      }
18199
      oprot.writeFieldStop();
18200
      oprot.writeStructEnd();
18201
    }
18202
 
18203
    @Override
18204
    public String toString() {
18205
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
18206
      boolean first = true;
18207
 
18208
      sb.append("providerId:");
18209
      sb.append(this.providerId);
18210
      first = false;
18211
      if (!first) sb.append(", ");
18212
      sb.append("returnedOrders:");
18213
      if (this.returnedOrders == null) {
18214
        sb.append("null");
18215
      } else {
18216
        sb.append(this.returnedOrders);
18217
      }
18218
      first = false;
18219
      sb.append(")");
18220
      return sb.toString();
18221
    }
18222
 
18223
    public void validate() throws TException {
18224
      // check for required fields
18225
    }
18226
 
18227
  }
18228
 
18229
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
18230
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
18231
 
18232
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18233
 
18234
    private TransactionServiceException ex;
18235
 
18236
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18237
    public enum _Fields implements TFieldIdEnum {
18238
      EX((short)1, "ex");
18239
 
18240
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18241
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18242
 
18243
      static {
18244
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18245
          byId.put((int)field._thriftId, field);
18246
          byName.put(field.getFieldName(), field);
18247
        }
18248
      }
18249
 
18250
      /**
18251
       * Find the _Fields constant that matches fieldId, or null if its not found.
18252
       */
18253
      public static _Fields findByThriftId(int fieldId) {
18254
        return byId.get(fieldId);
18255
      }
18256
 
18257
      /**
18258
       * Find the _Fields constant that matches fieldId, throwing an exception
18259
       * if it is not found.
18260
       */
18261
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18262
        _Fields fields = findByThriftId(fieldId);
18263
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18264
        return fields;
18265
      }
18266
 
18267
      /**
18268
       * Find the _Fields constant that matches name, or null if its not found.
18269
       */
18270
      public static _Fields findByName(String name) {
18271
        return byName.get(name);
18272
      }
18273
 
18274
      private final short _thriftId;
18275
      private final String _fieldName;
18276
 
18277
      _Fields(short thriftId, String fieldName) {
18278
        _thriftId = thriftId;
18279
        _fieldName = fieldName;
18280
      }
18281
 
18282
      public short getThriftFieldId() {
18283
        return _thriftId;
18284
      }
18285
 
18286
      public String getFieldName() {
18287
        return _fieldName;
18288
      }
18289
    }
18290
 
18291
    // isset id assignments
18292
 
18293
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18294
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18295
          new FieldValueMetaData(TType.STRUCT)));
18296
    }});
18297
 
18298
    static {
18299
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
18300
    }
18301
 
18302
    public markOrdersAsFailed_result() {
18303
    }
18304
 
18305
    public markOrdersAsFailed_result(
18306
      TransactionServiceException ex)
18307
    {
18308
      this();
18309
      this.ex = ex;
18310
    }
18311
 
18312
    /**
18313
     * Performs a deep copy on <i>other</i>.
18314
     */
18315
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
18316
      if (other.isSetEx()) {
18317
        this.ex = new TransactionServiceException(other.ex);
18318
      }
18319
    }
18320
 
18321
    public markOrdersAsFailed_result deepCopy() {
18322
      return new markOrdersAsFailed_result(this);
18323
    }
18324
 
18325
    @Deprecated
18326
    public markOrdersAsFailed_result clone() {
18327
      return new markOrdersAsFailed_result(this);
18328
    }
18329
 
18330
    public TransactionServiceException getEx() {
18331
      return this.ex;
18332
    }
18333
 
18334
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
18335
      this.ex = ex;
18336
      return this;
18337
    }
18338
 
18339
    public void unsetEx() {
18340
      this.ex = null;
18341
    }
18342
 
18343
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18344
    public boolean isSetEx() {
18345
      return this.ex != null;
18346
    }
18347
 
18348
    public void setExIsSet(boolean value) {
18349
      if (!value) {
18350
        this.ex = null;
18351
      }
18352
    }
18353
 
18354
    public void setFieldValue(_Fields field, Object value) {
18355
      switch (field) {
18356
      case EX:
18357
        if (value == null) {
18358
          unsetEx();
18359
        } else {
18360
          setEx((TransactionServiceException)value);
18361
        }
18362
        break;
18363
 
18364
      }
18365
    }
18366
 
18367
    public void setFieldValue(int fieldID, Object value) {
18368
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18369
    }
18370
 
18371
    public Object getFieldValue(_Fields field) {
18372
      switch (field) {
18373
      case EX:
18374
        return getEx();
18375
 
18376
      }
18377
      throw new IllegalStateException();
18378
    }
18379
 
18380
    public Object getFieldValue(int fieldId) {
18381
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18382
    }
18383
 
18384
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18385
    public boolean isSet(_Fields field) {
18386
      switch (field) {
18387
      case EX:
18388
        return isSetEx();
18389
      }
18390
      throw new IllegalStateException();
18391
    }
18392
 
18393
    public boolean isSet(int fieldID) {
18394
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18395
    }
18396
 
18397
    @Override
18398
    public boolean equals(Object that) {
18399
      if (that == null)
18400
        return false;
18401
      if (that instanceof markOrdersAsFailed_result)
18402
        return this.equals((markOrdersAsFailed_result)that);
18403
      return false;
18404
    }
18405
 
18406
    public boolean equals(markOrdersAsFailed_result that) {
18407
      if (that == null)
18408
        return false;
18409
 
18410
      boolean this_present_ex = true && this.isSetEx();
18411
      boolean that_present_ex = true && that.isSetEx();
18412
      if (this_present_ex || that_present_ex) {
18413
        if (!(this_present_ex && that_present_ex))
18414
          return false;
18415
        if (!this.ex.equals(that.ex))
18416
          return false;
18417
      }
18418
 
18419
      return true;
18420
    }
18421
 
18422
    @Override
18423
    public int hashCode() {
18424
      return 0;
18425
    }
18426
 
18427
    public int compareTo(markOrdersAsFailed_result other) {
18428
      if (!getClass().equals(other.getClass())) {
18429
        return getClass().getName().compareTo(other.getClass().getName());
18430
      }
18431
 
18432
      int lastComparison = 0;
18433
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
18434
 
18435
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18436
      if (lastComparison != 0) {
18437
        return lastComparison;
18438
      }
18439
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18440
      if (lastComparison != 0) {
18441
        return lastComparison;
18442
      }
18443
      return 0;
18444
    }
18445
 
18446
    public void read(TProtocol iprot) throws TException {
18447
      TField field;
18448
      iprot.readStructBegin();
18449
      while (true)
18450
      {
18451
        field = iprot.readFieldBegin();
18452
        if (field.type == TType.STOP) { 
18453
          break;
18454
        }
18455
        _Fields fieldId = _Fields.findByThriftId(field.id);
18456
        if (fieldId == null) {
18457
          TProtocolUtil.skip(iprot, field.type);
18458
        } else {
18459
          switch (fieldId) {
18460
            case EX:
18461
              if (field.type == TType.STRUCT) {
18462
                this.ex = new TransactionServiceException();
18463
                this.ex.read(iprot);
18464
              } else { 
18465
                TProtocolUtil.skip(iprot, field.type);
18466
              }
18467
              break;
18468
          }
18469
          iprot.readFieldEnd();
18470
        }
18471
      }
18472
      iprot.readStructEnd();
18473
      validate();
18474
    }
18475
 
18476
    public void write(TProtocol oprot) throws TException {
18477
      oprot.writeStructBegin(STRUCT_DESC);
18478
 
18479
      if (this.isSetEx()) {
18480
        oprot.writeFieldBegin(EX_FIELD_DESC);
18481
        this.ex.write(oprot);
18482
        oprot.writeFieldEnd();
18483
      }
18484
      oprot.writeFieldStop();
18485
      oprot.writeStructEnd();
18486
    }
18487
 
18488
    @Override
18489
    public String toString() {
18490
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
18491
      boolean first = true;
18492
 
18493
      sb.append("ex:");
18494
      if (this.ex == null) {
18495
        sb.append("null");
18496
      } else {
18497
        sb.append(this.ex);
18498
      }
18499
      first = false;
18500
      sb.append(")");
18501
      return sb.toString();
18502
    }
18503
 
18504
    public void validate() throws TException {
18505
      // check for required fields
18506
    }
18507
 
18508
  }
18509
 
305 ashish 18510
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
18511
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
18512
 
483 rajveer 18513
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 18514
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
18515
 
483 rajveer 18516
    private long orderId;
305 ashish 18517
    private boolean valid;
18518
 
18519
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18520
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18521
      ORDER_ID((short)1, "orderId"),
305 ashish 18522
      VALID((short)2, "valid");
18523
 
18524
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18525
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18526
 
18527
      static {
18528
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18529
          byId.put((int)field._thriftId, field);
18530
          byName.put(field.getFieldName(), field);
18531
        }
18532
      }
18533
 
18534
      /**
18535
       * Find the _Fields constant that matches fieldId, or null if its not found.
18536
       */
18537
      public static _Fields findByThriftId(int fieldId) {
18538
        return byId.get(fieldId);
18539
      }
18540
 
18541
      /**
18542
       * Find the _Fields constant that matches fieldId, throwing an exception
18543
       * if it is not found.
18544
       */
18545
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18546
        _Fields fields = findByThriftId(fieldId);
18547
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18548
        return fields;
18549
      }
18550
 
18551
      /**
18552
       * Find the _Fields constant that matches name, or null if its not found.
18553
       */
18554
      public static _Fields findByName(String name) {
18555
        return byName.get(name);
18556
      }
18557
 
18558
      private final short _thriftId;
18559
      private final String _fieldName;
18560
 
18561
      _Fields(short thriftId, String fieldName) {
18562
        _thriftId = thriftId;
18563
        _fieldName = fieldName;
18564
      }
18565
 
18566
      public short getThriftFieldId() {
18567
        return _thriftId;
18568
      }
18569
 
18570
      public String getFieldName() {
18571
        return _fieldName;
18572
      }
18573
    }
18574
 
18575
    // isset id assignments
483 rajveer 18576
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 18577
    private static final int __VALID_ISSET_ID = 1;
18578
    private BitSet __isset_bit_vector = new BitSet(2);
18579
 
18580
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18581
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 18582
          new FieldValueMetaData(TType.I64)));
18583
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
18584
          new FieldValueMetaData(TType.BOOL)));
18585
    }});
18586
 
18587
    static {
18588
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
18589
    }
18590
 
18591
    public getAlerts_args() {
18592
    }
18593
 
18594
    public getAlerts_args(
483 rajveer 18595
      long orderId,
305 ashish 18596
      boolean valid)
18597
    {
18598
      this();
483 rajveer 18599
      this.orderId = orderId;
18600
      setOrderIdIsSet(true);
305 ashish 18601
      this.valid = valid;
18602
      setValidIsSet(true);
18603
    }
18604
 
18605
    /**
18606
     * Performs a deep copy on <i>other</i>.
18607
     */
18608
    public getAlerts_args(getAlerts_args other) {
18609
      __isset_bit_vector.clear();
18610
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18611
      this.orderId = other.orderId;
305 ashish 18612
      this.valid = other.valid;
18613
    }
18614
 
18615
    public getAlerts_args deepCopy() {
18616
      return new getAlerts_args(this);
18617
    }
18618
 
18619
    @Deprecated
18620
    public getAlerts_args clone() {
18621
      return new getAlerts_args(this);
18622
    }
18623
 
483 rajveer 18624
    public long getOrderId() {
18625
      return this.orderId;
305 ashish 18626
    }
18627
 
483 rajveer 18628
    public getAlerts_args setOrderId(long orderId) {
18629
      this.orderId = orderId;
18630
      setOrderIdIsSet(true);
305 ashish 18631
      return this;
18632
    }
18633
 
483 rajveer 18634
    public void unsetOrderId() {
18635
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 18636
    }
18637
 
483 rajveer 18638
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18639
    public boolean isSetOrderId() {
18640
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 18641
    }
18642
 
483 rajveer 18643
    public void setOrderIdIsSet(boolean value) {
18644
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 18645
    }
18646
 
18647
    public boolean isValid() {
18648
      return this.valid;
18649
    }
18650
 
18651
    public getAlerts_args setValid(boolean valid) {
18652
      this.valid = valid;
18653
      setValidIsSet(true);
18654
      return this;
18655
    }
18656
 
18657
    public void unsetValid() {
18658
      __isset_bit_vector.clear(__VALID_ISSET_ID);
18659
    }
18660
 
18661
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
18662
    public boolean isSetValid() {
18663
      return __isset_bit_vector.get(__VALID_ISSET_ID);
18664
    }
18665
 
18666
    public void setValidIsSet(boolean value) {
18667
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
18668
    }
18669
 
18670
    public void setFieldValue(_Fields field, Object value) {
18671
      switch (field) {
483 rajveer 18672
      case ORDER_ID:
305 ashish 18673
        if (value == null) {
483 rajveer 18674
          unsetOrderId();
305 ashish 18675
        } else {
483 rajveer 18676
          setOrderId((Long)value);
305 ashish 18677
        }
18678
        break;
18679
 
18680
      case VALID:
18681
        if (value == null) {
18682
          unsetValid();
18683
        } else {
18684
          setValid((Boolean)value);
18685
        }
18686
        break;
18687
 
18688
      }
18689
    }
18690
 
18691
    public void setFieldValue(int fieldID, Object value) {
18692
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18693
    }
18694
 
18695
    public Object getFieldValue(_Fields field) {
18696
      switch (field) {
483 rajveer 18697
      case ORDER_ID:
18698
        return new Long(getOrderId());
305 ashish 18699
 
18700
      case VALID:
18701
        return new Boolean(isValid());
18702
 
18703
      }
18704
      throw new IllegalStateException();
18705
    }
18706
 
18707
    public Object getFieldValue(int fieldId) {
18708
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18709
    }
18710
 
18711
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18712
    public boolean isSet(_Fields field) {
18713
      switch (field) {
483 rajveer 18714
      case ORDER_ID:
18715
        return isSetOrderId();
305 ashish 18716
      case VALID:
18717
        return isSetValid();
18718
      }
18719
      throw new IllegalStateException();
18720
    }
18721
 
18722
    public boolean isSet(int fieldID) {
18723
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18724
    }
18725
 
18726
    @Override
18727
    public boolean equals(Object that) {
18728
      if (that == null)
18729
        return false;
18730
      if (that instanceof getAlerts_args)
18731
        return this.equals((getAlerts_args)that);
18732
      return false;
18733
    }
18734
 
18735
    public boolean equals(getAlerts_args that) {
18736
      if (that == null)
18737
        return false;
18738
 
483 rajveer 18739
      boolean this_present_orderId = true;
18740
      boolean that_present_orderId = true;
18741
      if (this_present_orderId || that_present_orderId) {
18742
        if (!(this_present_orderId && that_present_orderId))
305 ashish 18743
          return false;
483 rajveer 18744
        if (this.orderId != that.orderId)
305 ashish 18745
          return false;
18746
      }
18747
 
18748
      boolean this_present_valid = true;
18749
      boolean that_present_valid = true;
18750
      if (this_present_valid || that_present_valid) {
18751
        if (!(this_present_valid && that_present_valid))
18752
          return false;
18753
        if (this.valid != that.valid)
18754
          return false;
18755
      }
18756
 
18757
      return true;
18758
    }
18759
 
18760
    @Override
18761
    public int hashCode() {
18762
      return 0;
18763
    }
18764
 
18765
    public int compareTo(getAlerts_args other) {
18766
      if (!getClass().equals(other.getClass())) {
18767
        return getClass().getName().compareTo(other.getClass().getName());
18768
      }
18769
 
18770
      int lastComparison = 0;
18771
      getAlerts_args typedOther = (getAlerts_args)other;
18772
 
483 rajveer 18773
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 18774
      if (lastComparison != 0) {
18775
        return lastComparison;
18776
      }
483 rajveer 18777
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 18778
      if (lastComparison != 0) {
18779
        return lastComparison;
18780
      }
18781
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
18782
      if (lastComparison != 0) {
18783
        return lastComparison;
18784
      }
18785
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
18786
      if (lastComparison != 0) {
18787
        return lastComparison;
18788
      }
18789
      return 0;
18790
    }
18791
 
18792
    public void read(TProtocol iprot) throws TException {
18793
      TField field;
18794
      iprot.readStructBegin();
18795
      while (true)
18796
      {
18797
        field = iprot.readFieldBegin();
18798
        if (field.type == TType.STOP) { 
18799
          break;
18800
        }
18801
        _Fields fieldId = _Fields.findByThriftId(field.id);
18802
        if (fieldId == null) {
18803
          TProtocolUtil.skip(iprot, field.type);
18804
        } else {
18805
          switch (fieldId) {
483 rajveer 18806
            case ORDER_ID:
305 ashish 18807
              if (field.type == TType.I64) {
483 rajveer 18808
                this.orderId = iprot.readI64();
18809
                setOrderIdIsSet(true);
305 ashish 18810
              } else { 
18811
                TProtocolUtil.skip(iprot, field.type);
18812
              }
18813
              break;
18814
            case VALID:
18815
              if (field.type == TType.BOOL) {
18816
                this.valid = iprot.readBool();
18817
                setValidIsSet(true);
18818
              } else { 
18819
                TProtocolUtil.skip(iprot, field.type);
18820
              }
18821
              break;
18822
          }
18823
          iprot.readFieldEnd();
18824
        }
18825
      }
18826
      iprot.readStructEnd();
18827
      validate();
18828
    }
18829
 
18830
    public void write(TProtocol oprot) throws TException {
18831
      validate();
18832
 
18833
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18834
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18835
      oprot.writeI64(this.orderId);
305 ashish 18836
      oprot.writeFieldEnd();
18837
      oprot.writeFieldBegin(VALID_FIELD_DESC);
18838
      oprot.writeBool(this.valid);
18839
      oprot.writeFieldEnd();
18840
      oprot.writeFieldStop();
18841
      oprot.writeStructEnd();
18842
    }
18843
 
18844
    @Override
18845
    public String toString() {
18846
      StringBuilder sb = new StringBuilder("getAlerts_args(");
18847
      boolean first = true;
18848
 
483 rajveer 18849
      sb.append("orderId:");
18850
      sb.append(this.orderId);
305 ashish 18851
      first = false;
18852
      if (!first) sb.append(", ");
18853
      sb.append("valid:");
18854
      sb.append(this.valid);
18855
      first = false;
18856
      sb.append(")");
18857
      return sb.toString();
18858
    }
18859
 
18860
    public void validate() throws TException {
18861
      // check for required fields
18862
    }
18863
 
18864
  }
18865
 
18866
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
18867
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
18868
 
18869
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18870
 
18871
    private List<Alert> success;
18872
 
18873
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18874
    public enum _Fields implements TFieldIdEnum {
18875
      SUCCESS((short)0, "success");
18876
 
18877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18879
 
18880
      static {
18881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18882
          byId.put((int)field._thriftId, field);
18883
          byName.put(field.getFieldName(), field);
18884
        }
18885
      }
18886
 
18887
      /**
18888
       * Find the _Fields constant that matches fieldId, or null if its not found.
18889
       */
18890
      public static _Fields findByThriftId(int fieldId) {
18891
        return byId.get(fieldId);
18892
      }
18893
 
18894
      /**
18895
       * Find the _Fields constant that matches fieldId, throwing an exception
18896
       * if it is not found.
18897
       */
18898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18899
        _Fields fields = findByThriftId(fieldId);
18900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18901
        return fields;
18902
      }
18903
 
18904
      /**
18905
       * Find the _Fields constant that matches name, or null if its not found.
18906
       */
18907
      public static _Fields findByName(String name) {
18908
        return byName.get(name);
18909
      }
18910
 
18911
      private final short _thriftId;
18912
      private final String _fieldName;
18913
 
18914
      _Fields(short thriftId, String fieldName) {
18915
        _thriftId = thriftId;
18916
        _fieldName = fieldName;
18917
      }
18918
 
18919
      public short getThriftFieldId() {
18920
        return _thriftId;
18921
      }
18922
 
18923
      public String getFieldName() {
18924
        return _fieldName;
18925
      }
18926
    }
18927
 
18928
    // isset id assignments
18929
 
18930
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18931
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18932
          new ListMetaData(TType.LIST, 
18933
              new StructMetaData(TType.STRUCT, Alert.class))));
18934
    }});
18935
 
18936
    static {
18937
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
18938
    }
18939
 
18940
    public getAlerts_result() {
18941
    }
18942
 
18943
    public getAlerts_result(
18944
      List<Alert> success)
18945
    {
18946
      this();
18947
      this.success = success;
18948
    }
18949
 
18950
    /**
18951
     * Performs a deep copy on <i>other</i>.
18952
     */
18953
    public getAlerts_result(getAlerts_result other) {
18954
      if (other.isSetSuccess()) {
18955
        List<Alert> __this__success = new ArrayList<Alert>();
18956
        for (Alert other_element : other.success) {
18957
          __this__success.add(new Alert(other_element));
18958
        }
18959
        this.success = __this__success;
18960
      }
18961
    }
18962
 
18963
    public getAlerts_result deepCopy() {
18964
      return new getAlerts_result(this);
18965
    }
18966
 
18967
    @Deprecated
18968
    public getAlerts_result clone() {
18969
      return new getAlerts_result(this);
18970
    }
18971
 
18972
    public int getSuccessSize() {
18973
      return (this.success == null) ? 0 : this.success.size();
18974
    }
18975
 
18976
    public java.util.Iterator<Alert> getSuccessIterator() {
18977
      return (this.success == null) ? null : this.success.iterator();
18978
    }
18979
 
18980
    public void addToSuccess(Alert elem) {
18981
      if (this.success == null) {
18982
        this.success = new ArrayList<Alert>();
18983
      }
18984
      this.success.add(elem);
18985
    }
18986
 
18987
    public List<Alert> getSuccess() {
18988
      return this.success;
18989
    }
18990
 
18991
    public getAlerts_result setSuccess(List<Alert> success) {
18992
      this.success = success;
18993
      return this;
18994
    }
18995
 
18996
    public void unsetSuccess() {
18997
      this.success = null;
18998
    }
18999
 
19000
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19001
    public boolean isSetSuccess() {
19002
      return this.success != null;
19003
    }
19004
 
19005
    public void setSuccessIsSet(boolean value) {
19006
      if (!value) {
19007
        this.success = null;
19008
      }
19009
    }
19010
 
19011
    public void setFieldValue(_Fields field, Object value) {
19012
      switch (field) {
19013
      case SUCCESS:
19014
        if (value == null) {
19015
          unsetSuccess();
19016
        } else {
19017
          setSuccess((List<Alert>)value);
19018
        }
19019
        break;
19020
 
19021
      }
19022
    }
19023
 
19024
    public void setFieldValue(int fieldID, Object value) {
19025
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19026
    }
19027
 
19028
    public Object getFieldValue(_Fields field) {
19029
      switch (field) {
19030
      case SUCCESS:
19031
        return getSuccess();
19032
 
19033
      }
19034
      throw new IllegalStateException();
19035
    }
19036
 
19037
    public Object getFieldValue(int fieldId) {
19038
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19039
    }
19040
 
19041
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19042
    public boolean isSet(_Fields field) {
19043
      switch (field) {
19044
      case SUCCESS:
19045
        return isSetSuccess();
19046
      }
19047
      throw new IllegalStateException();
19048
    }
19049
 
19050
    public boolean isSet(int fieldID) {
19051
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19052
    }
19053
 
19054
    @Override
19055
    public boolean equals(Object that) {
19056
      if (that == null)
19057
        return false;
19058
      if (that instanceof getAlerts_result)
19059
        return this.equals((getAlerts_result)that);
19060
      return false;
19061
    }
19062
 
19063
    public boolean equals(getAlerts_result that) {
19064
      if (that == null)
19065
        return false;
19066
 
19067
      boolean this_present_success = true && this.isSetSuccess();
19068
      boolean that_present_success = true && that.isSetSuccess();
19069
      if (this_present_success || that_present_success) {
19070
        if (!(this_present_success && that_present_success))
19071
          return false;
19072
        if (!this.success.equals(that.success))
19073
          return false;
19074
      }
19075
 
19076
      return true;
19077
    }
19078
 
19079
    @Override
19080
    public int hashCode() {
19081
      return 0;
19082
    }
19083
 
19084
    public int compareTo(getAlerts_result other) {
19085
      if (!getClass().equals(other.getClass())) {
19086
        return getClass().getName().compareTo(other.getClass().getName());
19087
      }
19088
 
19089
      int lastComparison = 0;
19090
      getAlerts_result typedOther = (getAlerts_result)other;
19091
 
19092
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19093
      if (lastComparison != 0) {
19094
        return lastComparison;
19095
      }
19096
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19097
      if (lastComparison != 0) {
19098
        return lastComparison;
19099
      }
19100
      return 0;
19101
    }
19102
 
19103
    public void read(TProtocol iprot) throws TException {
19104
      TField field;
19105
      iprot.readStructBegin();
19106
      while (true)
19107
      {
19108
        field = iprot.readFieldBegin();
19109
        if (field.type == TType.STOP) { 
19110
          break;
19111
        }
19112
        _Fields fieldId = _Fields.findByThriftId(field.id);
19113
        if (fieldId == null) {
19114
          TProtocolUtil.skip(iprot, field.type);
19115
        } else {
19116
          switch (fieldId) {
19117
            case SUCCESS:
19118
              if (field.type == TType.LIST) {
19119
                {
1133 chandransh 19120
                  TList _list55 = iprot.readListBegin();
19121
                  this.success = new ArrayList<Alert>(_list55.size);
19122
                  for (int _i56 = 0; _i56 < _list55.size; ++_i56)
305 ashish 19123
                  {
1133 chandransh 19124
                    Alert _elem57;
19125
                    _elem57 = new Alert();
19126
                    _elem57.read(iprot);
19127
                    this.success.add(_elem57);
305 ashish 19128
                  }
19129
                  iprot.readListEnd();
19130
                }
19131
              } else { 
19132
                TProtocolUtil.skip(iprot, field.type);
19133
              }
19134
              break;
19135
          }
19136
          iprot.readFieldEnd();
19137
        }
19138
      }
19139
      iprot.readStructEnd();
19140
      validate();
19141
    }
19142
 
19143
    public void write(TProtocol oprot) throws TException {
19144
      oprot.writeStructBegin(STRUCT_DESC);
19145
 
19146
      if (this.isSetSuccess()) {
19147
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19148
        {
19149
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1133 chandransh 19150
          for (Alert _iter58 : this.success)
305 ashish 19151
          {
1133 chandransh 19152
            _iter58.write(oprot);
305 ashish 19153
          }
19154
          oprot.writeListEnd();
19155
        }
19156
        oprot.writeFieldEnd();
19157
      }
19158
      oprot.writeFieldStop();
19159
      oprot.writeStructEnd();
19160
    }
19161
 
19162
    @Override
19163
    public String toString() {
19164
      StringBuilder sb = new StringBuilder("getAlerts_result(");
19165
      boolean first = true;
19166
 
19167
      sb.append("success:");
19168
      if (this.success == null) {
19169
        sb.append("null");
19170
      } else {
19171
        sb.append(this.success);
19172
      }
19173
      first = false;
19174
      sb.append(")");
19175
      return sb.toString();
19176
    }
19177
 
19178
    public void validate() throws TException {
19179
      // check for required fields
19180
    }
19181
 
19182
  }
19183
 
19184
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
19185
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
19186
 
483 rajveer 19187
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 19188
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
19189
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
19190
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
19191
 
483 rajveer 19192
    private long orderId;
305 ashish 19193
    private boolean unset;
19194
    private long type;
19195
    private String comment;
19196
 
19197
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19198
    public enum _Fields implements TFieldIdEnum {
483 rajveer 19199
      ORDER_ID((short)1, "orderId"),
305 ashish 19200
      UNSET((short)2, "unset"),
19201
      TYPE((short)3, "type"),
19202
      COMMENT((short)4, "comment");
19203
 
19204
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19205
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19206
 
19207
      static {
19208
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19209
          byId.put((int)field._thriftId, field);
19210
          byName.put(field.getFieldName(), field);
19211
        }
19212
      }
19213
 
19214
      /**
19215
       * Find the _Fields constant that matches fieldId, or null if its not found.
19216
       */
19217
      public static _Fields findByThriftId(int fieldId) {
19218
        return byId.get(fieldId);
19219
      }
19220
 
19221
      /**
19222
       * Find the _Fields constant that matches fieldId, throwing an exception
19223
       * if it is not found.
19224
       */
19225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19226
        _Fields fields = findByThriftId(fieldId);
19227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19228
        return fields;
19229
      }
19230
 
19231
      /**
19232
       * Find the _Fields constant that matches name, or null if its not found.
19233
       */
19234
      public static _Fields findByName(String name) {
19235
        return byName.get(name);
19236
      }
19237
 
19238
      private final short _thriftId;
19239
      private final String _fieldName;
19240
 
19241
      _Fields(short thriftId, String fieldName) {
19242
        _thriftId = thriftId;
19243
        _fieldName = fieldName;
19244
      }
19245
 
19246
      public short getThriftFieldId() {
19247
        return _thriftId;
19248
      }
19249
 
19250
      public String getFieldName() {
19251
        return _fieldName;
19252
      }
19253
    }
19254
 
19255
    // isset id assignments
483 rajveer 19256
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 19257
    private static final int __UNSET_ISSET_ID = 1;
19258
    private static final int __TYPE_ISSET_ID = 2;
19259
    private BitSet __isset_bit_vector = new BitSet(3);
19260
 
19261
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 19262
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 19263
          new FieldValueMetaData(TType.I64)));
19264
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
19265
          new FieldValueMetaData(TType.BOOL)));
19266
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
19267
          new FieldValueMetaData(TType.I64)));
19268
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
19269
          new FieldValueMetaData(TType.STRING)));
19270
    }});
19271
 
19272
    static {
19273
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
19274
    }
19275
 
19276
    public setAlert_args() {
19277
    }
19278
 
19279
    public setAlert_args(
483 rajveer 19280
      long orderId,
305 ashish 19281
      boolean unset,
19282
      long type,
19283
      String comment)
19284
    {
19285
      this();
483 rajveer 19286
      this.orderId = orderId;
19287
      setOrderIdIsSet(true);
305 ashish 19288
      this.unset = unset;
19289
      setUnsetIsSet(true);
19290
      this.type = type;
19291
      setTypeIsSet(true);
19292
      this.comment = comment;
19293
    }
19294
 
19295
    /**
19296
     * Performs a deep copy on <i>other</i>.
19297
     */
19298
    public setAlert_args(setAlert_args other) {
19299
      __isset_bit_vector.clear();
19300
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 19301
      this.orderId = other.orderId;
305 ashish 19302
      this.unset = other.unset;
19303
      this.type = other.type;
19304
      if (other.isSetComment()) {
19305
        this.comment = other.comment;
19306
      }
19307
    }
19308
 
19309
    public setAlert_args deepCopy() {
19310
      return new setAlert_args(this);
19311
    }
19312
 
19313
    @Deprecated
19314
    public setAlert_args clone() {
19315
      return new setAlert_args(this);
19316
    }
19317
 
483 rajveer 19318
    public long getOrderId() {
19319
      return this.orderId;
305 ashish 19320
    }
19321
 
483 rajveer 19322
    public setAlert_args setOrderId(long orderId) {
19323
      this.orderId = orderId;
19324
      setOrderIdIsSet(true);
305 ashish 19325
      return this;
19326
    }
19327
 
483 rajveer 19328
    public void unsetOrderId() {
19329
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 19330
    }
19331
 
483 rajveer 19332
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19333
    public boolean isSetOrderId() {
19334
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 19335
    }
19336
 
483 rajveer 19337
    public void setOrderIdIsSet(boolean value) {
19338
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 19339
    }
19340
 
19341
    public boolean isUnset() {
19342
      return this.unset;
19343
    }
19344
 
19345
    public setAlert_args setUnset(boolean unset) {
19346
      this.unset = unset;
19347
      setUnsetIsSet(true);
19348
      return this;
19349
    }
19350
 
19351
    public void unsetUnset() {
19352
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
19353
    }
19354
 
19355
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
19356
    public boolean isSetUnset() {
19357
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
19358
    }
19359
 
19360
    public void setUnsetIsSet(boolean value) {
19361
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
19362
    }
19363
 
19364
    public long getType() {
19365
      return this.type;
19366
    }
19367
 
19368
    public setAlert_args setType(long type) {
19369
      this.type = type;
19370
      setTypeIsSet(true);
19371
      return this;
19372
    }
19373
 
19374
    public void unsetType() {
19375
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
19376
    }
19377
 
19378
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
19379
    public boolean isSetType() {
19380
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
19381
    }
19382
 
19383
    public void setTypeIsSet(boolean value) {
19384
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
19385
    }
19386
 
19387
    public String getComment() {
19388
      return this.comment;
19389
    }
19390
 
19391
    public setAlert_args setComment(String comment) {
19392
      this.comment = comment;
19393
      return this;
19394
    }
19395
 
19396
    public void unsetComment() {
19397
      this.comment = null;
19398
    }
19399
 
19400
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
19401
    public boolean isSetComment() {
19402
      return this.comment != null;
19403
    }
19404
 
19405
    public void setCommentIsSet(boolean value) {
19406
      if (!value) {
19407
        this.comment = null;
19408
      }
19409
    }
19410
 
19411
    public void setFieldValue(_Fields field, Object value) {
19412
      switch (field) {
483 rajveer 19413
      case ORDER_ID:
305 ashish 19414
        if (value == null) {
483 rajveer 19415
          unsetOrderId();
305 ashish 19416
        } else {
483 rajveer 19417
          setOrderId((Long)value);
305 ashish 19418
        }
19419
        break;
19420
 
19421
      case UNSET:
19422
        if (value == null) {
19423
          unsetUnset();
19424
        } else {
19425
          setUnset((Boolean)value);
19426
        }
19427
        break;
19428
 
19429
      case TYPE:
19430
        if (value == null) {
19431
          unsetType();
19432
        } else {
19433
          setType((Long)value);
19434
        }
19435
        break;
19436
 
19437
      case COMMENT:
19438
        if (value == null) {
19439
          unsetComment();
19440
        } else {
19441
          setComment((String)value);
19442
        }
19443
        break;
19444
 
19445
      }
19446
    }
19447
 
19448
    public void setFieldValue(int fieldID, Object value) {
19449
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19450
    }
19451
 
19452
    public Object getFieldValue(_Fields field) {
19453
      switch (field) {
483 rajveer 19454
      case ORDER_ID:
19455
        return new Long(getOrderId());
305 ashish 19456
 
19457
      case UNSET:
19458
        return new Boolean(isUnset());
19459
 
19460
      case TYPE:
19461
        return new Long(getType());
19462
 
19463
      case COMMENT:
19464
        return getComment();
19465
 
19466
      }
19467
      throw new IllegalStateException();
19468
    }
19469
 
19470
    public Object getFieldValue(int fieldId) {
19471
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19472
    }
19473
 
19474
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19475
    public boolean isSet(_Fields field) {
19476
      switch (field) {
483 rajveer 19477
      case ORDER_ID:
19478
        return isSetOrderId();
305 ashish 19479
      case UNSET:
19480
        return isSetUnset();
19481
      case TYPE:
19482
        return isSetType();
19483
      case COMMENT:
19484
        return isSetComment();
19485
      }
19486
      throw new IllegalStateException();
19487
    }
19488
 
19489
    public boolean isSet(int fieldID) {
19490
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19491
    }
19492
 
19493
    @Override
19494
    public boolean equals(Object that) {
19495
      if (that == null)
19496
        return false;
19497
      if (that instanceof setAlert_args)
19498
        return this.equals((setAlert_args)that);
19499
      return false;
19500
    }
19501
 
19502
    public boolean equals(setAlert_args that) {
19503
      if (that == null)
19504
        return false;
19505
 
483 rajveer 19506
      boolean this_present_orderId = true;
19507
      boolean that_present_orderId = true;
19508
      if (this_present_orderId || that_present_orderId) {
19509
        if (!(this_present_orderId && that_present_orderId))
305 ashish 19510
          return false;
483 rajveer 19511
        if (this.orderId != that.orderId)
305 ashish 19512
          return false;
19513
      }
19514
 
19515
      boolean this_present_unset = true;
19516
      boolean that_present_unset = true;
19517
      if (this_present_unset || that_present_unset) {
19518
        if (!(this_present_unset && that_present_unset))
19519
          return false;
19520
        if (this.unset != that.unset)
19521
          return false;
19522
      }
19523
 
19524
      boolean this_present_type = true;
19525
      boolean that_present_type = true;
19526
      if (this_present_type || that_present_type) {
19527
        if (!(this_present_type && that_present_type))
19528
          return false;
19529
        if (this.type != that.type)
19530
          return false;
19531
      }
19532
 
19533
      boolean this_present_comment = true && this.isSetComment();
19534
      boolean that_present_comment = true && that.isSetComment();
19535
      if (this_present_comment || that_present_comment) {
19536
        if (!(this_present_comment && that_present_comment))
19537
          return false;
19538
        if (!this.comment.equals(that.comment))
19539
          return false;
19540
      }
19541
 
19542
      return true;
19543
    }
19544
 
19545
    @Override
19546
    public int hashCode() {
19547
      return 0;
19548
    }
19549
 
19550
    public int compareTo(setAlert_args other) {
19551
      if (!getClass().equals(other.getClass())) {
19552
        return getClass().getName().compareTo(other.getClass().getName());
19553
      }
19554
 
19555
      int lastComparison = 0;
19556
      setAlert_args typedOther = (setAlert_args)other;
19557
 
483 rajveer 19558
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 19559
      if (lastComparison != 0) {
19560
        return lastComparison;
19561
      }
483 rajveer 19562
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 19563
      if (lastComparison != 0) {
19564
        return lastComparison;
19565
      }
19566
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
19567
      if (lastComparison != 0) {
19568
        return lastComparison;
19569
      }
19570
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
19571
      if (lastComparison != 0) {
19572
        return lastComparison;
19573
      }
19574
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
19575
      if (lastComparison != 0) {
19576
        return lastComparison;
19577
      }
19578
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
19579
      if (lastComparison != 0) {
19580
        return lastComparison;
19581
      }
19582
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
19583
      if (lastComparison != 0) {
19584
        return lastComparison;
19585
      }
19586
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
19587
      if (lastComparison != 0) {
19588
        return lastComparison;
19589
      }
19590
      return 0;
19591
    }
19592
 
19593
    public void read(TProtocol iprot) throws TException {
19594
      TField field;
19595
      iprot.readStructBegin();
19596
      while (true)
19597
      {
19598
        field = iprot.readFieldBegin();
19599
        if (field.type == TType.STOP) { 
19600
          break;
19601
        }
19602
        _Fields fieldId = _Fields.findByThriftId(field.id);
19603
        if (fieldId == null) {
19604
          TProtocolUtil.skip(iprot, field.type);
19605
        } else {
19606
          switch (fieldId) {
483 rajveer 19607
            case ORDER_ID:
305 ashish 19608
              if (field.type == TType.I64) {
483 rajveer 19609
                this.orderId = iprot.readI64();
19610
                setOrderIdIsSet(true);
305 ashish 19611
              } else { 
19612
                TProtocolUtil.skip(iprot, field.type);
19613
              }
19614
              break;
19615
            case UNSET:
19616
              if (field.type == TType.BOOL) {
19617
                this.unset = iprot.readBool();
19618
                setUnsetIsSet(true);
19619
              } else { 
19620
                TProtocolUtil.skip(iprot, field.type);
19621
              }
19622
              break;
19623
            case TYPE:
19624
              if (field.type == TType.I64) {
19625
                this.type = iprot.readI64();
19626
                setTypeIsSet(true);
19627
              } else { 
19628
                TProtocolUtil.skip(iprot, field.type);
19629
              }
19630
              break;
19631
            case COMMENT:
19632
              if (field.type == TType.STRING) {
19633
                this.comment = iprot.readString();
19634
              } else { 
19635
                TProtocolUtil.skip(iprot, field.type);
19636
              }
19637
              break;
19638
          }
19639
          iprot.readFieldEnd();
19640
        }
19641
      }
19642
      iprot.readStructEnd();
19643
      validate();
19644
    }
19645
 
19646
    public void write(TProtocol oprot) throws TException {
19647
      validate();
19648
 
19649
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 19650
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19651
      oprot.writeI64(this.orderId);
305 ashish 19652
      oprot.writeFieldEnd();
19653
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
19654
      oprot.writeBool(this.unset);
19655
      oprot.writeFieldEnd();
19656
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
19657
      oprot.writeI64(this.type);
19658
      oprot.writeFieldEnd();
19659
      if (this.comment != null) {
19660
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
19661
        oprot.writeString(this.comment);
19662
        oprot.writeFieldEnd();
19663
      }
19664
      oprot.writeFieldStop();
19665
      oprot.writeStructEnd();
19666
    }
19667
 
19668
    @Override
19669
    public String toString() {
19670
      StringBuilder sb = new StringBuilder("setAlert_args(");
19671
      boolean first = true;
19672
 
483 rajveer 19673
      sb.append("orderId:");
19674
      sb.append(this.orderId);
305 ashish 19675
      first = false;
19676
      if (!first) sb.append(", ");
19677
      sb.append("unset:");
19678
      sb.append(this.unset);
19679
      first = false;
19680
      if (!first) sb.append(", ");
19681
      sb.append("type:");
19682
      sb.append(this.type);
19683
      first = false;
19684
      if (!first) sb.append(", ");
19685
      sb.append("comment:");
19686
      if (this.comment == null) {
19687
        sb.append("null");
19688
      } else {
19689
        sb.append(this.comment);
19690
      }
19691
      first = false;
19692
      sb.append(")");
19693
      return sb.toString();
19694
    }
19695
 
19696
    public void validate() throws TException {
19697
      // check for required fields
19698
    }
19699
 
19700
  }
19701
 
19702
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
19703
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
19704
 
19705
 
19706
 
19707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19708
    public enum _Fields implements TFieldIdEnum {
19709
;
19710
 
19711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19713
 
19714
      static {
19715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19716
          byId.put((int)field._thriftId, field);
19717
          byName.put(field.getFieldName(), field);
19718
        }
19719
      }
19720
 
19721
      /**
19722
       * Find the _Fields constant that matches fieldId, or null if its not found.
19723
       */
19724
      public static _Fields findByThriftId(int fieldId) {
19725
        return byId.get(fieldId);
19726
      }
19727
 
19728
      /**
19729
       * Find the _Fields constant that matches fieldId, throwing an exception
19730
       * if it is not found.
19731
       */
19732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19733
        _Fields fields = findByThriftId(fieldId);
19734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19735
        return fields;
19736
      }
19737
 
19738
      /**
19739
       * Find the _Fields constant that matches name, or null if its not found.
19740
       */
19741
      public static _Fields findByName(String name) {
19742
        return byName.get(name);
19743
      }
19744
 
19745
      private final short _thriftId;
19746
      private final String _fieldName;
19747
 
19748
      _Fields(short thriftId, String fieldName) {
19749
        _thriftId = thriftId;
19750
        _fieldName = fieldName;
19751
      }
19752
 
19753
      public short getThriftFieldId() {
19754
        return _thriftId;
19755
      }
19756
 
19757
      public String getFieldName() {
19758
        return _fieldName;
19759
      }
19760
    }
19761
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19762
    }});
19763
 
19764
    static {
19765
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
19766
    }
19767
 
19768
    public setAlert_result() {
19769
    }
19770
 
19771
    /**
19772
     * Performs a deep copy on <i>other</i>.
19773
     */
19774
    public setAlert_result(setAlert_result other) {
19775
    }
19776
 
19777
    public setAlert_result deepCopy() {
19778
      return new setAlert_result(this);
19779
    }
19780
 
19781
    @Deprecated
19782
    public setAlert_result clone() {
19783
      return new setAlert_result(this);
19784
    }
19785
 
19786
    public void setFieldValue(_Fields field, Object value) {
19787
      switch (field) {
19788
      }
19789
    }
19790
 
19791
    public void setFieldValue(int fieldID, Object value) {
19792
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19793
    }
19794
 
19795
    public Object getFieldValue(_Fields field) {
19796
      switch (field) {
19797
      }
19798
      throw new IllegalStateException();
19799
    }
19800
 
19801
    public Object getFieldValue(int fieldId) {
19802
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19803
    }
19804
 
19805
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19806
    public boolean isSet(_Fields field) {
19807
      switch (field) {
19808
      }
19809
      throw new IllegalStateException();
19810
    }
19811
 
19812
    public boolean isSet(int fieldID) {
19813
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19814
    }
19815
 
19816
    @Override
19817
    public boolean equals(Object that) {
19818
      if (that == null)
19819
        return false;
19820
      if (that instanceof setAlert_result)
19821
        return this.equals((setAlert_result)that);
19822
      return false;
19823
    }
19824
 
19825
    public boolean equals(setAlert_result that) {
19826
      if (that == null)
19827
        return false;
19828
 
19829
      return true;
19830
    }
19831
 
19832
    @Override
19833
    public int hashCode() {
19834
      return 0;
19835
    }
19836
 
19837
    public int compareTo(setAlert_result other) {
19838
      if (!getClass().equals(other.getClass())) {
19839
        return getClass().getName().compareTo(other.getClass().getName());
19840
      }
19841
 
19842
      int lastComparison = 0;
19843
      setAlert_result typedOther = (setAlert_result)other;
19844
 
19845
      return 0;
19846
    }
19847
 
19848
    public void read(TProtocol iprot) throws TException {
19849
      TField field;
19850
      iprot.readStructBegin();
19851
      while (true)
19852
      {
19853
        field = iprot.readFieldBegin();
19854
        if (field.type == TType.STOP) { 
19855
          break;
19856
        }
19857
        _Fields fieldId = _Fields.findByThriftId(field.id);
19858
        if (fieldId == null) {
19859
          TProtocolUtil.skip(iprot, field.type);
19860
        } else {
19861
          switch (fieldId) {
19862
          }
19863
          iprot.readFieldEnd();
19864
        }
19865
      }
19866
      iprot.readStructEnd();
19867
      validate();
19868
    }
19869
 
19870
    public void write(TProtocol oprot) throws TException {
19871
      oprot.writeStructBegin(STRUCT_DESC);
19872
 
19873
      oprot.writeFieldStop();
19874
      oprot.writeStructEnd();
19875
    }
19876
 
19877
    @Override
19878
    public String toString() {
19879
      StringBuilder sb = new StringBuilder("setAlert_result(");
19880
      boolean first = true;
19881
 
19882
      sb.append(")");
19883
      return sb.toString();
19884
    }
19885
 
19886
    public void validate() throws TException {
19887
      // check for required fields
19888
    }
19889
 
19890
  }
19891
 
68 ashish 19892
}