Subversion Repositories SmartDukaan

Rev

Rev 1148 | Rev 1221 | 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
    /**
1209 chandransh 93
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
94
     * 
95
     * 
96
     * @param orderId
97
     */
98
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
99
 
100
    /**
758 chandransh 101
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
102
     * 
103
     * @param warehouseId
104
     * @param providerId
105
     */
106
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
107
 
1114 chandransh 108
    /**
109
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
110
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
111
     * Raises an exception if we encounter report for an AWB number that we did not ship.
112
     * 
113
     * @param providerId
114
     * @param pickupDetails
115
     */
116
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException;
117
 
1133 chandransh 118
    /**
119
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
120
     * the name of the receiver.
121
     * Raises an exception if we encounter report for an AWB number that we did not ship.
122
     * 
123
     * @param providerId
124
     * @param deliveredOrders
125
     */
126
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
127
 
128
    /**
129
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
130
     * Raises an exception if we encounter report for an AWB number that we did not ship.
131
     * 
132
     * @param providerId
133
     * @param returnedOrders
134
     */
135
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
136
 
483 rajveer 137
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 138
 
483 rajveer 139
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 140
 
141
  }
142
 
143
  public static class Client implements Iface {
144
    public Client(TProtocol prot)
145
    {
146
      this(prot, prot);
147
    }
148
 
149
    public Client(TProtocol iprot, TProtocol oprot)
150
    {
151
      iprot_ = iprot;
152
      oprot_ = oprot;
153
    }
154
 
155
    protected TProtocol iprot_;
156
    protected TProtocol oprot_;
157
 
158
    protected int seqid_;
159
 
160
    public TProtocol getInputProtocol()
161
    {
162
      return this.iprot_;
163
    }
164
 
165
    public TProtocol getOutputProtocol()
166
    {
167
      return this.oprot_;
168
    }
169
 
764 rajveer 170
    public void closeSession() throws TException
171
    {
172
      send_closeSession();
173
      recv_closeSession();
174
    }
175
 
176
    public void send_closeSession() throws TException
177
    {
178
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
179
      closeSession_args args = new closeSession_args();
180
      args.write(oprot_);
181
      oprot_.writeMessageEnd();
182
      oprot_.getTransport().flush();
183
    }
184
 
185
    public void recv_closeSession() throws TException
186
    {
187
      TMessage msg = iprot_.readMessageBegin();
188
      if (msg.type == TMessageType.EXCEPTION) {
189
        TApplicationException x = TApplicationException.read(iprot_);
190
        iprot_.readMessageEnd();
191
        throw x;
192
      }
193
      closeSession_result result = new closeSession_result();
194
      result.read(iprot_);
195
      iprot_.readMessageEnd();
196
      return;
197
    }
198
 
132 ashish 199
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 200
    {
201
      send_createTransaction(transaction);
132 ashish 202
      return recv_createTransaction();
68 ashish 203
    }
204
 
205
    public void send_createTransaction(Transaction transaction) throws TException
206
    {
207
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
208
      createTransaction_args args = new createTransaction_args();
209
      args.transaction = transaction;
210
      args.write(oprot_);
211
      oprot_.writeMessageEnd();
212
      oprot_.getTransport().flush();
213
    }
214
 
132 ashish 215
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 216
    {
217
      TMessage msg = iprot_.readMessageBegin();
218
      if (msg.type == TMessageType.EXCEPTION) {
219
        TApplicationException x = TApplicationException.read(iprot_);
220
        iprot_.readMessageEnd();
221
        throw x;
222
      }
223
      createTransaction_result result = new createTransaction_result();
224
      result.read(iprot_);
225
      iprot_.readMessageEnd();
132 ashish 226
      if (result.isSetSuccess()) {
227
        return result.success;
228
      }
68 ashish 229
      if (result.ex != null) {
230
        throw result.ex;
231
      }
132 ashish 232
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 233
    }
234
 
235
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
236
    {
237
      send_getTransaction(id);
238
      return recv_getTransaction();
239
    }
240
 
241
    public void send_getTransaction(long id) throws TException
242
    {
243
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
244
      getTransaction_args args = new getTransaction_args();
245
      args.id = id;
246
      args.write(oprot_);
247
      oprot_.writeMessageEnd();
248
      oprot_.getTransport().flush();
249
    }
250
 
251
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
252
    {
253
      TMessage msg = iprot_.readMessageBegin();
254
      if (msg.type == TMessageType.EXCEPTION) {
255
        TApplicationException x = TApplicationException.read(iprot_);
256
        iprot_.readMessageEnd();
257
        throw x;
258
      }
259
      getTransaction_result result = new getTransaction_result();
260
      result.read(iprot_);
261
      iprot_.readMessageEnd();
262
      if (result.isSetSuccess()) {
263
        return result.success;
264
      }
265
      if (result.ex != null) {
266
        throw result.ex;
267
      }
268
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
269
    }
270
 
132 ashish 271
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 272
    {
132 ashish 273
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 274
      return recv_getTransactionsForCustomer();
275
    }
276
 
132 ashish 277
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 278
    {
279
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
280
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
281
      args.customerId = customerId;
132 ashish 282
      args.from_date = from_date;
283
      args.to_date = to_date;
68 ashish 284
      args.status = status;
285
      args.write(oprot_);
286
      oprot_.writeMessageEnd();
287
      oprot_.getTransport().flush();
288
    }
289
 
290
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
291
    {
292
      TMessage msg = iprot_.readMessageBegin();
293
      if (msg.type == TMessageType.EXCEPTION) {
294
        TApplicationException x = TApplicationException.read(iprot_);
295
        iprot_.readMessageEnd();
296
        throw x;
297
      }
298
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
299
      result.read(iprot_);
300
      iprot_.readMessageEnd();
301
      if (result.isSetSuccess()) {
302
        return result.success;
303
      }
304
      if (result.ex != null) {
305
        throw result.ex;
306
      }
307
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
308
    }
309
 
132 ashish 310
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
311
    {
312
      send_getTransactionsForShoppingCartId(shoppingCartId);
313
      return recv_getTransactionsForShoppingCartId();
314
    }
315
 
316
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
317
    {
318
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
319
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
320
      args.shoppingCartId = shoppingCartId;
321
      args.write(oprot_);
322
      oprot_.writeMessageEnd();
323
      oprot_.getTransport().flush();
324
    }
325
 
326
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
327
    {
328
      TMessage msg = iprot_.readMessageBegin();
329
      if (msg.type == TMessageType.EXCEPTION) {
330
        TApplicationException x = TApplicationException.read(iprot_);
331
        iprot_.readMessageEnd();
332
        throw x;
333
      }
334
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
335
      result.read(iprot_);
336
      iprot_.readMessageEnd();
337
      if (result.isSetSuccess()) {
338
        return result.success;
339
      }
340
      if (result.ex != null) {
341
        throw result.ex;
342
      }
343
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
344
    }
345
 
68 ashish 346
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
347
    {
348
      send_getTransactionStatus(transactionId);
349
      return recv_getTransactionStatus();
350
    }
351
 
352
    public void send_getTransactionStatus(long transactionId) throws TException
353
    {
354
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
355
      getTransactionStatus_args args = new getTransactionStatus_args();
356
      args.transactionId = transactionId;
357
      args.write(oprot_);
358
      oprot_.writeMessageEnd();
359
      oprot_.getTransport().flush();
360
    }
361
 
362
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
363
    {
364
      TMessage msg = iprot_.readMessageBegin();
365
      if (msg.type == TMessageType.EXCEPTION) {
366
        TApplicationException x = TApplicationException.read(iprot_);
367
        iprot_.readMessageEnd();
368
        throw x;
369
      }
370
      getTransactionStatus_result result = new getTransactionStatus_result();
371
      result.read(iprot_);
372
      iprot_.readMessageEnd();
373
      if (result.isSetSuccess()) {
374
        return result.success;
375
      }
376
      if (result.ex != null) {
377
        throw result.ex;
378
      }
379
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
380
    }
381
 
382
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
383
    {
384
      send_changeTransactionStatus(transactionId, status, description);
385
      return recv_changeTransactionStatus();
386
    }
387
 
388
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
389
    {
390
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
391
      changeTransactionStatus_args args = new changeTransactionStatus_args();
392
      args.transactionId = transactionId;
393
      args.status = status;
394
      args.description = description;
395
      args.write(oprot_);
396
      oprot_.writeMessageEnd();
397
      oprot_.getTransport().flush();
398
    }
399
 
400
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
401
    {
402
      TMessage msg = iprot_.readMessageBegin();
403
      if (msg.type == TMessageType.EXCEPTION) {
404
        TApplicationException x = TApplicationException.read(iprot_);
405
        iprot_.readMessageEnd();
406
        throw x;
407
      }
408
      changeTransactionStatus_result result = new changeTransactionStatus_result();
409
      result.read(iprot_);
410
      iprot_.readMessageEnd();
411
      if (result.isSetSuccess()) {
412
        return result.success;
413
      }
414
      if (result.ex != null) {
415
        throw result.ex;
416
      }
417
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
418
    }
419
 
483 rajveer 420
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 421
    {
483 rajveer 422
      send_getAllOrders(status, from_date, to_date, warehouse_id);
423
      return recv_getAllOrders();
68 ashish 424
    }
425
 
483 rajveer 426
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 427
    {
483 rajveer 428
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
429
      getAllOrders_args args = new getAllOrders_args();
430
      args.status = status;
431
      args.from_date = from_date;
432
      args.to_date = to_date;
433
      args.warehouse_id = warehouse_id;
68 ashish 434
      args.write(oprot_);
435
      oprot_.writeMessageEnd();
436
      oprot_.getTransport().flush();
437
    }
438
 
483 rajveer 439
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 440
    {
441
      TMessage msg = iprot_.readMessageBegin();
442
      if (msg.type == TMessageType.EXCEPTION) {
443
        TApplicationException x = TApplicationException.read(iprot_);
444
        iprot_.readMessageEnd();
445
        throw x;
446
      }
483 rajveer 447
      getAllOrders_result result = new getAllOrders_result();
68 ashish 448
      result.read(iprot_);
449
      iprot_.readMessageEnd();
450
      if (result.isSetSuccess()) {
451
        return result.success;
452
      }
453
      if (result.ex != null) {
454
        throw result.ex;
455
      }
483 rajveer 456
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 457
    }
458
 
1022 varun.gupt 459
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
460
    {
461
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
462
      return recv_getOrdersByBillingDate();
463
    }
464
 
465
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
466
    {
467
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
468
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
469
      args.status = status;
470
      args.start_billing_date = start_billing_date;
471
      args.end_billing_date = end_billing_date;
472
      args.warehouse_id = warehouse_id;
473
      args.write(oprot_);
474
      oprot_.writeMessageEnd();
475
      oprot_.getTransport().flush();
476
    }
477
 
478
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
479
    {
480
      TMessage msg = iprot_.readMessageBegin();
481
      if (msg.type == TMessageType.EXCEPTION) {
482
        TApplicationException x = TApplicationException.read(iprot_);
483
        iprot_.readMessageEnd();
484
        throw x;
485
      }
486
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
487
      result.read(iprot_);
488
      iprot_.readMessageEnd();
489
      if (result.isSetSuccess()) {
490
        return result.success;
491
      }
492
      if (result.ex != null) {
493
        throw result.ex;
494
      }
495
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
496
    }
497
 
483 rajveer 498
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 499
    {
483 rajveer 500
      send_changeOrderStatus(orderId, status, description);
501
      return recv_changeOrderStatus();
68 ashish 502
    }
503
 
483 rajveer 504
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 505
    {
483 rajveer 506
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
507
      changeOrderStatus_args args = new changeOrderStatus_args();
508
      args.orderId = orderId;
509
      args.status = status;
510
      args.description = description;
68 ashish 511
      args.write(oprot_);
512
      oprot_.writeMessageEnd();
513
      oprot_.getTransport().flush();
514
    }
515
 
483 rajveer 516
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 517
    {
518
      TMessage msg = iprot_.readMessageBegin();
519
      if (msg.type == TMessageType.EXCEPTION) {
520
        TApplicationException x = TApplicationException.read(iprot_);
521
        iprot_.readMessageEnd();
522
        throw x;
523
      }
483 rajveer 524
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 525
      result.read(iprot_);
526
      iprot_.readMessageEnd();
527
      if (result.isSetSuccess()) {
528
        return result.success;
529
      }
530
      if (result.ex != null) {
531
        throw result.ex;
532
      }
483 rajveer 533
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 534
    }
535
 
1148 chandransh 536
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 537
    {
1148 chandransh 538
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 539
      return recv_addBillingDetails();
540
    }
541
 
1148 chandransh 542
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 543
    {
544
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
545
      addBillingDetails_args args = new addBillingDetails_args();
546
      args.orderId = orderId;
547
      args.invoice_number = invoice_number;
548
      args.billed_by = billed_by;
549
      args.write(oprot_);
550
      oprot_.writeMessageEnd();
551
      oprot_.getTransport().flush();
552
    }
553
 
554
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
555
    {
556
      TMessage msg = iprot_.readMessageBegin();
557
      if (msg.type == TMessageType.EXCEPTION) {
558
        TApplicationException x = TApplicationException.read(iprot_);
559
        iprot_.readMessageEnd();
560
        throw x;
561
      }
562
      addBillingDetails_result result = new addBillingDetails_result();
563
      result.read(iprot_);
564
      iprot_.readMessageEnd();
565
      if (result.isSetSuccess()) {
566
        return result.success;
567
      }
568
      if (result.ex != null) {
569
        throw result.ex;
570
      }
571
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
572
    }
573
 
1148 chandransh 574
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
575
    {
576
      send_addJacketNumber(orderId, jacketNumber);
577
      return recv_addJacketNumber();
578
    }
579
 
580
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
581
    {
582
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
583
      addJacketNumber_args args = new addJacketNumber_args();
584
      args.orderId = orderId;
585
      args.jacketNumber = jacketNumber;
586
      args.write(oprot_);
587
      oprot_.writeMessageEnd();
588
      oprot_.getTransport().flush();
589
    }
590
 
591
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
592
    {
593
      TMessage msg = iprot_.readMessageBegin();
594
      if (msg.type == TMessageType.EXCEPTION) {
595
        TApplicationException x = TApplicationException.read(iprot_);
596
        iprot_.readMessageEnd();
597
        throw x;
598
      }
599
      addJacketNumber_result result = new addJacketNumber_result();
600
      result.read(iprot_);
601
      iprot_.readMessageEnd();
602
      if (result.isSetSuccess()) {
603
        return result.success;
604
      }
605
      if (result.ex != null) {
606
        throw result.ex;
607
      }
608
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
609
    }
610
 
923 rajveer 611
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
612
    {
613
      send_acceptOrder(orderId);
614
      return recv_acceptOrder();
615
    }
616
 
617
    public void send_acceptOrder(long orderId) throws TException
618
    {
619
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
620
      acceptOrder_args args = new acceptOrder_args();
621
      args.orderId = orderId;
622
      args.write(oprot_);
623
      oprot_.writeMessageEnd();
624
      oprot_.getTransport().flush();
625
    }
626
 
627
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
628
    {
629
      TMessage msg = iprot_.readMessageBegin();
630
      if (msg.type == TMessageType.EXCEPTION) {
631
        TApplicationException x = TApplicationException.read(iprot_);
632
        iprot_.readMessageEnd();
633
        throw x;
634
      }
635
      acceptOrder_result result = new acceptOrder_result();
636
      result.read(iprot_);
637
      iprot_.readMessageEnd();
638
      if (result.isSetSuccess()) {
639
        return result.success;
640
      }
641
      if (result.ex != null) {
642
        throw result.ex;
643
      }
644
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
645
    }
646
 
647
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
648
    {
649
      send_billOrder(orderId);
650
      return recv_billOrder();
651
    }
652
 
653
    public void send_billOrder(long orderId) throws TException
654
    {
655
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
656
      billOrder_args args = new billOrder_args();
657
      args.orderId = orderId;
658
      args.write(oprot_);
659
      oprot_.writeMessageEnd();
660
      oprot_.getTransport().flush();
661
    }
662
 
663
    public boolean recv_billOrder() throws TransactionServiceException, TException
664
    {
665
      TMessage msg = iprot_.readMessageBegin();
666
      if (msg.type == TMessageType.EXCEPTION) {
667
        TApplicationException x = TApplicationException.read(iprot_);
668
        iprot_.readMessageEnd();
669
        throw x;
670
      }
671
      billOrder_result result = new billOrder_result();
672
      result.read(iprot_);
673
      iprot_.readMessageEnd();
674
      if (result.isSetSuccess()) {
675
        return result.success;
676
      }
677
      if (result.ex != null) {
678
        throw result.ex;
679
      }
680
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
681
    }
682
 
483 rajveer 683
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 684
    {
483 rajveer 685
      send_getOrdersForTransaction(transactionId);
686
      return recv_getOrdersForTransaction();
68 ashish 687
    }
688
 
483 rajveer 689
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 690
    {
483 rajveer 691
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
692
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 693
      args.transactionId = transactionId;
694
      args.write(oprot_);
695
      oprot_.writeMessageEnd();
696
      oprot_.getTransport().flush();
697
    }
698
 
483 rajveer 699
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 700
    {
701
      TMessage msg = iprot_.readMessageBegin();
702
      if (msg.type == TMessageType.EXCEPTION) {
703
        TApplicationException x = TApplicationException.read(iprot_);
704
        iprot_.readMessageEnd();
705
        throw x;
706
      }
483 rajveer 707
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 708
      result.read(iprot_);
709
      iprot_.readMessageEnd();
710
      if (result.isSetSuccess()) {
711
        return result.success;
712
      }
713
      if (result.ex != null) {
714
        throw result.ex;
715
      }
483 rajveer 716
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 717
    }
718
 
483 rajveer 719
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 720
    {
483 rajveer 721
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
722
      return recv_getOrdersForCustomer();
68 ashish 723
    }
724
 
483 rajveer 725
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 726
    {
483 rajveer 727
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
728
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
729
      args.customerId = customerId;
730
      args.from_date = from_date;
731
      args.to_date = to_date;
732
      args.status = status;
68 ashish 733
      args.write(oprot_);
734
      oprot_.writeMessageEnd();
735
      oprot_.getTransport().flush();
736
    }
737
 
483 rajveer 738
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 739
    {
740
      TMessage msg = iprot_.readMessageBegin();
741
      if (msg.type == TMessageType.EXCEPTION) {
742
        TApplicationException x = TApplicationException.read(iprot_);
743
        iprot_.readMessageEnd();
744
        throw x;
745
      }
483 rajveer 746
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 747
      result.read(iprot_);
748
      iprot_.readMessageEnd();
749
      if (result.isSetSuccess()) {
750
        return result.success;
751
      }
752
      if (result.ex != null) {
753
        throw result.ex;
754
      }
483 rajveer 755
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 756
    }
757
 
483 rajveer 758
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 759
    {
483 rajveer 760
      send_createOrder(order);
761
      return recv_createOrder();
68 ashish 762
    }
763
 
483 rajveer 764
    public void send_createOrder(Order order) throws TException
68 ashish 765
    {
483 rajveer 766
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
767
      createOrder_args args = new createOrder_args();
768
      args.order = order;
68 ashish 769
      args.write(oprot_);
770
      oprot_.writeMessageEnd();
771
      oprot_.getTransport().flush();
772
    }
773
 
483 rajveer 774
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 775
    {
776
      TMessage msg = iprot_.readMessageBegin();
777
      if (msg.type == TMessageType.EXCEPTION) {
778
        TApplicationException x = TApplicationException.read(iprot_);
779
        iprot_.readMessageEnd();
780
        throw x;
781
      }
483 rajveer 782
      createOrder_result result = new createOrder_result();
68 ashish 783
      result.read(iprot_);
784
      iprot_.readMessageEnd();
785
      if (result.isSetSuccess()) {
786
        return result.success;
787
      }
788
      if (result.ex != null) {
789
        throw result.ex;
790
      }
483 rajveer 791
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 792
    }
793
 
483 rajveer 794
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 795
    {
483 rajveer 796
      send_getOrder(id);
797
      return recv_getOrder();
68 ashish 798
    }
799
 
483 rajveer 800
    public void send_getOrder(long id) throws TException
68 ashish 801
    {
483 rajveer 802
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
803
      getOrder_args args = new getOrder_args();
804
      args.id = id;
68 ashish 805
      args.write(oprot_);
806
      oprot_.writeMessageEnd();
807
      oprot_.getTransport().flush();
808
    }
809
 
483 rajveer 810
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 811
    {
812
      TMessage msg = iprot_.readMessageBegin();
813
      if (msg.type == TMessageType.EXCEPTION) {
814
        TApplicationException x = TApplicationException.read(iprot_);
815
        iprot_.readMessageEnd();
816
        throw x;
817
      }
483 rajveer 818
      getOrder_result result = new getOrder_result();
68 ashish 819
      result.read(iprot_);
820
      iprot_.readMessageEnd();
821
      if (result.isSetSuccess()) {
822
        return result.success;
823
      }
824
      if (result.ex != null) {
825
        throw result.ex;
826
      }
483 rajveer 827
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 828
    }
829
 
483 rajveer 830
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 831
    {
483 rajveer 832
      send_getLineItemsForOrder(orderId);
833
      return recv_getLineItemsForOrder();
68 ashish 834
    }
835
 
483 rajveer 836
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 837
    {
483 rajveer 838
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
839
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
840
      args.orderId = orderId;
68 ashish 841
      args.write(oprot_);
842
      oprot_.writeMessageEnd();
843
      oprot_.getTransport().flush();
844
    }
845
 
483 rajveer 846
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 847
    {
848
      TMessage msg = iprot_.readMessageBegin();
849
      if (msg.type == TMessageType.EXCEPTION) {
850
        TApplicationException x = TApplicationException.read(iprot_);
851
        iprot_.readMessageEnd();
852
        throw x;
853
      }
483 rajveer 854
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 855
      result.read(iprot_);
856
      iprot_.readMessageEnd();
857
      if (result.isSetSuccess()) {
858
        return result.success;
859
      }
860
      if (result.ex != null) {
861
        throw result.ex;
862
      }
483 rajveer 863
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 864
    }
865
 
1209 chandransh 866
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
867
    {
868
      send_markOrderAsOutOfStock(orderId);
869
      return recv_markOrderAsOutOfStock();
870
    }
871
 
872
    public void send_markOrderAsOutOfStock(long orderId) throws TException
873
    {
874
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
875
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
876
      args.orderId = orderId;
877
      args.write(oprot_);
878
      oprot_.writeMessageEnd();
879
      oprot_.getTransport().flush();
880
    }
881
 
882
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
883
    {
884
      TMessage msg = iprot_.readMessageBegin();
885
      if (msg.type == TMessageType.EXCEPTION) {
886
        TApplicationException x = TApplicationException.read(iprot_);
887
        iprot_.readMessageEnd();
888
        throw x;
889
      }
890
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
891
      result.read(iprot_);
892
      iprot_.readMessageEnd();
893
      if (result.isSetSuccess()) {
894
        return result.success;
895
      }
896
      if (result.ex != null) {
897
        throw result.ex;
898
      }
899
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
900
    }
901
 
758 chandransh 902
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
903
    {
904
      send_markOrdersAsManifested(warehouseId, providerId);
905
      return recv_markOrdersAsManifested();
906
    }
907
 
908
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
909
    {
910
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
911
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
912
      args.warehouseId = warehouseId;
913
      args.providerId = providerId;
914
      args.write(oprot_);
915
      oprot_.writeMessageEnd();
916
      oprot_.getTransport().flush();
917
    }
918
 
919
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
920
    {
921
      TMessage msg = iprot_.readMessageBegin();
922
      if (msg.type == TMessageType.EXCEPTION) {
923
        TApplicationException x = TApplicationException.read(iprot_);
924
        iprot_.readMessageEnd();
925
        throw x;
926
      }
927
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
928
      result.read(iprot_);
929
      iprot_.readMessageEnd();
930
      if (result.isSetSuccess()) {
931
        return result.success;
932
      }
933
      if (result.ex != null) {
934
        throw result.ex;
935
      }
936
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
937
    }
938
 
1114 chandransh 939
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException
940
    {
941
      send_markOrdersAsPickedUp(providerId, pickupDetails);
942
      return recv_markOrdersAsPickedUp();
943
    }
944
 
945
    public void send_markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TException
946
    {
947
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
948
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
949
      args.providerId = providerId;
950
      args.pickupDetails = pickupDetails;
951
      args.write(oprot_);
952
      oprot_.writeMessageEnd();
953
      oprot_.getTransport().flush();
954
    }
955
 
956
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
957
    {
958
      TMessage msg = iprot_.readMessageBegin();
959
      if (msg.type == TMessageType.EXCEPTION) {
960
        TApplicationException x = TApplicationException.read(iprot_);
961
        iprot_.readMessageEnd();
962
        throw x;
963
      }
964
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
965
      result.read(iprot_);
966
      iprot_.readMessageEnd();
967
      if (result.isSetSuccess()) {
968
        return result.success;
969
      }
970
      if (result.ex != null) {
971
        throw result.ex;
972
      }
973
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
974
    }
975
 
1133 chandransh 976
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
977
    {
978
      send_markOrdersAsDelivered(providerId, deliveredOrders);
979
      recv_markOrdersAsDelivered();
980
    }
981
 
982
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
983
    {
984
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
985
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
986
      args.providerId = providerId;
987
      args.deliveredOrders = deliveredOrders;
988
      args.write(oprot_);
989
      oprot_.writeMessageEnd();
990
      oprot_.getTransport().flush();
991
    }
992
 
993
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
994
    {
995
      TMessage msg = iprot_.readMessageBegin();
996
      if (msg.type == TMessageType.EXCEPTION) {
997
        TApplicationException x = TApplicationException.read(iprot_);
998
        iprot_.readMessageEnd();
999
        throw x;
1000
      }
1001
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1002
      result.read(iprot_);
1003
      iprot_.readMessageEnd();
1004
      if (result.ex != null) {
1005
        throw result.ex;
1006
      }
1007
      return;
1008
    }
1009
 
1010
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1011
    {
1012
      send_markOrdersAsFailed(providerId, returnedOrders);
1013
      recv_markOrdersAsFailed();
1014
    }
1015
 
1016
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1017
    {
1018
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1019
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1020
      args.providerId = providerId;
1021
      args.returnedOrders = returnedOrders;
1022
      args.write(oprot_);
1023
      oprot_.writeMessageEnd();
1024
      oprot_.getTransport().flush();
1025
    }
1026
 
1027
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1028
    {
1029
      TMessage msg = iprot_.readMessageBegin();
1030
      if (msg.type == TMessageType.EXCEPTION) {
1031
        TApplicationException x = TApplicationException.read(iprot_);
1032
        iprot_.readMessageEnd();
1033
        throw x;
1034
      }
1035
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1036
      result.read(iprot_);
1037
      iprot_.readMessageEnd();
1038
      if (result.ex != null) {
1039
        throw result.ex;
1040
      }
1041
      return;
1042
    }
1043
 
483 rajveer 1044
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1045
    {
483 rajveer 1046
      send_getAlerts(orderId, valid);
305 ashish 1047
      return recv_getAlerts();
1048
    }
1049
 
483 rajveer 1050
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1051
    {
1052
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1053
      getAlerts_args args = new getAlerts_args();
483 rajveer 1054
      args.orderId = orderId;
305 ashish 1055
      args.valid = valid;
1056
      args.write(oprot_);
1057
      oprot_.writeMessageEnd();
1058
      oprot_.getTransport().flush();
1059
    }
1060
 
1061
    public List<Alert> recv_getAlerts() throws TException
1062
    {
1063
      TMessage msg = iprot_.readMessageBegin();
1064
      if (msg.type == TMessageType.EXCEPTION) {
1065
        TApplicationException x = TApplicationException.read(iprot_);
1066
        iprot_.readMessageEnd();
1067
        throw x;
1068
      }
1069
      getAlerts_result result = new getAlerts_result();
1070
      result.read(iprot_);
1071
      iprot_.readMessageEnd();
1072
      if (result.isSetSuccess()) {
1073
        return result.success;
1074
      }
1075
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1076
    }
1077
 
483 rajveer 1078
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1079
    {
483 rajveer 1080
      send_setAlert(orderId, unset, type, comment);
305 ashish 1081
      recv_setAlert();
1082
    }
1083
 
483 rajveer 1084
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1085
    {
1086
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1087
      setAlert_args args = new setAlert_args();
483 rajveer 1088
      args.orderId = orderId;
305 ashish 1089
      args.unset = unset;
1090
      args.type = type;
1091
      args.comment = comment;
1092
      args.write(oprot_);
1093
      oprot_.writeMessageEnd();
1094
      oprot_.getTransport().flush();
1095
    }
1096
 
1097
    public void recv_setAlert() throws TException
1098
    {
1099
      TMessage msg = iprot_.readMessageBegin();
1100
      if (msg.type == TMessageType.EXCEPTION) {
1101
        TApplicationException x = TApplicationException.read(iprot_);
1102
        iprot_.readMessageEnd();
1103
        throw x;
1104
      }
1105
      setAlert_result result = new setAlert_result();
1106
      result.read(iprot_);
1107
      iprot_.readMessageEnd();
1108
      return;
1109
    }
1110
 
68 ashish 1111
  }
1112
  public static class Processor implements TProcessor {
1113
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1114
    public Processor(Iface iface)
1115
    {
1116
      iface_ = iface;
764 rajveer 1117
      processMap_.put("closeSession", new closeSession());
68 ashish 1118
      processMap_.put("createTransaction", new createTransaction());
1119
      processMap_.put("getTransaction", new getTransaction());
1120
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1121
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1122
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1123
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 1124
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1125
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
483 rajveer 1126
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1127
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1128
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1129
      processMap_.put("acceptOrder", new acceptOrder());
1130
      processMap_.put("billOrder", new billOrder());
483 rajveer 1131
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1132
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1133
      processMap_.put("createOrder", new createOrder());
1134
      processMap_.put("getOrder", new getOrder());
1135
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1209 chandransh 1136
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1137
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1138
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1139
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1140
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
305 ashish 1141
      processMap_.put("getAlerts", new getAlerts());
1142
      processMap_.put("setAlert", new setAlert());
68 ashish 1143
    }
1144
 
1145
    protected static interface ProcessFunction {
1146
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1147
    }
1148
 
1149
    private Iface iface_;
1150
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1151
 
1152
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1153
    {
1154
      TMessage msg = iprot.readMessageBegin();
1155
      ProcessFunction fn = processMap_.get(msg.name);
1156
      if (fn == null) {
1157
        TProtocolUtil.skip(iprot, TType.STRUCT);
1158
        iprot.readMessageEnd();
1159
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1160
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1161
        x.write(oprot);
1162
        oprot.writeMessageEnd();
1163
        oprot.getTransport().flush();
1164
        return true;
1165
      }
1166
      fn.process(msg.seqid, iprot, oprot);
1167
      return true;
1168
    }
1169
 
764 rajveer 1170
    private class closeSession implements ProcessFunction {
1171
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1172
      {
1173
        closeSession_args args = new closeSession_args();
1174
        args.read(iprot);
1175
        iprot.readMessageEnd();
1176
        closeSession_result result = new closeSession_result();
1177
        iface_.closeSession();
1178
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1179
        result.write(oprot);
1180
        oprot.writeMessageEnd();
1181
        oprot.getTransport().flush();
1182
      }
1183
 
1184
    }
1185
 
68 ashish 1186
    private class createTransaction implements ProcessFunction {
1187
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1188
      {
1189
        createTransaction_args args = new createTransaction_args();
1190
        args.read(iprot);
1191
        iprot.readMessageEnd();
1192
        createTransaction_result result = new createTransaction_result();
1193
        try {
132 ashish 1194
          result.success = iface_.createTransaction(args.transaction);
1195
          result.setSuccessIsSet(true);
68 ashish 1196
        } catch (TransactionServiceException ex) {
1197
          result.ex = ex;
1198
        } catch (Throwable th) {
1199
          LOGGER.error("Internal error processing createTransaction", th);
1200
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1201
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1202
          x.write(oprot);
1203
          oprot.writeMessageEnd();
1204
          oprot.getTransport().flush();
1205
          return;
1206
        }
1207
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1208
        result.write(oprot);
1209
        oprot.writeMessageEnd();
1210
        oprot.getTransport().flush();
1211
      }
1212
 
1213
    }
1214
 
1215
    private class getTransaction implements ProcessFunction {
1216
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1217
      {
1218
        getTransaction_args args = new getTransaction_args();
1219
        args.read(iprot);
1220
        iprot.readMessageEnd();
1221
        getTransaction_result result = new getTransaction_result();
1222
        try {
1223
          result.success = iface_.getTransaction(args.id);
1224
        } catch (TransactionServiceException ex) {
1225
          result.ex = ex;
1226
        } catch (Throwable th) {
1227
          LOGGER.error("Internal error processing getTransaction", th);
1228
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1229
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1230
          x.write(oprot);
1231
          oprot.writeMessageEnd();
1232
          oprot.getTransport().flush();
1233
          return;
1234
        }
1235
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1236
        result.write(oprot);
1237
        oprot.writeMessageEnd();
1238
        oprot.getTransport().flush();
1239
      }
1240
 
1241
    }
1242
 
1243
    private class getTransactionsForCustomer implements ProcessFunction {
1244
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1245
      {
1246
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1247
        args.read(iprot);
1248
        iprot.readMessageEnd();
1249
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1250
        try {
132 ashish 1251
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1252
        } catch (TransactionServiceException ex) {
1253
          result.ex = ex;
1254
        } catch (Throwable th) {
1255
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1256
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1257
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1258
          x.write(oprot);
1259
          oprot.writeMessageEnd();
1260
          oprot.getTransport().flush();
1261
          return;
1262
        }
1263
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1264
        result.write(oprot);
1265
        oprot.writeMessageEnd();
1266
        oprot.getTransport().flush();
1267
      }
1268
 
1269
    }
1270
 
132 ashish 1271
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1272
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1273
      {
1274
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1275
        args.read(iprot);
1276
        iprot.readMessageEnd();
1277
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1278
        try {
1279
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1280
        } catch (TransactionServiceException ex) {
1281
          result.ex = ex;
1282
        } catch (Throwable th) {
1283
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1284
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1285
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1286
          x.write(oprot);
1287
          oprot.writeMessageEnd();
1288
          oprot.getTransport().flush();
1289
          return;
1290
        }
1291
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1292
        result.write(oprot);
1293
        oprot.writeMessageEnd();
1294
        oprot.getTransport().flush();
1295
      }
1296
 
1297
    }
1298
 
68 ashish 1299
    private class getTransactionStatus implements ProcessFunction {
1300
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1301
      {
1302
        getTransactionStatus_args args = new getTransactionStatus_args();
1303
        args.read(iprot);
1304
        iprot.readMessageEnd();
1305
        getTransactionStatus_result result = new getTransactionStatus_result();
1306
        try {
1307
          result.success = iface_.getTransactionStatus(args.transactionId);
1308
        } catch (TransactionServiceException ex) {
1309
          result.ex = ex;
1310
        } catch (Throwable th) {
1311
          LOGGER.error("Internal error processing getTransactionStatus", th);
1312
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1313
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1314
          x.write(oprot);
1315
          oprot.writeMessageEnd();
1316
          oprot.getTransport().flush();
1317
          return;
1318
        }
1319
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1320
        result.write(oprot);
1321
        oprot.writeMessageEnd();
1322
        oprot.getTransport().flush();
1323
      }
1324
 
1325
    }
1326
 
1327
    private class changeTransactionStatus implements ProcessFunction {
1328
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1329
      {
1330
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1331
        args.read(iprot);
1332
        iprot.readMessageEnd();
1333
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1334
        try {
1335
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1336
          result.setSuccessIsSet(true);
1337
        } catch (TransactionServiceException ex) {
1338
          result.ex = ex;
1339
        } catch (Throwable th) {
1340
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1341
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1342
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1343
          x.write(oprot);
1344
          oprot.writeMessageEnd();
1345
          oprot.getTransport().flush();
1346
          return;
1347
        }
1348
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1349
        result.write(oprot);
1350
        oprot.writeMessageEnd();
1351
        oprot.getTransport().flush();
1352
      }
1353
 
1354
    }
1355
 
483 rajveer 1356
    private class getAllOrders implements ProcessFunction {
68 ashish 1357
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1358
      {
483 rajveer 1359
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1360
        args.read(iprot);
1361
        iprot.readMessageEnd();
483 rajveer 1362
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1363
        try {
483 rajveer 1364
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1365
        } catch (TransactionServiceException ex) {
1366
          result.ex = ex;
1367
        } catch (Throwable th) {
483 rajveer 1368
          LOGGER.error("Internal error processing getAllOrders", th);
1369
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1370
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1371
          x.write(oprot);
1372
          oprot.writeMessageEnd();
1373
          oprot.getTransport().flush();
1374
          return;
1375
        }
483 rajveer 1376
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1377
        result.write(oprot);
1378
        oprot.writeMessageEnd();
1379
        oprot.getTransport().flush();
1380
      }
1381
 
1382
    }
1383
 
1022 varun.gupt 1384
    private class getOrdersByBillingDate implements ProcessFunction {
1385
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1386
      {
1387
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1388
        args.read(iprot);
1389
        iprot.readMessageEnd();
1390
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1391
        try {
1392
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1393
        } catch (TransactionServiceException ex) {
1394
          result.ex = ex;
1395
        } catch (Throwable th) {
1396
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1397
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1398
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1399
          x.write(oprot);
1400
          oprot.writeMessageEnd();
1401
          oprot.getTransport().flush();
1402
          return;
1403
        }
1404
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1405
        result.write(oprot);
1406
        oprot.writeMessageEnd();
1407
        oprot.getTransport().flush();
1408
      }
1409
 
1410
    }
1411
 
483 rajveer 1412
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1413
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1414
      {
483 rajveer 1415
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1416
        args.read(iprot);
1417
        iprot.readMessageEnd();
483 rajveer 1418
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1419
        try {
483 rajveer 1420
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1421
          result.setSuccessIsSet(true);
1422
        } catch (TransactionServiceException ex) {
1423
          result.ex = ex;
1424
        } catch (Throwable th) {
483 rajveer 1425
          LOGGER.error("Internal error processing changeOrderStatus", th);
1426
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1427
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1428
          x.write(oprot);
1429
          oprot.writeMessageEnd();
1430
          oprot.getTransport().flush();
1431
          return;
1432
        }
483 rajveer 1433
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1434
        result.write(oprot);
1435
        oprot.writeMessageEnd();
1436
        oprot.getTransport().flush();
1437
      }
1438
 
1439
    }
1440
 
495 rajveer 1441
    private class addBillingDetails implements ProcessFunction {
1442
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1443
      {
1444
        addBillingDetails_args args = new addBillingDetails_args();
1445
        args.read(iprot);
1446
        iprot.readMessageEnd();
1447
        addBillingDetails_result result = new addBillingDetails_result();
1448
        try {
1148 chandransh 1449
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1450
          result.setSuccessIsSet(true);
1451
        } catch (TransactionServiceException ex) {
1452
          result.ex = ex;
1453
        } catch (Throwable th) {
1454
          LOGGER.error("Internal error processing addBillingDetails", th);
1455
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1456
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1457
          x.write(oprot);
1458
          oprot.writeMessageEnd();
1459
          oprot.getTransport().flush();
1460
          return;
1461
        }
1462
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1463
        result.write(oprot);
1464
        oprot.writeMessageEnd();
1465
        oprot.getTransport().flush();
1466
      }
1467
 
1468
    }
1469
 
1148 chandransh 1470
    private class addJacketNumber implements ProcessFunction {
1471
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1472
      {
1473
        addJacketNumber_args args = new addJacketNumber_args();
1474
        args.read(iprot);
1475
        iprot.readMessageEnd();
1476
        addJacketNumber_result result = new addJacketNumber_result();
1477
        try {
1478
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1479
          result.setSuccessIsSet(true);
1480
        } catch (TransactionServiceException ex) {
1481
          result.ex = ex;
1482
        } catch (Throwable th) {
1483
          LOGGER.error("Internal error processing addJacketNumber", th);
1484
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1485
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1486
          x.write(oprot);
1487
          oprot.writeMessageEnd();
1488
          oprot.getTransport().flush();
1489
          return;
1490
        }
1491
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1492
        result.write(oprot);
1493
        oprot.writeMessageEnd();
1494
        oprot.getTransport().flush();
1495
      }
1496
 
1497
    }
1498
 
923 rajveer 1499
    private class acceptOrder implements ProcessFunction {
1500
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1501
      {
1502
        acceptOrder_args args = new acceptOrder_args();
1503
        args.read(iprot);
1504
        iprot.readMessageEnd();
1505
        acceptOrder_result result = new acceptOrder_result();
1506
        try {
1507
          result.success = iface_.acceptOrder(args.orderId);
1508
          result.setSuccessIsSet(true);
1509
        } catch (TransactionServiceException ex) {
1510
          result.ex = ex;
1511
        } catch (Throwable th) {
1512
          LOGGER.error("Internal error processing acceptOrder", th);
1513
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1514
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1515
          x.write(oprot);
1516
          oprot.writeMessageEnd();
1517
          oprot.getTransport().flush();
1518
          return;
1519
        }
1520
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1521
        result.write(oprot);
1522
        oprot.writeMessageEnd();
1523
        oprot.getTransport().flush();
1524
      }
1525
 
1526
    }
1527
 
1528
    private class billOrder implements ProcessFunction {
1529
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1530
      {
1531
        billOrder_args args = new billOrder_args();
1532
        args.read(iprot);
1533
        iprot.readMessageEnd();
1534
        billOrder_result result = new billOrder_result();
1535
        try {
1536
          result.success = iface_.billOrder(args.orderId);
1537
          result.setSuccessIsSet(true);
1538
        } catch (TransactionServiceException ex) {
1539
          result.ex = ex;
1540
        } catch (Throwable th) {
1541
          LOGGER.error("Internal error processing billOrder", th);
1542
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1543
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1544
          x.write(oprot);
1545
          oprot.writeMessageEnd();
1546
          oprot.getTransport().flush();
1547
          return;
1548
        }
1549
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1550
        result.write(oprot);
1551
        oprot.writeMessageEnd();
1552
        oprot.getTransport().flush();
1553
      }
1554
 
1555
    }
1556
 
483 rajveer 1557
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1558
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1559
      {
483 rajveer 1560
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1561
        args.read(iprot);
1562
        iprot.readMessageEnd();
483 rajveer 1563
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1564
        try {
483 rajveer 1565
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1566
        } catch (TransactionServiceException ex) {
1567
          result.ex = ex;
1568
        } catch (Throwable th) {
483 rajveer 1569
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1570
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1571
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1572
          x.write(oprot);
1573
          oprot.writeMessageEnd();
1574
          oprot.getTransport().flush();
1575
          return;
1576
        }
483 rajveer 1577
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1578
        result.write(oprot);
1579
        oprot.writeMessageEnd();
1580
        oprot.getTransport().flush();
1581
      }
1582
 
1583
    }
1584
 
483 rajveer 1585
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1586
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1587
      {
483 rajveer 1588
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1589
        args.read(iprot);
1590
        iprot.readMessageEnd();
483 rajveer 1591
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1592
        try {
483 rajveer 1593
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1594
        } catch (TransactionServiceException ex) {
1595
          result.ex = ex;
1596
        } catch (Throwable th) {
483 rajveer 1597
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1598
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1599
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1600
          x.write(oprot);
1601
          oprot.writeMessageEnd();
1602
          oprot.getTransport().flush();
1603
          return;
1604
        }
483 rajveer 1605
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1606
        result.write(oprot);
1607
        oprot.writeMessageEnd();
1608
        oprot.getTransport().flush();
1609
      }
1610
 
1611
    }
1612
 
483 rajveer 1613
    private class createOrder implements ProcessFunction {
68 ashish 1614
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1615
      {
483 rajveer 1616
        createOrder_args args = new createOrder_args();
68 ashish 1617
        args.read(iprot);
1618
        iprot.readMessageEnd();
483 rajveer 1619
        createOrder_result result = new createOrder_result();
68 ashish 1620
        try {
483 rajveer 1621
          result.success = iface_.createOrder(args.order);
68 ashish 1622
          result.setSuccessIsSet(true);
1623
        } catch (TransactionServiceException ex) {
1624
          result.ex = ex;
1625
        } catch (Throwable th) {
483 rajveer 1626
          LOGGER.error("Internal error processing createOrder", th);
1627
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1628
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1629
          x.write(oprot);
1630
          oprot.writeMessageEnd();
1631
          oprot.getTransport().flush();
1632
          return;
1633
        }
483 rajveer 1634
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1635
        result.write(oprot);
1636
        oprot.writeMessageEnd();
1637
        oprot.getTransport().flush();
1638
      }
1639
 
1640
    }
1641
 
483 rajveer 1642
    private class getOrder implements ProcessFunction {
68 ashish 1643
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1644
      {
483 rajveer 1645
        getOrder_args args = new getOrder_args();
68 ashish 1646
        args.read(iprot);
1647
        iprot.readMessageEnd();
483 rajveer 1648
        getOrder_result result = new getOrder_result();
68 ashish 1649
        try {
483 rajveer 1650
          result.success = iface_.getOrder(args.id);
68 ashish 1651
        } catch (TransactionServiceException ex) {
1652
          result.ex = ex;
1653
        } catch (Throwable th) {
483 rajveer 1654
          LOGGER.error("Internal error processing getOrder", th);
1655
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1656
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1657
          x.write(oprot);
1658
          oprot.writeMessageEnd();
1659
          oprot.getTransport().flush();
1660
          return;
1661
        }
483 rajveer 1662
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1663
        result.write(oprot);
1664
        oprot.writeMessageEnd();
1665
        oprot.getTransport().flush();
1666
      }
1667
 
1668
    }
1669
 
483 rajveer 1670
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1671
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1672
      {
483 rajveer 1673
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1674
        args.read(iprot);
1675
        iprot.readMessageEnd();
483 rajveer 1676
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1677
        try {
483 rajveer 1678
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1679
        } catch (TransactionServiceException ex) {
1680
          result.ex = ex;
1681
        } catch (Throwable th) {
483 rajveer 1682
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1683
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1684
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1685
          x.write(oprot);
1686
          oprot.writeMessageEnd();
1687
          oprot.getTransport().flush();
1688
          return;
1689
        }
483 rajveer 1690
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1691
        result.write(oprot);
1692
        oprot.writeMessageEnd();
1693
        oprot.getTransport().flush();
1694
      }
1695
 
1696
    }
1697
 
1209 chandransh 1698
    private class markOrderAsOutOfStock implements ProcessFunction {
1699
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1700
      {
1701
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1702
        args.read(iprot);
1703
        iprot.readMessageEnd();
1704
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1705
        try {
1706
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
1707
          result.setSuccessIsSet(true);
1708
        } catch (TransactionServiceException ex) {
1709
          result.ex = ex;
1710
        } catch (Throwable th) {
1711
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
1712
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
1713
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
1714
          x.write(oprot);
1715
          oprot.writeMessageEnd();
1716
          oprot.getTransport().flush();
1717
          return;
1718
        }
1719
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
1720
        result.write(oprot);
1721
        oprot.writeMessageEnd();
1722
        oprot.getTransport().flush();
1723
      }
1724
 
1725
    }
1726
 
758 chandransh 1727
    private class markOrdersAsManifested implements ProcessFunction {
1728
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1729
      {
1730
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1731
        args.read(iprot);
1732
        iprot.readMessageEnd();
1733
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1734
        try {
1735
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1736
          result.setSuccessIsSet(true);
1737
        } catch (TransactionServiceException ex) {
1738
          result.ex = ex;
1739
        } catch (Throwable th) {
1740
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1741
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1742
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1743
          x.write(oprot);
1744
          oprot.writeMessageEnd();
1745
          oprot.getTransport().flush();
1746
          return;
1747
        }
1748
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1749
        result.write(oprot);
1750
        oprot.writeMessageEnd();
1751
        oprot.getTransport().flush();
1752
      }
1753
 
1754
    }
1755
 
1114 chandransh 1756
    private class markOrdersAsPickedUp implements ProcessFunction {
1757
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1758
      {
1759
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1760
        args.read(iprot);
1761
        iprot.readMessageEnd();
1762
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1763
        try {
1764
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
1765
        } catch (TransactionServiceException ex) {
1766
          result.ex = ex;
1767
        } catch (Throwable th) {
1768
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
1769
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
1770
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
1771
          x.write(oprot);
1772
          oprot.writeMessageEnd();
1773
          oprot.getTransport().flush();
1774
          return;
1775
        }
1776
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
1777
        result.write(oprot);
1778
        oprot.writeMessageEnd();
1779
        oprot.getTransport().flush();
1780
      }
1781
 
1782
    }
1783
 
1133 chandransh 1784
    private class markOrdersAsDelivered implements ProcessFunction {
1785
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1786
      {
1787
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1788
        args.read(iprot);
1789
        iprot.readMessageEnd();
1790
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1791
        try {
1792
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
1793
        } catch (TransactionServiceException ex) {
1794
          result.ex = ex;
1795
        } catch (Throwable th) {
1796
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
1797
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
1798
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
1799
          x.write(oprot);
1800
          oprot.writeMessageEnd();
1801
          oprot.getTransport().flush();
1802
          return;
1803
        }
1804
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
1805
        result.write(oprot);
1806
        oprot.writeMessageEnd();
1807
        oprot.getTransport().flush();
1808
      }
1809
 
1810
    }
1811
 
1812
    private class markOrdersAsFailed implements ProcessFunction {
1813
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1814
      {
1815
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1816
        args.read(iprot);
1817
        iprot.readMessageEnd();
1818
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1819
        try {
1820
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
1821
        } catch (TransactionServiceException ex) {
1822
          result.ex = ex;
1823
        } catch (Throwable th) {
1824
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
1825
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
1826
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
1827
          x.write(oprot);
1828
          oprot.writeMessageEnd();
1829
          oprot.getTransport().flush();
1830
          return;
1831
        }
1832
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
1833
        result.write(oprot);
1834
        oprot.writeMessageEnd();
1835
        oprot.getTransport().flush();
1836
      }
1837
 
1838
    }
1839
 
305 ashish 1840
    private class getAlerts implements ProcessFunction {
1841
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1842
      {
1843
        getAlerts_args args = new getAlerts_args();
1844
        args.read(iprot);
1845
        iprot.readMessageEnd();
1846
        getAlerts_result result = new getAlerts_result();
483 rajveer 1847
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1848
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1849
        result.write(oprot);
1850
        oprot.writeMessageEnd();
1851
        oprot.getTransport().flush();
1852
      }
1853
 
1854
    }
1855
 
1856
    private class setAlert implements ProcessFunction {
1857
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1858
      {
1859
        setAlert_args args = new setAlert_args();
1860
        args.read(iprot);
1861
        iprot.readMessageEnd();
1862
        setAlert_result result = new setAlert_result();
483 rajveer 1863
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 1864
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1865
        result.write(oprot);
1866
        oprot.writeMessageEnd();
1867
        oprot.getTransport().flush();
1868
      }
1869
 
1870
    }
1871
 
68 ashish 1872
  }
1873
 
764 rajveer 1874
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1875
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1876
 
1877
 
1878
 
1879
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1880
    public enum _Fields implements TFieldIdEnum {
1881
;
1882
 
1883
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1884
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1885
 
1886
      static {
1887
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1888
          byId.put((int)field._thriftId, field);
1889
          byName.put(field.getFieldName(), field);
1890
        }
1891
      }
1892
 
1893
      /**
1894
       * Find the _Fields constant that matches fieldId, or null if its not found.
1895
       */
1896
      public static _Fields findByThriftId(int fieldId) {
1897
        return byId.get(fieldId);
1898
      }
1899
 
1900
      /**
1901
       * Find the _Fields constant that matches fieldId, throwing an exception
1902
       * if it is not found.
1903
       */
1904
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1905
        _Fields fields = findByThriftId(fieldId);
1906
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1907
        return fields;
1908
      }
1909
 
1910
      /**
1911
       * Find the _Fields constant that matches name, or null if its not found.
1912
       */
1913
      public static _Fields findByName(String name) {
1914
        return byName.get(name);
1915
      }
1916
 
1917
      private final short _thriftId;
1918
      private final String _fieldName;
1919
 
1920
      _Fields(short thriftId, String fieldName) {
1921
        _thriftId = thriftId;
1922
        _fieldName = fieldName;
1923
      }
1924
 
1925
      public short getThriftFieldId() {
1926
        return _thriftId;
1927
      }
1928
 
1929
      public String getFieldName() {
1930
        return _fieldName;
1931
      }
1932
    }
1933
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1934
    }});
1935
 
1936
    static {
1937
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1938
    }
1939
 
1940
    public closeSession_args() {
1941
    }
1942
 
1943
    /**
1944
     * Performs a deep copy on <i>other</i>.
1945
     */
1946
    public closeSession_args(closeSession_args other) {
1947
    }
1948
 
1949
    public closeSession_args deepCopy() {
1950
      return new closeSession_args(this);
1951
    }
1952
 
1953
    @Deprecated
1954
    public closeSession_args clone() {
1955
      return new closeSession_args(this);
1956
    }
1957
 
1958
    public void setFieldValue(_Fields field, Object value) {
1959
      switch (field) {
1960
      }
1961
    }
1962
 
1963
    public void setFieldValue(int fieldID, Object value) {
1964
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1965
    }
1966
 
1967
    public Object getFieldValue(_Fields field) {
1968
      switch (field) {
1969
      }
1970
      throw new IllegalStateException();
1971
    }
1972
 
1973
    public Object getFieldValue(int fieldId) {
1974
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1975
    }
1976
 
1977
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1978
    public boolean isSet(_Fields field) {
1979
      switch (field) {
1980
      }
1981
      throw new IllegalStateException();
1982
    }
1983
 
1984
    public boolean isSet(int fieldID) {
1985
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1986
    }
1987
 
1988
    @Override
1989
    public boolean equals(Object that) {
1990
      if (that == null)
1991
        return false;
1992
      if (that instanceof closeSession_args)
1993
        return this.equals((closeSession_args)that);
1994
      return false;
1995
    }
1996
 
1997
    public boolean equals(closeSession_args that) {
1998
      if (that == null)
1999
        return false;
2000
 
2001
      return true;
2002
    }
2003
 
2004
    @Override
2005
    public int hashCode() {
2006
      return 0;
2007
    }
2008
 
2009
    public int compareTo(closeSession_args other) {
2010
      if (!getClass().equals(other.getClass())) {
2011
        return getClass().getName().compareTo(other.getClass().getName());
2012
      }
2013
 
2014
      int lastComparison = 0;
2015
      closeSession_args typedOther = (closeSession_args)other;
2016
 
2017
      return 0;
2018
    }
2019
 
2020
    public void read(TProtocol iprot) throws TException {
2021
      TField field;
2022
      iprot.readStructBegin();
2023
      while (true)
2024
      {
2025
        field = iprot.readFieldBegin();
2026
        if (field.type == TType.STOP) { 
2027
          break;
2028
        }
2029
        _Fields fieldId = _Fields.findByThriftId(field.id);
2030
        if (fieldId == null) {
2031
          TProtocolUtil.skip(iprot, field.type);
2032
        } else {
2033
          switch (fieldId) {
2034
          }
2035
          iprot.readFieldEnd();
2036
        }
2037
      }
2038
      iprot.readStructEnd();
2039
      validate();
2040
    }
2041
 
2042
    public void write(TProtocol oprot) throws TException {
2043
      validate();
2044
 
2045
      oprot.writeStructBegin(STRUCT_DESC);
2046
      oprot.writeFieldStop();
2047
      oprot.writeStructEnd();
2048
    }
2049
 
2050
    @Override
2051
    public String toString() {
2052
      StringBuilder sb = new StringBuilder("closeSession_args(");
2053
      boolean first = true;
2054
 
2055
      sb.append(")");
2056
      return sb.toString();
2057
    }
2058
 
2059
    public void validate() throws TException {
2060
      // check for required fields
2061
    }
2062
 
2063
  }
2064
 
2065
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2066
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2067
 
2068
 
2069
 
2070
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2071
    public enum _Fields implements TFieldIdEnum {
2072
;
2073
 
2074
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2075
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2076
 
2077
      static {
2078
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2079
          byId.put((int)field._thriftId, field);
2080
          byName.put(field.getFieldName(), field);
2081
        }
2082
      }
2083
 
2084
      /**
2085
       * Find the _Fields constant that matches fieldId, or null if its not found.
2086
       */
2087
      public static _Fields findByThriftId(int fieldId) {
2088
        return byId.get(fieldId);
2089
      }
2090
 
2091
      /**
2092
       * Find the _Fields constant that matches fieldId, throwing an exception
2093
       * if it is not found.
2094
       */
2095
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2096
        _Fields fields = findByThriftId(fieldId);
2097
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2098
        return fields;
2099
      }
2100
 
2101
      /**
2102
       * Find the _Fields constant that matches name, or null if its not found.
2103
       */
2104
      public static _Fields findByName(String name) {
2105
        return byName.get(name);
2106
      }
2107
 
2108
      private final short _thriftId;
2109
      private final String _fieldName;
2110
 
2111
      _Fields(short thriftId, String fieldName) {
2112
        _thriftId = thriftId;
2113
        _fieldName = fieldName;
2114
      }
2115
 
2116
      public short getThriftFieldId() {
2117
        return _thriftId;
2118
      }
2119
 
2120
      public String getFieldName() {
2121
        return _fieldName;
2122
      }
2123
    }
2124
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2125
    }});
2126
 
2127
    static {
2128
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2129
    }
2130
 
2131
    public closeSession_result() {
2132
    }
2133
 
2134
    /**
2135
     * Performs a deep copy on <i>other</i>.
2136
     */
2137
    public closeSession_result(closeSession_result other) {
2138
    }
2139
 
2140
    public closeSession_result deepCopy() {
2141
      return new closeSession_result(this);
2142
    }
2143
 
2144
    @Deprecated
2145
    public closeSession_result clone() {
2146
      return new closeSession_result(this);
2147
    }
2148
 
2149
    public void setFieldValue(_Fields field, Object value) {
2150
      switch (field) {
2151
      }
2152
    }
2153
 
2154
    public void setFieldValue(int fieldID, Object value) {
2155
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2156
    }
2157
 
2158
    public Object getFieldValue(_Fields field) {
2159
      switch (field) {
2160
      }
2161
      throw new IllegalStateException();
2162
    }
2163
 
2164
    public Object getFieldValue(int fieldId) {
2165
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2166
    }
2167
 
2168
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2169
    public boolean isSet(_Fields field) {
2170
      switch (field) {
2171
      }
2172
      throw new IllegalStateException();
2173
    }
2174
 
2175
    public boolean isSet(int fieldID) {
2176
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2177
    }
2178
 
2179
    @Override
2180
    public boolean equals(Object that) {
2181
      if (that == null)
2182
        return false;
2183
      if (that instanceof closeSession_result)
2184
        return this.equals((closeSession_result)that);
2185
      return false;
2186
    }
2187
 
2188
    public boolean equals(closeSession_result that) {
2189
      if (that == null)
2190
        return false;
2191
 
2192
      return true;
2193
    }
2194
 
2195
    @Override
2196
    public int hashCode() {
2197
      return 0;
2198
    }
2199
 
2200
    public int compareTo(closeSession_result other) {
2201
      if (!getClass().equals(other.getClass())) {
2202
        return getClass().getName().compareTo(other.getClass().getName());
2203
      }
2204
 
2205
      int lastComparison = 0;
2206
      closeSession_result typedOther = (closeSession_result)other;
2207
 
2208
      return 0;
2209
    }
2210
 
2211
    public void read(TProtocol iprot) throws TException {
2212
      TField field;
2213
      iprot.readStructBegin();
2214
      while (true)
2215
      {
2216
        field = iprot.readFieldBegin();
2217
        if (field.type == TType.STOP) { 
2218
          break;
2219
        }
2220
        _Fields fieldId = _Fields.findByThriftId(field.id);
2221
        if (fieldId == null) {
2222
          TProtocolUtil.skip(iprot, field.type);
2223
        } else {
2224
          switch (fieldId) {
2225
          }
2226
          iprot.readFieldEnd();
2227
        }
2228
      }
2229
      iprot.readStructEnd();
2230
      validate();
2231
    }
2232
 
2233
    public void write(TProtocol oprot) throws TException {
2234
      oprot.writeStructBegin(STRUCT_DESC);
2235
 
2236
      oprot.writeFieldStop();
2237
      oprot.writeStructEnd();
2238
    }
2239
 
2240
    @Override
2241
    public String toString() {
2242
      StringBuilder sb = new StringBuilder("closeSession_result(");
2243
      boolean first = true;
2244
 
2245
      sb.append(")");
2246
      return sb.toString();
2247
    }
2248
 
2249
    public void validate() throws TException {
2250
      // check for required fields
2251
    }
2252
 
2253
  }
2254
 
684 chandransh 2255
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2256
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2257
 
2258
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2259
 
2260
    private Transaction transaction;
2261
 
2262
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2263
    public enum _Fields implements TFieldIdEnum {
2264
      TRANSACTION((short)1, "transaction");
2265
 
2266
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2267
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2268
 
2269
      static {
2270
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2271
          byId.put((int)field._thriftId, field);
2272
          byName.put(field.getFieldName(), field);
2273
        }
2274
      }
2275
 
2276
      /**
2277
       * Find the _Fields constant that matches fieldId, or null if its not found.
2278
       */
2279
      public static _Fields findByThriftId(int fieldId) {
2280
        return byId.get(fieldId);
2281
      }
2282
 
2283
      /**
2284
       * Find the _Fields constant that matches fieldId, throwing an exception
2285
       * if it is not found.
2286
       */
2287
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2288
        _Fields fields = findByThriftId(fieldId);
2289
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2290
        return fields;
2291
      }
2292
 
2293
      /**
2294
       * Find the _Fields constant that matches name, or null if its not found.
2295
       */
2296
      public static _Fields findByName(String name) {
2297
        return byName.get(name);
2298
      }
2299
 
2300
      private final short _thriftId;
2301
      private final String _fieldName;
2302
 
2303
      _Fields(short thriftId, String fieldName) {
2304
        _thriftId = thriftId;
2305
        _fieldName = fieldName;
2306
      }
2307
 
2308
      public short getThriftFieldId() {
2309
        return _thriftId;
2310
      }
2311
 
2312
      public String getFieldName() {
2313
        return _fieldName;
2314
      }
2315
    }
2316
 
2317
    // isset id assignments
2318
 
2319
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2320
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2321
          new StructMetaData(TType.STRUCT, Transaction.class)));
2322
    }});
2323
 
2324
    static {
2325
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2326
    }
2327
 
2328
    public createTransaction_args() {
2329
    }
2330
 
2331
    public createTransaction_args(
2332
      Transaction transaction)
2333
    {
2334
      this();
2335
      this.transaction = transaction;
2336
    }
2337
 
2338
    /**
2339
     * Performs a deep copy on <i>other</i>.
2340
     */
2341
    public createTransaction_args(createTransaction_args other) {
2342
      if (other.isSetTransaction()) {
2343
        this.transaction = new Transaction(other.transaction);
2344
      }
2345
    }
2346
 
2347
    public createTransaction_args deepCopy() {
2348
      return new createTransaction_args(this);
2349
    }
2350
 
2351
    @Deprecated
2352
    public createTransaction_args clone() {
2353
      return new createTransaction_args(this);
2354
    }
2355
 
2356
    public Transaction getTransaction() {
2357
      return this.transaction;
2358
    }
2359
 
2360
    public createTransaction_args setTransaction(Transaction transaction) {
2361
      this.transaction = transaction;
2362
      return this;
2363
    }
2364
 
2365
    public void unsetTransaction() {
2366
      this.transaction = null;
2367
    }
2368
 
2369
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2370
    public boolean isSetTransaction() {
2371
      return this.transaction != null;
2372
    }
2373
 
2374
    public void setTransactionIsSet(boolean value) {
2375
      if (!value) {
2376
        this.transaction = null;
2377
      }
2378
    }
2379
 
2380
    public void setFieldValue(_Fields field, Object value) {
2381
      switch (field) {
2382
      case TRANSACTION:
2383
        if (value == null) {
2384
          unsetTransaction();
2385
        } else {
2386
          setTransaction((Transaction)value);
2387
        }
2388
        break;
2389
 
2390
      }
2391
    }
2392
 
2393
    public void setFieldValue(int fieldID, Object value) {
2394
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2395
    }
2396
 
2397
    public Object getFieldValue(_Fields field) {
2398
      switch (field) {
2399
      case TRANSACTION:
2400
        return getTransaction();
2401
 
2402
      }
2403
      throw new IllegalStateException();
2404
    }
2405
 
2406
    public Object getFieldValue(int fieldId) {
2407
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2408
    }
2409
 
2410
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2411
    public boolean isSet(_Fields field) {
2412
      switch (field) {
2413
      case TRANSACTION:
2414
        return isSetTransaction();
2415
      }
2416
      throw new IllegalStateException();
2417
    }
2418
 
2419
    public boolean isSet(int fieldID) {
2420
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2421
    }
2422
 
2423
    @Override
2424
    public boolean equals(Object that) {
2425
      if (that == null)
2426
        return false;
2427
      if (that instanceof createTransaction_args)
2428
        return this.equals((createTransaction_args)that);
2429
      return false;
2430
    }
2431
 
2432
    public boolean equals(createTransaction_args that) {
2433
      if (that == null)
2434
        return false;
2435
 
2436
      boolean this_present_transaction = true && this.isSetTransaction();
2437
      boolean that_present_transaction = true && that.isSetTransaction();
2438
      if (this_present_transaction || that_present_transaction) {
2439
        if (!(this_present_transaction && that_present_transaction))
2440
          return false;
2441
        if (!this.transaction.equals(that.transaction))
2442
          return false;
2443
      }
2444
 
2445
      return true;
2446
    }
2447
 
2448
    @Override
2449
    public int hashCode() {
2450
      return 0;
2451
    }
2452
 
684 chandransh 2453
    public int compareTo(createTransaction_args other) {
2454
      if (!getClass().equals(other.getClass())) {
2455
        return getClass().getName().compareTo(other.getClass().getName());
2456
      }
2457
 
2458
      int lastComparison = 0;
2459
      createTransaction_args typedOther = (createTransaction_args)other;
2460
 
2461
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2462
      if (lastComparison != 0) {
2463
        return lastComparison;
2464
      }
2465
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2466
      if (lastComparison != 0) {
2467
        return lastComparison;
2468
      }
2469
      return 0;
2470
    }
2471
 
68 ashish 2472
    public void read(TProtocol iprot) throws TException {
2473
      TField field;
2474
      iprot.readStructBegin();
2475
      while (true)
2476
      {
2477
        field = iprot.readFieldBegin();
2478
        if (field.type == TType.STOP) { 
2479
          break;
2480
        }
2481
        _Fields fieldId = _Fields.findByThriftId(field.id);
2482
        if (fieldId == null) {
2483
          TProtocolUtil.skip(iprot, field.type);
2484
        } else {
2485
          switch (fieldId) {
2486
            case TRANSACTION:
2487
              if (field.type == TType.STRUCT) {
2488
                this.transaction = new Transaction();
2489
                this.transaction.read(iprot);
2490
              } else { 
2491
                TProtocolUtil.skip(iprot, field.type);
2492
              }
2493
              break;
2494
          }
2495
          iprot.readFieldEnd();
2496
        }
2497
      }
2498
      iprot.readStructEnd();
2499
      validate();
2500
    }
2501
 
2502
    public void write(TProtocol oprot) throws TException {
2503
      validate();
2504
 
2505
      oprot.writeStructBegin(STRUCT_DESC);
2506
      if (this.transaction != null) {
2507
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2508
        this.transaction.write(oprot);
2509
        oprot.writeFieldEnd();
2510
      }
2511
      oprot.writeFieldStop();
2512
      oprot.writeStructEnd();
2513
    }
2514
 
2515
    @Override
2516
    public String toString() {
2517
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2518
      boolean first = true;
2519
 
2520
      sb.append("transaction:");
2521
      if (this.transaction == null) {
2522
        sb.append("null");
2523
      } else {
2524
        sb.append(this.transaction);
2525
      }
2526
      first = false;
2527
      sb.append(")");
2528
      return sb.toString();
2529
    }
2530
 
2531
    public void validate() throws TException {
2532
      // check for required fields
2533
    }
2534
 
2535
  }
2536
 
2537
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2538
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2539
 
132 ashish 2540
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2541
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2542
 
132 ashish 2543
    private long success;
68 ashish 2544
    private TransactionServiceException ex;
2545
 
2546
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2547
    public enum _Fields implements TFieldIdEnum {
132 ashish 2548
      SUCCESS((short)0, "success"),
68 ashish 2549
      EX((short)1, "ex");
2550
 
2551
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2552
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2553
 
2554
      static {
2555
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2556
          byId.put((int)field._thriftId, field);
2557
          byName.put(field.getFieldName(), field);
2558
        }
2559
      }
2560
 
2561
      /**
2562
       * Find the _Fields constant that matches fieldId, or null if its not found.
2563
       */
2564
      public static _Fields findByThriftId(int fieldId) {
2565
        return byId.get(fieldId);
2566
      }
2567
 
2568
      /**
2569
       * Find the _Fields constant that matches fieldId, throwing an exception
2570
       * if it is not found.
2571
       */
2572
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2573
        _Fields fields = findByThriftId(fieldId);
2574
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2575
        return fields;
2576
      }
2577
 
2578
      /**
2579
       * Find the _Fields constant that matches name, or null if its not found.
2580
       */
2581
      public static _Fields findByName(String name) {
2582
        return byName.get(name);
2583
      }
2584
 
2585
      private final short _thriftId;
2586
      private final String _fieldName;
2587
 
2588
      _Fields(short thriftId, String fieldName) {
2589
        _thriftId = thriftId;
2590
        _fieldName = fieldName;
2591
      }
2592
 
2593
      public short getThriftFieldId() {
2594
        return _thriftId;
2595
      }
2596
 
2597
      public String getFieldName() {
2598
        return _fieldName;
2599
      }
2600
    }
2601
 
2602
    // isset id assignments
132 ashish 2603
    private static final int __SUCCESS_ISSET_ID = 0;
2604
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2605
 
2606
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2607
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2608
          new FieldValueMetaData(TType.I64)));
68 ashish 2609
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2610
          new FieldValueMetaData(TType.STRUCT)));
2611
    }});
2612
 
2613
    static {
2614
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2615
    }
2616
 
2617
    public createTransaction_result() {
2618
    }
2619
 
2620
    public createTransaction_result(
132 ashish 2621
      long success,
68 ashish 2622
      TransactionServiceException ex)
2623
    {
2624
      this();
132 ashish 2625
      this.success = success;
2626
      setSuccessIsSet(true);
68 ashish 2627
      this.ex = ex;
2628
    }
2629
 
2630
    /**
2631
     * Performs a deep copy on <i>other</i>.
2632
     */
2633
    public createTransaction_result(createTransaction_result other) {
132 ashish 2634
      __isset_bit_vector.clear();
2635
      __isset_bit_vector.or(other.__isset_bit_vector);
2636
      this.success = other.success;
68 ashish 2637
      if (other.isSetEx()) {
2638
        this.ex = new TransactionServiceException(other.ex);
2639
      }
2640
    }
2641
 
2642
    public createTransaction_result deepCopy() {
2643
      return new createTransaction_result(this);
2644
    }
2645
 
2646
    @Deprecated
2647
    public createTransaction_result clone() {
2648
      return new createTransaction_result(this);
2649
    }
2650
 
132 ashish 2651
    public long getSuccess() {
2652
      return this.success;
2653
    }
2654
 
2655
    public createTransaction_result setSuccess(long success) {
2656
      this.success = success;
2657
      setSuccessIsSet(true);
2658
      return this;
2659
    }
2660
 
2661
    public void unsetSuccess() {
2662
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2663
    }
2664
 
2665
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2666
    public boolean isSetSuccess() {
2667
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2668
    }
2669
 
2670
    public void setSuccessIsSet(boolean value) {
2671
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2672
    }
2673
 
68 ashish 2674
    public TransactionServiceException getEx() {
2675
      return this.ex;
2676
    }
2677
 
2678
    public createTransaction_result setEx(TransactionServiceException ex) {
2679
      this.ex = ex;
2680
      return this;
2681
    }
2682
 
2683
    public void unsetEx() {
2684
      this.ex = null;
2685
    }
2686
 
2687
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2688
    public boolean isSetEx() {
2689
      return this.ex != null;
2690
    }
2691
 
2692
    public void setExIsSet(boolean value) {
2693
      if (!value) {
2694
        this.ex = null;
2695
      }
2696
    }
2697
 
2698
    public void setFieldValue(_Fields field, Object value) {
2699
      switch (field) {
132 ashish 2700
      case SUCCESS:
2701
        if (value == null) {
2702
          unsetSuccess();
2703
        } else {
2704
          setSuccess((Long)value);
2705
        }
2706
        break;
2707
 
68 ashish 2708
      case EX:
2709
        if (value == null) {
2710
          unsetEx();
2711
        } else {
2712
          setEx((TransactionServiceException)value);
2713
        }
2714
        break;
2715
 
2716
      }
2717
    }
2718
 
2719
    public void setFieldValue(int fieldID, Object value) {
2720
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2721
    }
2722
 
2723
    public Object getFieldValue(_Fields field) {
2724
      switch (field) {
132 ashish 2725
      case SUCCESS:
2726
        return new Long(getSuccess());
2727
 
68 ashish 2728
      case EX:
2729
        return getEx();
2730
 
2731
      }
2732
      throw new IllegalStateException();
2733
    }
2734
 
2735
    public Object getFieldValue(int fieldId) {
2736
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2737
    }
2738
 
2739
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2740
    public boolean isSet(_Fields field) {
2741
      switch (field) {
132 ashish 2742
      case SUCCESS:
2743
        return isSetSuccess();
68 ashish 2744
      case EX:
2745
        return isSetEx();
2746
      }
2747
      throw new IllegalStateException();
2748
    }
2749
 
2750
    public boolean isSet(int fieldID) {
2751
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2752
    }
2753
 
2754
    @Override
2755
    public boolean equals(Object that) {
2756
      if (that == null)
2757
        return false;
2758
      if (that instanceof createTransaction_result)
2759
        return this.equals((createTransaction_result)that);
2760
      return false;
2761
    }
2762
 
2763
    public boolean equals(createTransaction_result that) {
2764
      if (that == null)
2765
        return false;
2766
 
132 ashish 2767
      boolean this_present_success = true;
2768
      boolean that_present_success = true;
2769
      if (this_present_success || that_present_success) {
2770
        if (!(this_present_success && that_present_success))
2771
          return false;
2772
        if (this.success != that.success)
2773
          return false;
2774
      }
2775
 
68 ashish 2776
      boolean this_present_ex = true && this.isSetEx();
2777
      boolean that_present_ex = true && that.isSetEx();
2778
      if (this_present_ex || that_present_ex) {
2779
        if (!(this_present_ex && that_present_ex))
2780
          return false;
2781
        if (!this.ex.equals(that.ex))
2782
          return false;
2783
      }
2784
 
2785
      return true;
2786
    }
2787
 
2788
    @Override
2789
    public int hashCode() {
2790
      return 0;
2791
    }
2792
 
2793
    public int compareTo(createTransaction_result other) {
2794
      if (!getClass().equals(other.getClass())) {
2795
        return getClass().getName().compareTo(other.getClass().getName());
2796
      }
2797
 
2798
      int lastComparison = 0;
2799
      createTransaction_result typedOther = (createTransaction_result)other;
2800
 
132 ashish 2801
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2802
      if (lastComparison != 0) {
2803
        return lastComparison;
2804
      }
2805
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2806
      if (lastComparison != 0) {
2807
        return lastComparison;
2808
      }
68 ashish 2809
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2810
      if (lastComparison != 0) {
2811
        return lastComparison;
2812
      }
2813
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2814
      if (lastComparison != 0) {
2815
        return lastComparison;
2816
      }
2817
      return 0;
2818
    }
2819
 
2820
    public void read(TProtocol iprot) throws TException {
2821
      TField field;
2822
      iprot.readStructBegin();
2823
      while (true)
2824
      {
2825
        field = iprot.readFieldBegin();
2826
        if (field.type == TType.STOP) { 
2827
          break;
2828
        }
2829
        _Fields fieldId = _Fields.findByThriftId(field.id);
2830
        if (fieldId == null) {
2831
          TProtocolUtil.skip(iprot, field.type);
2832
        } else {
2833
          switch (fieldId) {
132 ashish 2834
            case SUCCESS:
2835
              if (field.type == TType.I64) {
2836
                this.success = iprot.readI64();
2837
                setSuccessIsSet(true);
2838
              } else { 
2839
                TProtocolUtil.skip(iprot, field.type);
2840
              }
2841
              break;
68 ashish 2842
            case EX:
2843
              if (field.type == TType.STRUCT) {
2844
                this.ex = new TransactionServiceException();
2845
                this.ex.read(iprot);
2846
              } else { 
2847
                TProtocolUtil.skip(iprot, field.type);
2848
              }
2849
              break;
2850
          }
2851
          iprot.readFieldEnd();
2852
        }
2853
      }
2854
      iprot.readStructEnd();
2855
      validate();
2856
    }
2857
 
2858
    public void write(TProtocol oprot) throws TException {
2859
      oprot.writeStructBegin(STRUCT_DESC);
2860
 
132 ashish 2861
      if (this.isSetSuccess()) {
2862
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2863
        oprot.writeI64(this.success);
2864
        oprot.writeFieldEnd();
2865
      } else if (this.isSetEx()) {
68 ashish 2866
        oprot.writeFieldBegin(EX_FIELD_DESC);
2867
        this.ex.write(oprot);
2868
        oprot.writeFieldEnd();
2869
      }
2870
      oprot.writeFieldStop();
2871
      oprot.writeStructEnd();
2872
    }
2873
 
2874
    @Override
2875
    public String toString() {
2876
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2877
      boolean first = true;
2878
 
132 ashish 2879
      sb.append("success:");
2880
      sb.append(this.success);
2881
      first = false;
2882
      if (!first) sb.append(", ");
68 ashish 2883
      sb.append("ex:");
2884
      if (this.ex == null) {
2885
        sb.append("null");
2886
      } else {
2887
        sb.append(this.ex);
2888
      }
2889
      first = false;
2890
      sb.append(")");
2891
      return sb.toString();
2892
    }
2893
 
2894
    public void validate() throws TException {
2895
      // check for required fields
2896
    }
2897
 
2898
  }
2899
 
2900
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2901
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2902
 
2903
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2904
 
2905
    private long id;
2906
 
2907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2908
    public enum _Fields implements TFieldIdEnum {
2909
      ID((short)1, "id");
2910
 
2911
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2913
 
2914
      static {
2915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2916
          byId.put((int)field._thriftId, field);
2917
          byName.put(field.getFieldName(), field);
2918
        }
2919
      }
2920
 
2921
      /**
2922
       * Find the _Fields constant that matches fieldId, or null if its not found.
2923
       */
2924
      public static _Fields findByThriftId(int fieldId) {
2925
        return byId.get(fieldId);
2926
      }
2927
 
2928
      /**
2929
       * Find the _Fields constant that matches fieldId, throwing an exception
2930
       * if it is not found.
2931
       */
2932
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2933
        _Fields fields = findByThriftId(fieldId);
2934
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2935
        return fields;
2936
      }
2937
 
2938
      /**
2939
       * Find the _Fields constant that matches name, or null if its not found.
2940
       */
2941
      public static _Fields findByName(String name) {
2942
        return byName.get(name);
2943
      }
2944
 
2945
      private final short _thriftId;
2946
      private final String _fieldName;
2947
 
2948
      _Fields(short thriftId, String fieldName) {
2949
        _thriftId = thriftId;
2950
        _fieldName = fieldName;
2951
      }
2952
 
2953
      public short getThriftFieldId() {
2954
        return _thriftId;
2955
      }
2956
 
2957
      public String getFieldName() {
2958
        return _fieldName;
2959
      }
2960
    }
2961
 
2962
    // isset id assignments
2963
    private static final int __ID_ISSET_ID = 0;
2964
    private BitSet __isset_bit_vector = new BitSet(1);
2965
 
2966
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2967
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2968
          new FieldValueMetaData(TType.I64)));
2969
    }});
2970
 
2971
    static {
2972
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2973
    }
2974
 
2975
    public getTransaction_args() {
2976
    }
2977
 
2978
    public getTransaction_args(
2979
      long id)
2980
    {
2981
      this();
2982
      this.id = id;
2983
      setIdIsSet(true);
2984
    }
2985
 
2986
    /**
2987
     * Performs a deep copy on <i>other</i>.
2988
     */
2989
    public getTransaction_args(getTransaction_args other) {
2990
      __isset_bit_vector.clear();
2991
      __isset_bit_vector.or(other.__isset_bit_vector);
2992
      this.id = other.id;
2993
    }
2994
 
2995
    public getTransaction_args deepCopy() {
2996
      return new getTransaction_args(this);
2997
    }
2998
 
2999
    @Deprecated
3000
    public getTransaction_args clone() {
3001
      return new getTransaction_args(this);
3002
    }
3003
 
3004
    public long getId() {
3005
      return this.id;
3006
    }
3007
 
3008
    public getTransaction_args setId(long id) {
3009
      this.id = id;
3010
      setIdIsSet(true);
3011
      return this;
3012
    }
3013
 
3014
    public void unsetId() {
3015
      __isset_bit_vector.clear(__ID_ISSET_ID);
3016
    }
3017
 
3018
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3019
    public boolean isSetId() {
3020
      return __isset_bit_vector.get(__ID_ISSET_ID);
3021
    }
3022
 
3023
    public void setIdIsSet(boolean value) {
3024
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3025
    }
3026
 
3027
    public void setFieldValue(_Fields field, Object value) {
3028
      switch (field) {
3029
      case ID:
3030
        if (value == null) {
3031
          unsetId();
3032
        } else {
3033
          setId((Long)value);
3034
        }
3035
        break;
3036
 
3037
      }
3038
    }
3039
 
3040
    public void setFieldValue(int fieldID, Object value) {
3041
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3042
    }
3043
 
3044
    public Object getFieldValue(_Fields field) {
3045
      switch (field) {
3046
      case ID:
3047
        return new Long(getId());
3048
 
3049
      }
3050
      throw new IllegalStateException();
3051
    }
3052
 
3053
    public Object getFieldValue(int fieldId) {
3054
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3055
    }
3056
 
3057
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3058
    public boolean isSet(_Fields field) {
3059
      switch (field) {
3060
      case ID:
3061
        return isSetId();
3062
      }
3063
      throw new IllegalStateException();
3064
    }
3065
 
3066
    public boolean isSet(int fieldID) {
3067
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3068
    }
3069
 
3070
    @Override
3071
    public boolean equals(Object that) {
3072
      if (that == null)
3073
        return false;
3074
      if (that instanceof getTransaction_args)
3075
        return this.equals((getTransaction_args)that);
3076
      return false;
3077
    }
3078
 
3079
    public boolean equals(getTransaction_args that) {
3080
      if (that == null)
3081
        return false;
3082
 
3083
      boolean this_present_id = true;
3084
      boolean that_present_id = true;
3085
      if (this_present_id || that_present_id) {
3086
        if (!(this_present_id && that_present_id))
3087
          return false;
3088
        if (this.id != that.id)
3089
          return false;
3090
      }
3091
 
3092
      return true;
3093
    }
3094
 
3095
    @Override
3096
    public int hashCode() {
3097
      return 0;
3098
    }
3099
 
3100
    public int compareTo(getTransaction_args other) {
3101
      if (!getClass().equals(other.getClass())) {
3102
        return getClass().getName().compareTo(other.getClass().getName());
3103
      }
3104
 
3105
      int lastComparison = 0;
3106
      getTransaction_args typedOther = (getTransaction_args)other;
3107
 
3108
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3109
      if (lastComparison != 0) {
3110
        return lastComparison;
3111
      }
3112
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3113
      if (lastComparison != 0) {
3114
        return lastComparison;
3115
      }
3116
      return 0;
3117
    }
3118
 
3119
    public void read(TProtocol iprot) throws TException {
3120
      TField field;
3121
      iprot.readStructBegin();
3122
      while (true)
3123
      {
3124
        field = iprot.readFieldBegin();
3125
        if (field.type == TType.STOP) { 
3126
          break;
3127
        }
3128
        _Fields fieldId = _Fields.findByThriftId(field.id);
3129
        if (fieldId == null) {
3130
          TProtocolUtil.skip(iprot, field.type);
3131
        } else {
3132
          switch (fieldId) {
3133
            case ID:
3134
              if (field.type == TType.I64) {
3135
                this.id = iprot.readI64();
3136
                setIdIsSet(true);
3137
              } else { 
3138
                TProtocolUtil.skip(iprot, field.type);
3139
              }
3140
              break;
3141
          }
3142
          iprot.readFieldEnd();
3143
        }
3144
      }
3145
      iprot.readStructEnd();
3146
      validate();
3147
    }
3148
 
3149
    public void write(TProtocol oprot) throws TException {
3150
      validate();
3151
 
3152
      oprot.writeStructBegin(STRUCT_DESC);
3153
      oprot.writeFieldBegin(ID_FIELD_DESC);
3154
      oprot.writeI64(this.id);
3155
      oprot.writeFieldEnd();
3156
      oprot.writeFieldStop();
3157
      oprot.writeStructEnd();
3158
    }
3159
 
3160
    @Override
3161
    public String toString() {
3162
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3163
      boolean first = true;
3164
 
3165
      sb.append("id:");
3166
      sb.append(this.id);
3167
      first = false;
3168
      sb.append(")");
3169
      return sb.toString();
3170
    }
3171
 
3172
    public void validate() throws TException {
3173
      // check for required fields
3174
    }
3175
 
3176
  }
3177
 
684 chandransh 3178
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3179
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3180
 
3181
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3182
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3183
 
3184
    private Transaction success;
3185
    private TransactionServiceException ex;
3186
 
3187
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3188
    public enum _Fields implements TFieldIdEnum {
3189
      SUCCESS((short)0, "success"),
3190
      EX((short)1, "ex");
3191
 
3192
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3193
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3194
 
3195
      static {
3196
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3197
          byId.put((int)field._thriftId, field);
3198
          byName.put(field.getFieldName(), field);
3199
        }
3200
      }
3201
 
3202
      /**
3203
       * Find the _Fields constant that matches fieldId, or null if its not found.
3204
       */
3205
      public static _Fields findByThriftId(int fieldId) {
3206
        return byId.get(fieldId);
3207
      }
3208
 
3209
      /**
3210
       * Find the _Fields constant that matches fieldId, throwing an exception
3211
       * if it is not found.
3212
       */
3213
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3214
        _Fields fields = findByThriftId(fieldId);
3215
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3216
        return fields;
3217
      }
3218
 
3219
      /**
3220
       * Find the _Fields constant that matches name, or null if its not found.
3221
       */
3222
      public static _Fields findByName(String name) {
3223
        return byName.get(name);
3224
      }
3225
 
3226
      private final short _thriftId;
3227
      private final String _fieldName;
3228
 
3229
      _Fields(short thriftId, String fieldName) {
3230
        _thriftId = thriftId;
3231
        _fieldName = fieldName;
3232
      }
3233
 
3234
      public short getThriftFieldId() {
3235
        return _thriftId;
3236
      }
3237
 
3238
      public String getFieldName() {
3239
        return _fieldName;
3240
      }
3241
    }
3242
 
3243
    // isset id assignments
3244
 
3245
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3246
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3247
          new StructMetaData(TType.STRUCT, Transaction.class)));
3248
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3249
          new FieldValueMetaData(TType.STRUCT)));
3250
    }});
3251
 
3252
    static {
3253
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3254
    }
3255
 
3256
    public getTransaction_result() {
3257
    }
3258
 
3259
    public getTransaction_result(
3260
      Transaction success,
3261
      TransactionServiceException ex)
3262
    {
3263
      this();
3264
      this.success = success;
3265
      this.ex = ex;
3266
    }
3267
 
3268
    /**
3269
     * Performs a deep copy on <i>other</i>.
3270
     */
3271
    public getTransaction_result(getTransaction_result other) {
3272
      if (other.isSetSuccess()) {
3273
        this.success = new Transaction(other.success);
3274
      }
3275
      if (other.isSetEx()) {
3276
        this.ex = new TransactionServiceException(other.ex);
3277
      }
3278
    }
3279
 
3280
    public getTransaction_result deepCopy() {
3281
      return new getTransaction_result(this);
3282
    }
3283
 
3284
    @Deprecated
3285
    public getTransaction_result clone() {
3286
      return new getTransaction_result(this);
3287
    }
3288
 
3289
    public Transaction getSuccess() {
3290
      return this.success;
3291
    }
3292
 
3293
    public getTransaction_result setSuccess(Transaction success) {
3294
      this.success = success;
3295
      return this;
3296
    }
3297
 
3298
    public void unsetSuccess() {
3299
      this.success = null;
3300
    }
3301
 
3302
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3303
    public boolean isSetSuccess() {
3304
      return this.success != null;
3305
    }
3306
 
3307
    public void setSuccessIsSet(boolean value) {
3308
      if (!value) {
3309
        this.success = null;
3310
      }
3311
    }
3312
 
3313
    public TransactionServiceException getEx() {
3314
      return this.ex;
3315
    }
3316
 
3317
    public getTransaction_result setEx(TransactionServiceException ex) {
3318
      this.ex = ex;
3319
      return this;
3320
    }
3321
 
3322
    public void unsetEx() {
3323
      this.ex = null;
3324
    }
3325
 
3326
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3327
    public boolean isSetEx() {
3328
      return this.ex != null;
3329
    }
3330
 
3331
    public void setExIsSet(boolean value) {
3332
      if (!value) {
3333
        this.ex = null;
3334
      }
3335
    }
3336
 
3337
    public void setFieldValue(_Fields field, Object value) {
3338
      switch (field) {
3339
      case SUCCESS:
3340
        if (value == null) {
3341
          unsetSuccess();
3342
        } else {
3343
          setSuccess((Transaction)value);
3344
        }
3345
        break;
3346
 
3347
      case EX:
3348
        if (value == null) {
3349
          unsetEx();
3350
        } else {
3351
          setEx((TransactionServiceException)value);
3352
        }
3353
        break;
3354
 
3355
      }
3356
    }
3357
 
3358
    public void setFieldValue(int fieldID, Object value) {
3359
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3360
    }
3361
 
3362
    public Object getFieldValue(_Fields field) {
3363
      switch (field) {
3364
      case SUCCESS:
3365
        return getSuccess();
3366
 
3367
      case EX:
3368
        return getEx();
3369
 
3370
      }
3371
      throw new IllegalStateException();
3372
    }
3373
 
3374
    public Object getFieldValue(int fieldId) {
3375
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3376
    }
3377
 
3378
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3379
    public boolean isSet(_Fields field) {
3380
      switch (field) {
3381
      case SUCCESS:
3382
        return isSetSuccess();
3383
      case EX:
3384
        return isSetEx();
3385
      }
3386
      throw new IllegalStateException();
3387
    }
3388
 
3389
    public boolean isSet(int fieldID) {
3390
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3391
    }
3392
 
3393
    @Override
3394
    public boolean equals(Object that) {
3395
      if (that == null)
3396
        return false;
3397
      if (that instanceof getTransaction_result)
3398
        return this.equals((getTransaction_result)that);
3399
      return false;
3400
    }
3401
 
3402
    public boolean equals(getTransaction_result that) {
3403
      if (that == null)
3404
        return false;
3405
 
3406
      boolean this_present_success = true && this.isSetSuccess();
3407
      boolean that_present_success = true && that.isSetSuccess();
3408
      if (this_present_success || that_present_success) {
3409
        if (!(this_present_success && that_present_success))
3410
          return false;
3411
        if (!this.success.equals(that.success))
3412
          return false;
3413
      }
3414
 
3415
      boolean this_present_ex = true && this.isSetEx();
3416
      boolean that_present_ex = true && that.isSetEx();
3417
      if (this_present_ex || that_present_ex) {
3418
        if (!(this_present_ex && that_present_ex))
3419
          return false;
3420
        if (!this.ex.equals(that.ex))
3421
          return false;
3422
      }
3423
 
3424
      return true;
3425
    }
3426
 
3427
    @Override
3428
    public int hashCode() {
3429
      return 0;
3430
    }
3431
 
684 chandransh 3432
    public int compareTo(getTransaction_result other) {
3433
      if (!getClass().equals(other.getClass())) {
3434
        return getClass().getName().compareTo(other.getClass().getName());
3435
      }
3436
 
3437
      int lastComparison = 0;
3438
      getTransaction_result typedOther = (getTransaction_result)other;
3439
 
3440
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3441
      if (lastComparison != 0) {
3442
        return lastComparison;
3443
      }
3444
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3445
      if (lastComparison != 0) {
3446
        return lastComparison;
3447
      }
3448
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3449
      if (lastComparison != 0) {
3450
        return lastComparison;
3451
      }
3452
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3453
      if (lastComparison != 0) {
3454
        return lastComparison;
3455
      }
3456
      return 0;
3457
    }
3458
 
68 ashish 3459
    public void read(TProtocol iprot) throws TException {
3460
      TField field;
3461
      iprot.readStructBegin();
3462
      while (true)
3463
      {
3464
        field = iprot.readFieldBegin();
3465
        if (field.type == TType.STOP) { 
3466
          break;
3467
        }
3468
        _Fields fieldId = _Fields.findByThriftId(field.id);
3469
        if (fieldId == null) {
3470
          TProtocolUtil.skip(iprot, field.type);
3471
        } else {
3472
          switch (fieldId) {
3473
            case SUCCESS:
3474
              if (field.type == TType.STRUCT) {
3475
                this.success = new Transaction();
3476
                this.success.read(iprot);
3477
              } else { 
3478
                TProtocolUtil.skip(iprot, field.type);
3479
              }
3480
              break;
3481
            case EX:
3482
              if (field.type == TType.STRUCT) {
3483
                this.ex = new TransactionServiceException();
3484
                this.ex.read(iprot);
3485
              } else { 
3486
                TProtocolUtil.skip(iprot, field.type);
3487
              }
3488
              break;
3489
          }
3490
          iprot.readFieldEnd();
3491
        }
3492
      }
3493
      iprot.readStructEnd();
3494
      validate();
3495
    }
3496
 
3497
    public void write(TProtocol oprot) throws TException {
3498
      oprot.writeStructBegin(STRUCT_DESC);
3499
 
3500
      if (this.isSetSuccess()) {
3501
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3502
        this.success.write(oprot);
3503
        oprot.writeFieldEnd();
3504
      } else if (this.isSetEx()) {
3505
        oprot.writeFieldBegin(EX_FIELD_DESC);
3506
        this.ex.write(oprot);
3507
        oprot.writeFieldEnd();
3508
      }
3509
      oprot.writeFieldStop();
3510
      oprot.writeStructEnd();
3511
    }
3512
 
3513
    @Override
3514
    public String toString() {
3515
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3516
      boolean first = true;
3517
 
3518
      sb.append("success:");
3519
      if (this.success == null) {
3520
        sb.append("null");
3521
      } else {
3522
        sb.append(this.success);
3523
      }
3524
      first = false;
3525
      if (!first) sb.append(", ");
3526
      sb.append("ex:");
3527
      if (this.ex == null) {
3528
        sb.append("null");
3529
      } else {
3530
        sb.append(this.ex);
3531
      }
3532
      first = false;
3533
      sb.append(")");
3534
      return sb.toString();
3535
    }
3536
 
3537
    public void validate() throws TException {
3538
      // check for required fields
3539
    }
3540
 
3541
  }
3542
 
3543
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3544
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3545
 
3546
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3547
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3548
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3549
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3550
 
3551
    private long customerId;
132 ashish 3552
    private long from_date;
3553
    private long to_date;
68 ashish 3554
    private TransactionStatus status;
3555
 
3556
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3557
    public enum _Fields implements TFieldIdEnum {
3558
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3559
      FROM_DATE((short)2, "from_date"),
3560
      TO_DATE((short)3, "to_date"),
68 ashish 3561
      /**
3562
       * 
3563
       * @see TransactionStatus
3564
       */
3565
      STATUS((short)4, "status");
3566
 
3567
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3568
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3569
 
3570
      static {
3571
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3572
          byId.put((int)field._thriftId, field);
3573
          byName.put(field.getFieldName(), field);
3574
        }
3575
      }
3576
 
3577
      /**
3578
       * Find the _Fields constant that matches fieldId, or null if its not found.
3579
       */
3580
      public static _Fields findByThriftId(int fieldId) {
3581
        return byId.get(fieldId);
3582
      }
3583
 
3584
      /**
3585
       * Find the _Fields constant that matches fieldId, throwing an exception
3586
       * if it is not found.
3587
       */
3588
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3589
        _Fields fields = findByThriftId(fieldId);
3590
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3591
        return fields;
3592
      }
3593
 
3594
      /**
3595
       * Find the _Fields constant that matches name, or null if its not found.
3596
       */
3597
      public static _Fields findByName(String name) {
3598
        return byName.get(name);
3599
      }
3600
 
3601
      private final short _thriftId;
3602
      private final String _fieldName;
3603
 
3604
      _Fields(short thriftId, String fieldName) {
3605
        _thriftId = thriftId;
3606
        _fieldName = fieldName;
3607
      }
3608
 
3609
      public short getThriftFieldId() {
3610
        return _thriftId;
3611
      }
3612
 
3613
      public String getFieldName() {
3614
        return _fieldName;
3615
      }
3616
    }
3617
 
3618
    // isset id assignments
3619
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3620
    private static final int __FROM_DATE_ISSET_ID = 1;
3621
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3622
    private BitSet __isset_bit_vector = new BitSet(3);
3623
 
3624
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3625
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3626
          new FieldValueMetaData(TType.I64)));
132 ashish 3627
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3628
          new FieldValueMetaData(TType.I64)));
132 ashish 3629
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3630
          new FieldValueMetaData(TType.I64)));
3631
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3632
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3633
    }});
3634
 
3635
    static {
3636
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3637
    }
3638
 
3639
    public getTransactionsForCustomer_args() {
3640
    }
3641
 
3642
    public getTransactionsForCustomer_args(
3643
      long customerId,
132 ashish 3644
      long from_date,
3645
      long to_date,
68 ashish 3646
      TransactionStatus status)
3647
    {
3648
      this();
3649
      this.customerId = customerId;
3650
      setCustomerIdIsSet(true);
132 ashish 3651
      this.from_date = from_date;
3652
      setFrom_dateIsSet(true);
3653
      this.to_date = to_date;
3654
      setTo_dateIsSet(true);
68 ashish 3655
      this.status = status;
3656
    }
3657
 
3658
    /**
3659
     * Performs a deep copy on <i>other</i>.
3660
     */
3661
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3662
      __isset_bit_vector.clear();
3663
      __isset_bit_vector.or(other.__isset_bit_vector);
3664
      this.customerId = other.customerId;
132 ashish 3665
      this.from_date = other.from_date;
3666
      this.to_date = other.to_date;
68 ashish 3667
      if (other.isSetStatus()) {
3668
        this.status = other.status;
3669
      }
3670
    }
3671
 
3672
    public getTransactionsForCustomer_args deepCopy() {
3673
      return new getTransactionsForCustomer_args(this);
3674
    }
3675
 
3676
    @Deprecated
3677
    public getTransactionsForCustomer_args clone() {
3678
      return new getTransactionsForCustomer_args(this);
3679
    }
3680
 
3681
    public long getCustomerId() {
3682
      return this.customerId;
3683
    }
3684
 
3685
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3686
      this.customerId = customerId;
3687
      setCustomerIdIsSet(true);
3688
      return this;
3689
    }
3690
 
3691
    public void unsetCustomerId() {
3692
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3693
    }
3694
 
3695
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3696
    public boolean isSetCustomerId() {
3697
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3698
    }
3699
 
3700
    public void setCustomerIdIsSet(boolean value) {
3701
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3702
    }
3703
 
132 ashish 3704
    public long getFrom_date() {
3705
      return this.from_date;
68 ashish 3706
    }
3707
 
132 ashish 3708
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3709
      this.from_date = from_date;
3710
      setFrom_dateIsSet(true);
68 ashish 3711
      return this;
3712
    }
3713
 
132 ashish 3714
    public void unsetFrom_date() {
3715
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3716
    }
3717
 
132 ashish 3718
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3719
    public boolean isSetFrom_date() {
3720
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3721
    }
3722
 
132 ashish 3723
    public void setFrom_dateIsSet(boolean value) {
3724
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3725
    }
3726
 
132 ashish 3727
    public long getTo_date() {
3728
      return this.to_date;
68 ashish 3729
    }
3730
 
132 ashish 3731
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3732
      this.to_date = to_date;
3733
      setTo_dateIsSet(true);
68 ashish 3734
      return this;
3735
    }
3736
 
132 ashish 3737
    public void unsetTo_date() {
3738
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3739
    }
3740
 
132 ashish 3741
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3742
    public boolean isSetTo_date() {
3743
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3744
    }
3745
 
132 ashish 3746
    public void setTo_dateIsSet(boolean value) {
3747
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3748
    }
3749
 
3750
    /**
3751
     * 
3752
     * @see TransactionStatus
3753
     */
3754
    public TransactionStatus getStatus() {
3755
      return this.status;
3756
    }
3757
 
3758
    /**
3759
     * 
3760
     * @see TransactionStatus
3761
     */
3762
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3763
      this.status = status;
3764
      return this;
3765
    }
3766
 
3767
    public void unsetStatus() {
3768
      this.status = null;
3769
    }
3770
 
3771
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3772
    public boolean isSetStatus() {
3773
      return this.status != null;
3774
    }
3775
 
3776
    public void setStatusIsSet(boolean value) {
3777
      if (!value) {
3778
        this.status = null;
3779
      }
3780
    }
3781
 
3782
    public void setFieldValue(_Fields field, Object value) {
3783
      switch (field) {
3784
      case CUSTOMER_ID:
3785
        if (value == null) {
3786
          unsetCustomerId();
3787
        } else {
3788
          setCustomerId((Long)value);
3789
        }
3790
        break;
3791
 
132 ashish 3792
      case FROM_DATE:
68 ashish 3793
        if (value == null) {
132 ashish 3794
          unsetFrom_date();
68 ashish 3795
        } else {
132 ashish 3796
          setFrom_date((Long)value);
68 ashish 3797
        }
3798
        break;
3799
 
132 ashish 3800
      case TO_DATE:
68 ashish 3801
        if (value == null) {
132 ashish 3802
          unsetTo_date();
68 ashish 3803
        } else {
132 ashish 3804
          setTo_date((Long)value);
68 ashish 3805
        }
3806
        break;
3807
 
3808
      case STATUS:
3809
        if (value == null) {
3810
          unsetStatus();
3811
        } else {
3812
          setStatus((TransactionStatus)value);
3813
        }
3814
        break;
3815
 
3816
      }
3817
    }
3818
 
3819
    public void setFieldValue(int fieldID, Object value) {
3820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3821
    }
3822
 
3823
    public Object getFieldValue(_Fields field) {
3824
      switch (field) {
3825
      case CUSTOMER_ID:
3826
        return new Long(getCustomerId());
3827
 
132 ashish 3828
      case FROM_DATE:
3829
        return new Long(getFrom_date());
68 ashish 3830
 
132 ashish 3831
      case TO_DATE:
3832
        return new Long(getTo_date());
68 ashish 3833
 
3834
      case STATUS:
3835
        return getStatus();
3836
 
3837
      }
3838
      throw new IllegalStateException();
3839
    }
3840
 
3841
    public Object getFieldValue(int fieldId) {
3842
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3843
    }
3844
 
3845
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3846
    public boolean isSet(_Fields field) {
3847
      switch (field) {
3848
      case CUSTOMER_ID:
3849
        return isSetCustomerId();
132 ashish 3850
      case FROM_DATE:
3851
        return isSetFrom_date();
3852
      case TO_DATE:
3853
        return isSetTo_date();
68 ashish 3854
      case STATUS:
3855
        return isSetStatus();
3856
      }
3857
      throw new IllegalStateException();
3858
    }
3859
 
3860
    public boolean isSet(int fieldID) {
3861
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3862
    }
3863
 
3864
    @Override
3865
    public boolean equals(Object that) {
3866
      if (that == null)
3867
        return false;
3868
      if (that instanceof getTransactionsForCustomer_args)
3869
        return this.equals((getTransactionsForCustomer_args)that);
3870
      return false;
3871
    }
3872
 
3873
    public boolean equals(getTransactionsForCustomer_args that) {
3874
      if (that == null)
3875
        return false;
3876
 
3877
      boolean this_present_customerId = true;
3878
      boolean that_present_customerId = true;
3879
      if (this_present_customerId || that_present_customerId) {
3880
        if (!(this_present_customerId && that_present_customerId))
3881
          return false;
3882
        if (this.customerId != that.customerId)
3883
          return false;
3884
      }
3885
 
132 ashish 3886
      boolean this_present_from_date = true;
3887
      boolean that_present_from_date = true;
3888
      if (this_present_from_date || that_present_from_date) {
3889
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3890
          return false;
132 ashish 3891
        if (this.from_date != that.from_date)
68 ashish 3892
          return false;
3893
      }
3894
 
132 ashish 3895
      boolean this_present_to_date = true;
3896
      boolean that_present_to_date = true;
3897
      if (this_present_to_date || that_present_to_date) {
3898
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3899
          return false;
132 ashish 3900
        if (this.to_date != that.to_date)
68 ashish 3901
          return false;
3902
      }
3903
 
3904
      boolean this_present_status = true && this.isSetStatus();
3905
      boolean that_present_status = true && that.isSetStatus();
3906
      if (this_present_status || that_present_status) {
3907
        if (!(this_present_status && that_present_status))
3908
          return false;
3909
        if (!this.status.equals(that.status))
3910
          return false;
3911
      }
3912
 
3913
      return true;
3914
    }
3915
 
3916
    @Override
3917
    public int hashCode() {
3918
      return 0;
3919
    }
3920
 
3921
    public int compareTo(getTransactionsForCustomer_args other) {
3922
      if (!getClass().equals(other.getClass())) {
3923
        return getClass().getName().compareTo(other.getClass().getName());
3924
      }
3925
 
3926
      int lastComparison = 0;
3927
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
3928
 
3929
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
3930
      if (lastComparison != 0) {
3931
        return lastComparison;
3932
      }
3933
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
3934
      if (lastComparison != 0) {
3935
        return lastComparison;
3936
      }
132 ashish 3937
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3938
      if (lastComparison != 0) {
3939
        return lastComparison;
3940
      }
132 ashish 3941
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3942
      if (lastComparison != 0) {
3943
        return lastComparison;
3944
      }
132 ashish 3945
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3946
      if (lastComparison != 0) {
3947
        return lastComparison;
3948
      }
132 ashish 3949
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3950
      if (lastComparison != 0) {
3951
        return lastComparison;
3952
      }
3953
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3954
      if (lastComparison != 0) {
3955
        return lastComparison;
3956
      }
3957
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3958
      if (lastComparison != 0) {
3959
        return lastComparison;
3960
      }
3961
      return 0;
3962
    }
3963
 
3964
    public void read(TProtocol iprot) throws TException {
3965
      TField field;
3966
      iprot.readStructBegin();
3967
      while (true)
3968
      {
3969
        field = iprot.readFieldBegin();
3970
        if (field.type == TType.STOP) { 
3971
          break;
3972
        }
3973
        _Fields fieldId = _Fields.findByThriftId(field.id);
3974
        if (fieldId == null) {
3975
          TProtocolUtil.skip(iprot, field.type);
3976
        } else {
3977
          switch (fieldId) {
3978
            case CUSTOMER_ID:
3979
              if (field.type == TType.I64) {
3980
                this.customerId = iprot.readI64();
3981
                setCustomerIdIsSet(true);
3982
              } else { 
3983
                TProtocolUtil.skip(iprot, field.type);
3984
              }
3985
              break;
132 ashish 3986
            case FROM_DATE:
68 ashish 3987
              if (field.type == TType.I64) {
132 ashish 3988
                this.from_date = iprot.readI64();
3989
                setFrom_dateIsSet(true);
68 ashish 3990
              } else { 
3991
                TProtocolUtil.skip(iprot, field.type);
3992
              }
3993
              break;
132 ashish 3994
            case TO_DATE:
68 ashish 3995
              if (field.type == TType.I64) {
132 ashish 3996
                this.to_date = iprot.readI64();
3997
                setTo_dateIsSet(true);
68 ashish 3998
              } else { 
3999
                TProtocolUtil.skip(iprot, field.type);
4000
              }
4001
              break;
4002
            case STATUS:
4003
              if (field.type == TType.I32) {
4004
                this.status = TransactionStatus.findByValue(iprot.readI32());
4005
              } else { 
4006
                TProtocolUtil.skip(iprot, field.type);
4007
              }
4008
              break;
4009
          }
4010
          iprot.readFieldEnd();
4011
        }
4012
      }
4013
      iprot.readStructEnd();
4014
      validate();
4015
    }
4016
 
4017
    public void write(TProtocol oprot) throws TException {
4018
      validate();
4019
 
4020
      oprot.writeStructBegin(STRUCT_DESC);
4021
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4022
      oprot.writeI64(this.customerId);
4023
      oprot.writeFieldEnd();
132 ashish 4024
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4025
      oprot.writeI64(this.from_date);
68 ashish 4026
      oprot.writeFieldEnd();
132 ashish 4027
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4028
      oprot.writeI64(this.to_date);
68 ashish 4029
      oprot.writeFieldEnd();
4030
      if (this.status != null) {
4031
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4032
        oprot.writeI32(this.status.getValue());
4033
        oprot.writeFieldEnd();
4034
      }
4035
      oprot.writeFieldStop();
4036
      oprot.writeStructEnd();
4037
    }
4038
 
4039
    @Override
4040
    public String toString() {
4041
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4042
      boolean first = true;
4043
 
4044
      sb.append("customerId:");
4045
      sb.append(this.customerId);
4046
      first = false;
4047
      if (!first) sb.append(", ");
132 ashish 4048
      sb.append("from_date:");
4049
      sb.append(this.from_date);
68 ashish 4050
      first = false;
4051
      if (!first) sb.append(", ");
132 ashish 4052
      sb.append("to_date:");
4053
      sb.append(this.to_date);
68 ashish 4054
      first = false;
4055
      if (!first) sb.append(", ");
4056
      sb.append("status:");
4057
      if (this.status == null) {
4058
        sb.append("null");
4059
      } else {
4060
        String status_name = status.name();
4061
        if (status_name != null) {
4062
          sb.append(status_name);
4063
          sb.append(" (");
4064
        }
4065
        sb.append(this.status);
4066
        if (status_name != null) {
4067
          sb.append(")");
4068
        }
4069
      }
4070
      first = false;
4071
      sb.append(")");
4072
      return sb.toString();
4073
    }
4074
 
4075
    public void validate() throws TException {
4076
      // check for required fields
4077
    }
4078
 
4079
  }
4080
 
684 chandransh 4081
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4082
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4083
 
4084
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4085
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4086
 
4087
    private List<Transaction> success;
4088
    private TransactionServiceException ex;
4089
 
4090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4091
    public enum _Fields implements TFieldIdEnum {
4092
      SUCCESS((short)0, "success"),
4093
      EX((short)1, "ex");
4094
 
4095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4097
 
4098
      static {
4099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4100
          byId.put((int)field._thriftId, field);
4101
          byName.put(field.getFieldName(), field);
4102
        }
4103
      }
4104
 
4105
      /**
4106
       * Find the _Fields constant that matches fieldId, or null if its not found.
4107
       */
4108
      public static _Fields findByThriftId(int fieldId) {
4109
        return byId.get(fieldId);
4110
      }
4111
 
4112
      /**
4113
       * Find the _Fields constant that matches fieldId, throwing an exception
4114
       * if it is not found.
4115
       */
4116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4117
        _Fields fields = findByThriftId(fieldId);
4118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4119
        return fields;
4120
      }
4121
 
4122
      /**
4123
       * Find the _Fields constant that matches name, or null if its not found.
4124
       */
4125
      public static _Fields findByName(String name) {
4126
        return byName.get(name);
4127
      }
4128
 
4129
      private final short _thriftId;
4130
      private final String _fieldName;
4131
 
4132
      _Fields(short thriftId, String fieldName) {
4133
        _thriftId = thriftId;
4134
        _fieldName = fieldName;
4135
      }
4136
 
4137
      public short getThriftFieldId() {
4138
        return _thriftId;
4139
      }
4140
 
4141
      public String getFieldName() {
4142
        return _fieldName;
4143
      }
4144
    }
4145
 
4146
    // isset id assignments
4147
 
4148
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4149
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4150
          new ListMetaData(TType.LIST, 
4151
              new StructMetaData(TType.STRUCT, Transaction.class))));
4152
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4153
          new FieldValueMetaData(TType.STRUCT)));
4154
    }});
4155
 
4156
    static {
4157
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4158
    }
4159
 
4160
    public getTransactionsForCustomer_result() {
4161
    }
4162
 
4163
    public getTransactionsForCustomer_result(
4164
      List<Transaction> success,
4165
      TransactionServiceException ex)
4166
    {
4167
      this();
4168
      this.success = success;
4169
      this.ex = ex;
4170
    }
4171
 
4172
    /**
4173
     * Performs a deep copy on <i>other</i>.
4174
     */
4175
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4176
      if (other.isSetSuccess()) {
4177
        List<Transaction> __this__success = new ArrayList<Transaction>();
4178
        for (Transaction other_element : other.success) {
4179
          __this__success.add(new Transaction(other_element));
4180
        }
4181
        this.success = __this__success;
4182
      }
4183
      if (other.isSetEx()) {
4184
        this.ex = new TransactionServiceException(other.ex);
4185
      }
4186
    }
4187
 
4188
    public getTransactionsForCustomer_result deepCopy() {
4189
      return new getTransactionsForCustomer_result(this);
4190
    }
4191
 
4192
    @Deprecated
4193
    public getTransactionsForCustomer_result clone() {
4194
      return new getTransactionsForCustomer_result(this);
4195
    }
4196
 
4197
    public int getSuccessSize() {
4198
      return (this.success == null) ? 0 : this.success.size();
4199
    }
4200
 
4201
    public java.util.Iterator<Transaction> getSuccessIterator() {
4202
      return (this.success == null) ? null : this.success.iterator();
4203
    }
4204
 
4205
    public void addToSuccess(Transaction elem) {
4206
      if (this.success == null) {
4207
        this.success = new ArrayList<Transaction>();
4208
      }
4209
      this.success.add(elem);
4210
    }
4211
 
4212
    public List<Transaction> getSuccess() {
4213
      return this.success;
4214
    }
4215
 
4216
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4217
      this.success = success;
4218
      return this;
4219
    }
4220
 
4221
    public void unsetSuccess() {
4222
      this.success = null;
4223
    }
4224
 
4225
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4226
    public boolean isSetSuccess() {
4227
      return this.success != null;
4228
    }
4229
 
4230
    public void setSuccessIsSet(boolean value) {
4231
      if (!value) {
4232
        this.success = null;
4233
      }
4234
    }
4235
 
4236
    public TransactionServiceException getEx() {
4237
      return this.ex;
4238
    }
4239
 
4240
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4241
      this.ex = ex;
4242
      return this;
4243
    }
4244
 
4245
    public void unsetEx() {
4246
      this.ex = null;
4247
    }
4248
 
4249
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4250
    public boolean isSetEx() {
4251
      return this.ex != null;
4252
    }
4253
 
4254
    public void setExIsSet(boolean value) {
4255
      if (!value) {
4256
        this.ex = null;
4257
      }
4258
    }
4259
 
4260
    public void setFieldValue(_Fields field, Object value) {
4261
      switch (field) {
4262
      case SUCCESS:
4263
        if (value == null) {
4264
          unsetSuccess();
4265
        } else {
4266
          setSuccess((List<Transaction>)value);
4267
        }
4268
        break;
4269
 
4270
      case EX:
4271
        if (value == null) {
4272
          unsetEx();
4273
        } else {
4274
          setEx((TransactionServiceException)value);
4275
        }
4276
        break;
4277
 
4278
      }
4279
    }
4280
 
4281
    public void setFieldValue(int fieldID, Object value) {
4282
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4283
    }
4284
 
4285
    public Object getFieldValue(_Fields field) {
4286
      switch (field) {
4287
      case SUCCESS:
4288
        return getSuccess();
4289
 
4290
      case EX:
4291
        return getEx();
4292
 
4293
      }
4294
      throw new IllegalStateException();
4295
    }
4296
 
4297
    public Object getFieldValue(int fieldId) {
4298
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4299
    }
4300
 
4301
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4302
    public boolean isSet(_Fields field) {
4303
      switch (field) {
4304
      case SUCCESS:
4305
        return isSetSuccess();
4306
      case EX:
4307
        return isSetEx();
4308
      }
4309
      throw new IllegalStateException();
4310
    }
4311
 
4312
    public boolean isSet(int fieldID) {
4313
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4314
    }
4315
 
4316
    @Override
4317
    public boolean equals(Object that) {
4318
      if (that == null)
4319
        return false;
4320
      if (that instanceof getTransactionsForCustomer_result)
4321
        return this.equals((getTransactionsForCustomer_result)that);
4322
      return false;
4323
    }
4324
 
4325
    public boolean equals(getTransactionsForCustomer_result that) {
4326
      if (that == null)
4327
        return false;
4328
 
4329
      boolean this_present_success = true && this.isSetSuccess();
4330
      boolean that_present_success = true && that.isSetSuccess();
4331
      if (this_present_success || that_present_success) {
4332
        if (!(this_present_success && that_present_success))
4333
          return false;
4334
        if (!this.success.equals(that.success))
4335
          return false;
4336
      }
4337
 
4338
      boolean this_present_ex = true && this.isSetEx();
4339
      boolean that_present_ex = true && that.isSetEx();
4340
      if (this_present_ex || that_present_ex) {
4341
        if (!(this_present_ex && that_present_ex))
4342
          return false;
4343
        if (!this.ex.equals(that.ex))
4344
          return false;
4345
      }
4346
 
4347
      return true;
4348
    }
4349
 
4350
    @Override
4351
    public int hashCode() {
4352
      return 0;
4353
    }
4354
 
684 chandransh 4355
    public int compareTo(getTransactionsForCustomer_result other) {
4356
      if (!getClass().equals(other.getClass())) {
4357
        return getClass().getName().compareTo(other.getClass().getName());
4358
      }
4359
 
4360
      int lastComparison = 0;
4361
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4362
 
4363
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4364
      if (lastComparison != 0) {
4365
        return lastComparison;
4366
      }
4367
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4368
      if (lastComparison != 0) {
4369
        return lastComparison;
4370
      }
4371
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4372
      if (lastComparison != 0) {
4373
        return lastComparison;
4374
      }
4375
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4376
      if (lastComparison != 0) {
4377
        return lastComparison;
4378
      }
4379
      return 0;
4380
    }
4381
 
68 ashish 4382
    public void read(TProtocol iprot) throws TException {
4383
      TField field;
4384
      iprot.readStructBegin();
4385
      while (true)
4386
      {
4387
        field = iprot.readFieldBegin();
4388
        if (field.type == TType.STOP) { 
4389
          break;
4390
        }
4391
        _Fields fieldId = _Fields.findByThriftId(field.id);
4392
        if (fieldId == null) {
4393
          TProtocolUtil.skip(iprot, field.type);
4394
        } else {
4395
          switch (fieldId) {
4396
            case SUCCESS:
4397
              if (field.type == TType.LIST) {
4398
                {
684 chandransh 4399
                  TList _list8 = iprot.readListBegin();
4400
                  this.success = new ArrayList<Transaction>(_list8.size);
4401
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4402
                  {
684 chandransh 4403
                    Transaction _elem10;
4404
                    _elem10 = new Transaction();
4405
                    _elem10.read(iprot);
4406
                    this.success.add(_elem10);
68 ashish 4407
                  }
4408
                  iprot.readListEnd();
4409
                }
4410
              } else { 
4411
                TProtocolUtil.skip(iprot, field.type);
4412
              }
4413
              break;
4414
            case EX:
4415
              if (field.type == TType.STRUCT) {
4416
                this.ex = new TransactionServiceException();
4417
                this.ex.read(iprot);
4418
              } else { 
4419
                TProtocolUtil.skip(iprot, field.type);
4420
              }
4421
              break;
4422
          }
4423
          iprot.readFieldEnd();
4424
        }
4425
      }
4426
      iprot.readStructEnd();
4427
      validate();
4428
    }
4429
 
4430
    public void write(TProtocol oprot) throws TException {
4431
      oprot.writeStructBegin(STRUCT_DESC);
4432
 
4433
      if (this.isSetSuccess()) {
4434
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4435
        {
4436
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4437
          for (Transaction _iter11 : this.success)
68 ashish 4438
          {
684 chandransh 4439
            _iter11.write(oprot);
68 ashish 4440
          }
4441
          oprot.writeListEnd();
4442
        }
4443
        oprot.writeFieldEnd();
4444
      } else if (this.isSetEx()) {
4445
        oprot.writeFieldBegin(EX_FIELD_DESC);
4446
        this.ex.write(oprot);
4447
        oprot.writeFieldEnd();
4448
      }
4449
      oprot.writeFieldStop();
4450
      oprot.writeStructEnd();
4451
    }
4452
 
4453
    @Override
4454
    public String toString() {
4455
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4456
      boolean first = true;
4457
 
4458
      sb.append("success:");
4459
      if (this.success == null) {
4460
        sb.append("null");
4461
      } else {
4462
        sb.append(this.success);
4463
      }
4464
      first = false;
4465
      if (!first) sb.append(", ");
4466
      sb.append("ex:");
4467
      if (this.ex == null) {
4468
        sb.append("null");
4469
      } else {
4470
        sb.append(this.ex);
4471
      }
4472
      first = false;
4473
      sb.append(")");
4474
      return sb.toString();
4475
    }
4476
 
4477
    public void validate() throws TException {
4478
      // check for required fields
4479
    }
4480
 
4481
  }
4482
 
132 ashish 4483
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4484
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4485
 
4486
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4487
 
4488
    private long shoppingCartId;
4489
 
4490
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4491
    public enum _Fields implements TFieldIdEnum {
4492
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4493
 
4494
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4495
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4496
 
4497
      static {
4498
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4499
          byId.put((int)field._thriftId, field);
4500
          byName.put(field.getFieldName(), field);
4501
        }
4502
      }
4503
 
4504
      /**
4505
       * Find the _Fields constant that matches fieldId, or null if its not found.
4506
       */
4507
      public static _Fields findByThriftId(int fieldId) {
4508
        return byId.get(fieldId);
4509
      }
4510
 
4511
      /**
4512
       * Find the _Fields constant that matches fieldId, throwing an exception
4513
       * if it is not found.
4514
       */
4515
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4516
        _Fields fields = findByThriftId(fieldId);
4517
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4518
        return fields;
4519
      }
4520
 
4521
      /**
4522
       * Find the _Fields constant that matches name, or null if its not found.
4523
       */
4524
      public static _Fields findByName(String name) {
4525
        return byName.get(name);
4526
      }
4527
 
4528
      private final short _thriftId;
4529
      private final String _fieldName;
4530
 
4531
      _Fields(short thriftId, String fieldName) {
4532
        _thriftId = thriftId;
4533
        _fieldName = fieldName;
4534
      }
4535
 
4536
      public short getThriftFieldId() {
4537
        return _thriftId;
4538
      }
4539
 
4540
      public String getFieldName() {
4541
        return _fieldName;
4542
      }
4543
    }
4544
 
4545
    // isset id assignments
4546
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4547
    private BitSet __isset_bit_vector = new BitSet(1);
4548
 
4549
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4550
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4551
          new FieldValueMetaData(TType.I64)));
4552
    }});
4553
 
4554
    static {
4555
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4556
    }
4557
 
4558
    public getTransactionsForShoppingCartId_args() {
4559
    }
4560
 
4561
    public getTransactionsForShoppingCartId_args(
4562
      long shoppingCartId)
4563
    {
4564
      this();
4565
      this.shoppingCartId = shoppingCartId;
4566
      setShoppingCartIdIsSet(true);
4567
    }
4568
 
4569
    /**
4570
     * Performs a deep copy on <i>other</i>.
4571
     */
4572
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4573
      __isset_bit_vector.clear();
4574
      __isset_bit_vector.or(other.__isset_bit_vector);
4575
      this.shoppingCartId = other.shoppingCartId;
4576
    }
4577
 
4578
    public getTransactionsForShoppingCartId_args deepCopy() {
4579
      return new getTransactionsForShoppingCartId_args(this);
4580
    }
4581
 
4582
    @Deprecated
4583
    public getTransactionsForShoppingCartId_args clone() {
4584
      return new getTransactionsForShoppingCartId_args(this);
4585
    }
4586
 
4587
    public long getShoppingCartId() {
4588
      return this.shoppingCartId;
4589
    }
4590
 
4591
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4592
      this.shoppingCartId = shoppingCartId;
4593
      setShoppingCartIdIsSet(true);
4594
      return this;
4595
    }
4596
 
4597
    public void unsetShoppingCartId() {
4598
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4599
    }
4600
 
4601
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4602
    public boolean isSetShoppingCartId() {
4603
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4604
    }
4605
 
4606
    public void setShoppingCartIdIsSet(boolean value) {
4607
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4608
    }
4609
 
4610
    public void setFieldValue(_Fields field, Object value) {
4611
      switch (field) {
4612
      case SHOPPING_CART_ID:
4613
        if (value == null) {
4614
          unsetShoppingCartId();
4615
        } else {
4616
          setShoppingCartId((Long)value);
4617
        }
4618
        break;
4619
 
4620
      }
4621
    }
4622
 
4623
    public void setFieldValue(int fieldID, Object value) {
4624
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4625
    }
4626
 
4627
    public Object getFieldValue(_Fields field) {
4628
      switch (field) {
4629
      case SHOPPING_CART_ID:
4630
        return new Long(getShoppingCartId());
4631
 
4632
      }
4633
      throw new IllegalStateException();
4634
    }
4635
 
4636
    public Object getFieldValue(int fieldId) {
4637
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4638
    }
4639
 
4640
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4641
    public boolean isSet(_Fields field) {
4642
      switch (field) {
4643
      case SHOPPING_CART_ID:
4644
        return isSetShoppingCartId();
4645
      }
4646
      throw new IllegalStateException();
4647
    }
4648
 
4649
    public boolean isSet(int fieldID) {
4650
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4651
    }
4652
 
4653
    @Override
4654
    public boolean equals(Object that) {
4655
      if (that == null)
4656
        return false;
4657
      if (that instanceof getTransactionsForShoppingCartId_args)
4658
        return this.equals((getTransactionsForShoppingCartId_args)that);
4659
      return false;
4660
    }
4661
 
4662
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4663
      if (that == null)
4664
        return false;
4665
 
4666
      boolean this_present_shoppingCartId = true;
4667
      boolean that_present_shoppingCartId = true;
4668
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4669
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4670
          return false;
4671
        if (this.shoppingCartId != that.shoppingCartId)
4672
          return false;
4673
      }
4674
 
4675
      return true;
4676
    }
4677
 
4678
    @Override
4679
    public int hashCode() {
4680
      return 0;
4681
    }
4682
 
4683
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4684
      if (!getClass().equals(other.getClass())) {
4685
        return getClass().getName().compareTo(other.getClass().getName());
4686
      }
4687
 
4688
      int lastComparison = 0;
4689
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4690
 
4691
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4692
      if (lastComparison != 0) {
4693
        return lastComparison;
4694
      }
4695
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4696
      if (lastComparison != 0) {
4697
        return lastComparison;
4698
      }
4699
      return 0;
4700
    }
4701
 
4702
    public void read(TProtocol iprot) throws TException {
4703
      TField field;
4704
      iprot.readStructBegin();
4705
      while (true)
4706
      {
4707
        field = iprot.readFieldBegin();
4708
        if (field.type == TType.STOP) { 
4709
          break;
4710
        }
4711
        _Fields fieldId = _Fields.findByThriftId(field.id);
4712
        if (fieldId == null) {
4713
          TProtocolUtil.skip(iprot, field.type);
4714
        } else {
4715
          switch (fieldId) {
4716
            case SHOPPING_CART_ID:
4717
              if (field.type == TType.I64) {
4718
                this.shoppingCartId = iprot.readI64();
4719
                setShoppingCartIdIsSet(true);
4720
              } else { 
4721
                TProtocolUtil.skip(iprot, field.type);
4722
              }
4723
              break;
4724
          }
4725
          iprot.readFieldEnd();
4726
        }
4727
      }
4728
      iprot.readStructEnd();
4729
      validate();
4730
    }
4731
 
4732
    public void write(TProtocol oprot) throws TException {
4733
      validate();
4734
 
4735
      oprot.writeStructBegin(STRUCT_DESC);
4736
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4737
      oprot.writeI64(this.shoppingCartId);
4738
      oprot.writeFieldEnd();
4739
      oprot.writeFieldStop();
4740
      oprot.writeStructEnd();
4741
    }
4742
 
4743
    @Override
4744
    public String toString() {
4745
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4746
      boolean first = true;
4747
 
4748
      sb.append("shoppingCartId:");
4749
      sb.append(this.shoppingCartId);
4750
      first = false;
4751
      sb.append(")");
4752
      return sb.toString();
4753
    }
4754
 
4755
    public void validate() throws TException {
4756
      // check for required fields
4757
    }
4758
 
4759
  }
4760
 
684 chandransh 4761
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4762
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4763
 
4764
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4765
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4766
 
4767
    private List<Transaction> success;
4768
    private TransactionServiceException ex;
4769
 
4770
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4771
    public enum _Fields implements TFieldIdEnum {
4772
      SUCCESS((short)0, "success"),
4773
      EX((short)1, "ex");
4774
 
4775
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4776
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4777
 
4778
      static {
4779
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4780
          byId.put((int)field._thriftId, field);
4781
          byName.put(field.getFieldName(), field);
4782
        }
4783
      }
4784
 
4785
      /**
4786
       * Find the _Fields constant that matches fieldId, or null if its not found.
4787
       */
4788
      public static _Fields findByThriftId(int fieldId) {
4789
        return byId.get(fieldId);
4790
      }
4791
 
4792
      /**
4793
       * Find the _Fields constant that matches fieldId, throwing an exception
4794
       * if it is not found.
4795
       */
4796
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4797
        _Fields fields = findByThriftId(fieldId);
4798
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4799
        return fields;
4800
      }
4801
 
4802
      /**
4803
       * Find the _Fields constant that matches name, or null if its not found.
4804
       */
4805
      public static _Fields findByName(String name) {
4806
        return byName.get(name);
4807
      }
4808
 
4809
      private final short _thriftId;
4810
      private final String _fieldName;
4811
 
4812
      _Fields(short thriftId, String fieldName) {
4813
        _thriftId = thriftId;
4814
        _fieldName = fieldName;
4815
      }
4816
 
4817
      public short getThriftFieldId() {
4818
        return _thriftId;
4819
      }
4820
 
4821
      public String getFieldName() {
4822
        return _fieldName;
4823
      }
4824
    }
4825
 
4826
    // isset id assignments
4827
 
4828
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4829
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4830
          new ListMetaData(TType.LIST, 
4831
              new StructMetaData(TType.STRUCT, Transaction.class))));
4832
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4833
          new FieldValueMetaData(TType.STRUCT)));
4834
    }});
4835
 
4836
    static {
4837
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4838
    }
4839
 
4840
    public getTransactionsForShoppingCartId_result() {
4841
    }
4842
 
4843
    public getTransactionsForShoppingCartId_result(
4844
      List<Transaction> success,
4845
      TransactionServiceException ex)
4846
    {
4847
      this();
4848
      this.success = success;
4849
      this.ex = ex;
4850
    }
4851
 
4852
    /**
4853
     * Performs a deep copy on <i>other</i>.
4854
     */
4855
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
4856
      if (other.isSetSuccess()) {
4857
        List<Transaction> __this__success = new ArrayList<Transaction>();
4858
        for (Transaction other_element : other.success) {
4859
          __this__success.add(new Transaction(other_element));
4860
        }
4861
        this.success = __this__success;
4862
      }
4863
      if (other.isSetEx()) {
4864
        this.ex = new TransactionServiceException(other.ex);
4865
      }
4866
    }
4867
 
4868
    public getTransactionsForShoppingCartId_result deepCopy() {
4869
      return new getTransactionsForShoppingCartId_result(this);
4870
    }
4871
 
4872
    @Deprecated
4873
    public getTransactionsForShoppingCartId_result clone() {
4874
      return new getTransactionsForShoppingCartId_result(this);
4875
    }
4876
 
4877
    public int getSuccessSize() {
4878
      return (this.success == null) ? 0 : this.success.size();
4879
    }
4880
 
4881
    public java.util.Iterator<Transaction> getSuccessIterator() {
4882
      return (this.success == null) ? null : this.success.iterator();
4883
    }
4884
 
4885
    public void addToSuccess(Transaction elem) {
4886
      if (this.success == null) {
4887
        this.success = new ArrayList<Transaction>();
4888
      }
4889
      this.success.add(elem);
4890
    }
4891
 
4892
    public List<Transaction> getSuccess() {
4893
      return this.success;
4894
    }
4895
 
4896
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
4897
      this.success = success;
4898
      return this;
4899
    }
4900
 
4901
    public void unsetSuccess() {
4902
      this.success = null;
4903
    }
4904
 
4905
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4906
    public boolean isSetSuccess() {
4907
      return this.success != null;
4908
    }
4909
 
4910
    public void setSuccessIsSet(boolean value) {
4911
      if (!value) {
4912
        this.success = null;
4913
      }
4914
    }
4915
 
4916
    public TransactionServiceException getEx() {
4917
      return this.ex;
4918
    }
4919
 
4920
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
4921
      this.ex = ex;
4922
      return this;
4923
    }
4924
 
4925
    public void unsetEx() {
4926
      this.ex = null;
4927
    }
4928
 
4929
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4930
    public boolean isSetEx() {
4931
      return this.ex != null;
4932
    }
4933
 
4934
    public void setExIsSet(boolean value) {
4935
      if (!value) {
4936
        this.ex = null;
4937
      }
4938
    }
4939
 
4940
    public void setFieldValue(_Fields field, Object value) {
4941
      switch (field) {
4942
      case SUCCESS:
4943
        if (value == null) {
4944
          unsetSuccess();
4945
        } else {
4946
          setSuccess((List<Transaction>)value);
4947
        }
4948
        break;
4949
 
4950
      case EX:
4951
        if (value == null) {
4952
          unsetEx();
4953
        } else {
4954
          setEx((TransactionServiceException)value);
4955
        }
4956
        break;
4957
 
4958
      }
4959
    }
4960
 
4961
    public void setFieldValue(int fieldID, Object value) {
4962
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4963
    }
4964
 
4965
    public Object getFieldValue(_Fields field) {
4966
      switch (field) {
4967
      case SUCCESS:
4968
        return getSuccess();
4969
 
4970
      case EX:
4971
        return getEx();
4972
 
4973
      }
4974
      throw new IllegalStateException();
4975
    }
4976
 
4977
    public Object getFieldValue(int fieldId) {
4978
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4979
    }
4980
 
4981
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4982
    public boolean isSet(_Fields field) {
4983
      switch (field) {
4984
      case SUCCESS:
4985
        return isSetSuccess();
4986
      case EX:
4987
        return isSetEx();
4988
      }
4989
      throw new IllegalStateException();
4990
    }
4991
 
4992
    public boolean isSet(int fieldID) {
4993
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4994
    }
4995
 
4996
    @Override
4997
    public boolean equals(Object that) {
4998
      if (that == null)
4999
        return false;
5000
      if (that instanceof getTransactionsForShoppingCartId_result)
5001
        return this.equals((getTransactionsForShoppingCartId_result)that);
5002
      return false;
5003
    }
5004
 
5005
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5006
      if (that == null)
5007
        return false;
5008
 
5009
      boolean this_present_success = true && this.isSetSuccess();
5010
      boolean that_present_success = true && that.isSetSuccess();
5011
      if (this_present_success || that_present_success) {
5012
        if (!(this_present_success && that_present_success))
5013
          return false;
5014
        if (!this.success.equals(that.success))
5015
          return false;
5016
      }
5017
 
5018
      boolean this_present_ex = true && this.isSetEx();
5019
      boolean that_present_ex = true && that.isSetEx();
5020
      if (this_present_ex || that_present_ex) {
5021
        if (!(this_present_ex && that_present_ex))
5022
          return false;
5023
        if (!this.ex.equals(that.ex))
5024
          return false;
5025
      }
5026
 
5027
      return true;
5028
    }
5029
 
5030
    @Override
5031
    public int hashCode() {
5032
      return 0;
5033
    }
5034
 
684 chandransh 5035
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5036
      if (!getClass().equals(other.getClass())) {
5037
        return getClass().getName().compareTo(other.getClass().getName());
5038
      }
5039
 
5040
      int lastComparison = 0;
5041
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5042
 
5043
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5044
      if (lastComparison != 0) {
5045
        return lastComparison;
5046
      }
5047
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5048
      if (lastComparison != 0) {
5049
        return lastComparison;
5050
      }
5051
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5052
      if (lastComparison != 0) {
5053
        return lastComparison;
5054
      }
5055
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5056
      if (lastComparison != 0) {
5057
        return lastComparison;
5058
      }
5059
      return 0;
5060
    }
5061
 
132 ashish 5062
    public void read(TProtocol iprot) throws TException {
5063
      TField field;
5064
      iprot.readStructBegin();
5065
      while (true)
5066
      {
5067
        field = iprot.readFieldBegin();
5068
        if (field.type == TType.STOP) { 
5069
          break;
5070
        }
5071
        _Fields fieldId = _Fields.findByThriftId(field.id);
5072
        if (fieldId == null) {
5073
          TProtocolUtil.skip(iprot, field.type);
5074
        } else {
5075
          switch (fieldId) {
5076
            case SUCCESS:
5077
              if (field.type == TType.LIST) {
5078
                {
684 chandransh 5079
                  TList _list12 = iprot.readListBegin();
5080
                  this.success = new ArrayList<Transaction>(_list12.size);
5081
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5082
                  {
684 chandransh 5083
                    Transaction _elem14;
5084
                    _elem14 = new Transaction();
5085
                    _elem14.read(iprot);
5086
                    this.success.add(_elem14);
132 ashish 5087
                  }
5088
                  iprot.readListEnd();
5089
                }
5090
              } else { 
5091
                TProtocolUtil.skip(iprot, field.type);
5092
              }
5093
              break;
5094
            case EX:
5095
              if (field.type == TType.STRUCT) {
5096
                this.ex = new TransactionServiceException();
5097
                this.ex.read(iprot);
5098
              } else { 
5099
                TProtocolUtil.skip(iprot, field.type);
5100
              }
5101
              break;
5102
          }
5103
          iprot.readFieldEnd();
5104
        }
5105
      }
5106
      iprot.readStructEnd();
5107
      validate();
5108
    }
5109
 
5110
    public void write(TProtocol oprot) throws TException {
5111
      oprot.writeStructBegin(STRUCT_DESC);
5112
 
5113
      if (this.isSetSuccess()) {
5114
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5115
        {
5116
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5117
          for (Transaction _iter15 : this.success)
132 ashish 5118
          {
684 chandransh 5119
            _iter15.write(oprot);
132 ashish 5120
          }
5121
          oprot.writeListEnd();
5122
        }
5123
        oprot.writeFieldEnd();
5124
      } else if (this.isSetEx()) {
5125
        oprot.writeFieldBegin(EX_FIELD_DESC);
5126
        this.ex.write(oprot);
5127
        oprot.writeFieldEnd();
5128
      }
5129
      oprot.writeFieldStop();
5130
      oprot.writeStructEnd();
5131
    }
5132
 
5133
    @Override
5134
    public String toString() {
5135
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5136
      boolean first = true;
5137
 
5138
      sb.append("success:");
5139
      if (this.success == null) {
5140
        sb.append("null");
5141
      } else {
5142
        sb.append(this.success);
5143
      }
5144
      first = false;
5145
      if (!first) sb.append(", ");
5146
      sb.append("ex:");
5147
      if (this.ex == null) {
5148
        sb.append("null");
5149
      } else {
5150
        sb.append(this.ex);
5151
      }
5152
      first = false;
5153
      sb.append(")");
5154
      return sb.toString();
5155
    }
5156
 
5157
    public void validate() throws TException {
5158
      // check for required fields
5159
    }
5160
 
5161
  }
5162
 
68 ashish 5163
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5164
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5165
 
5166
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5167
 
5168
    private long transactionId;
5169
 
5170
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5171
    public enum _Fields implements TFieldIdEnum {
5172
      TRANSACTION_ID((short)1, "transactionId");
5173
 
5174
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5175
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5176
 
5177
      static {
5178
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5179
          byId.put((int)field._thriftId, field);
5180
          byName.put(field.getFieldName(), field);
5181
        }
5182
      }
5183
 
5184
      /**
5185
       * Find the _Fields constant that matches fieldId, or null if its not found.
5186
       */
5187
      public static _Fields findByThriftId(int fieldId) {
5188
        return byId.get(fieldId);
5189
      }
5190
 
5191
      /**
5192
       * Find the _Fields constant that matches fieldId, throwing an exception
5193
       * if it is not found.
5194
       */
5195
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5196
        _Fields fields = findByThriftId(fieldId);
5197
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5198
        return fields;
5199
      }
5200
 
5201
      /**
5202
       * Find the _Fields constant that matches name, or null if its not found.
5203
       */
5204
      public static _Fields findByName(String name) {
5205
        return byName.get(name);
5206
      }
5207
 
5208
      private final short _thriftId;
5209
      private final String _fieldName;
5210
 
5211
      _Fields(short thriftId, String fieldName) {
5212
        _thriftId = thriftId;
5213
        _fieldName = fieldName;
5214
      }
5215
 
5216
      public short getThriftFieldId() {
5217
        return _thriftId;
5218
      }
5219
 
5220
      public String getFieldName() {
5221
        return _fieldName;
5222
      }
5223
    }
5224
 
5225
    // isset id assignments
5226
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5227
    private BitSet __isset_bit_vector = new BitSet(1);
5228
 
5229
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5230
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5231
          new FieldValueMetaData(TType.I64)));
5232
    }});
5233
 
5234
    static {
5235
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5236
    }
5237
 
5238
    public getTransactionStatus_args() {
5239
    }
5240
 
5241
    public getTransactionStatus_args(
5242
      long transactionId)
5243
    {
5244
      this();
5245
      this.transactionId = transactionId;
5246
      setTransactionIdIsSet(true);
5247
    }
5248
 
5249
    /**
5250
     * Performs a deep copy on <i>other</i>.
5251
     */
5252
    public getTransactionStatus_args(getTransactionStatus_args other) {
5253
      __isset_bit_vector.clear();
5254
      __isset_bit_vector.or(other.__isset_bit_vector);
5255
      this.transactionId = other.transactionId;
5256
    }
5257
 
5258
    public getTransactionStatus_args deepCopy() {
5259
      return new getTransactionStatus_args(this);
5260
    }
5261
 
5262
    @Deprecated
5263
    public getTransactionStatus_args clone() {
5264
      return new getTransactionStatus_args(this);
5265
    }
5266
 
5267
    public long getTransactionId() {
5268
      return this.transactionId;
5269
    }
5270
 
5271
    public getTransactionStatus_args setTransactionId(long transactionId) {
5272
      this.transactionId = transactionId;
5273
      setTransactionIdIsSet(true);
5274
      return this;
5275
    }
5276
 
5277
    public void unsetTransactionId() {
5278
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5279
    }
5280
 
5281
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5282
    public boolean isSetTransactionId() {
5283
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5284
    }
5285
 
5286
    public void setTransactionIdIsSet(boolean value) {
5287
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5288
    }
5289
 
5290
    public void setFieldValue(_Fields field, Object value) {
5291
      switch (field) {
5292
      case TRANSACTION_ID:
5293
        if (value == null) {
5294
          unsetTransactionId();
5295
        } else {
5296
          setTransactionId((Long)value);
5297
        }
5298
        break;
5299
 
5300
      }
5301
    }
5302
 
5303
    public void setFieldValue(int fieldID, Object value) {
5304
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5305
    }
5306
 
5307
    public Object getFieldValue(_Fields field) {
5308
      switch (field) {
5309
      case TRANSACTION_ID:
5310
        return new Long(getTransactionId());
5311
 
5312
      }
5313
      throw new IllegalStateException();
5314
    }
5315
 
5316
    public Object getFieldValue(int fieldId) {
5317
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5318
    }
5319
 
5320
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5321
    public boolean isSet(_Fields field) {
5322
      switch (field) {
5323
      case TRANSACTION_ID:
5324
        return isSetTransactionId();
5325
      }
5326
      throw new IllegalStateException();
5327
    }
5328
 
5329
    public boolean isSet(int fieldID) {
5330
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5331
    }
5332
 
5333
    @Override
5334
    public boolean equals(Object that) {
5335
      if (that == null)
5336
        return false;
5337
      if (that instanceof getTransactionStatus_args)
5338
        return this.equals((getTransactionStatus_args)that);
5339
      return false;
5340
    }
5341
 
5342
    public boolean equals(getTransactionStatus_args that) {
5343
      if (that == null)
5344
        return false;
5345
 
5346
      boolean this_present_transactionId = true;
5347
      boolean that_present_transactionId = true;
5348
      if (this_present_transactionId || that_present_transactionId) {
5349
        if (!(this_present_transactionId && that_present_transactionId))
5350
          return false;
5351
        if (this.transactionId != that.transactionId)
5352
          return false;
5353
      }
5354
 
5355
      return true;
5356
    }
5357
 
5358
    @Override
5359
    public int hashCode() {
5360
      return 0;
5361
    }
5362
 
5363
    public int compareTo(getTransactionStatus_args other) {
5364
      if (!getClass().equals(other.getClass())) {
5365
        return getClass().getName().compareTo(other.getClass().getName());
5366
      }
5367
 
5368
      int lastComparison = 0;
5369
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5370
 
5371
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5372
      if (lastComparison != 0) {
5373
        return lastComparison;
5374
      }
5375
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5376
      if (lastComparison != 0) {
5377
        return lastComparison;
5378
      }
5379
      return 0;
5380
    }
5381
 
5382
    public void read(TProtocol iprot) throws TException {
5383
      TField field;
5384
      iprot.readStructBegin();
5385
      while (true)
5386
      {
5387
        field = iprot.readFieldBegin();
5388
        if (field.type == TType.STOP) { 
5389
          break;
5390
        }
5391
        _Fields fieldId = _Fields.findByThriftId(field.id);
5392
        if (fieldId == null) {
5393
          TProtocolUtil.skip(iprot, field.type);
5394
        } else {
5395
          switch (fieldId) {
5396
            case TRANSACTION_ID:
5397
              if (field.type == TType.I64) {
5398
                this.transactionId = iprot.readI64();
5399
                setTransactionIdIsSet(true);
5400
              } else { 
5401
                TProtocolUtil.skip(iprot, field.type);
5402
              }
5403
              break;
5404
          }
5405
          iprot.readFieldEnd();
5406
        }
5407
      }
5408
      iprot.readStructEnd();
5409
      validate();
5410
    }
5411
 
5412
    public void write(TProtocol oprot) throws TException {
5413
      validate();
5414
 
5415
      oprot.writeStructBegin(STRUCT_DESC);
5416
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5417
      oprot.writeI64(this.transactionId);
5418
      oprot.writeFieldEnd();
5419
      oprot.writeFieldStop();
5420
      oprot.writeStructEnd();
5421
    }
5422
 
5423
    @Override
5424
    public String toString() {
5425
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5426
      boolean first = true;
5427
 
5428
      sb.append("transactionId:");
5429
      sb.append(this.transactionId);
5430
      first = false;
5431
      sb.append(")");
5432
      return sb.toString();
5433
    }
5434
 
5435
    public void validate() throws TException {
5436
      // check for required fields
5437
    }
5438
 
5439
  }
5440
 
5441
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5442
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5443
 
5444
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5445
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5446
 
5447
    private TransactionStatus success;
5448
    private TransactionServiceException ex;
5449
 
5450
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5451
    public enum _Fields implements TFieldIdEnum {
5452
      /**
5453
       * 
5454
       * @see TransactionStatus
5455
       */
5456
      SUCCESS((short)0, "success"),
5457
      EX((short)1, "ex");
5458
 
5459
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5460
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5461
 
5462
      static {
5463
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5464
          byId.put((int)field._thriftId, field);
5465
          byName.put(field.getFieldName(), field);
5466
        }
5467
      }
5468
 
5469
      /**
5470
       * Find the _Fields constant that matches fieldId, or null if its not found.
5471
       */
5472
      public static _Fields findByThriftId(int fieldId) {
5473
        return byId.get(fieldId);
5474
      }
5475
 
5476
      /**
5477
       * Find the _Fields constant that matches fieldId, throwing an exception
5478
       * if it is not found.
5479
       */
5480
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5481
        _Fields fields = findByThriftId(fieldId);
5482
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5483
        return fields;
5484
      }
5485
 
5486
      /**
5487
       * Find the _Fields constant that matches name, or null if its not found.
5488
       */
5489
      public static _Fields findByName(String name) {
5490
        return byName.get(name);
5491
      }
5492
 
5493
      private final short _thriftId;
5494
      private final String _fieldName;
5495
 
5496
      _Fields(short thriftId, String fieldName) {
5497
        _thriftId = thriftId;
5498
        _fieldName = fieldName;
5499
      }
5500
 
5501
      public short getThriftFieldId() {
5502
        return _thriftId;
5503
      }
5504
 
5505
      public String getFieldName() {
5506
        return _fieldName;
5507
      }
5508
    }
5509
 
5510
    // isset id assignments
5511
 
5512
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5513
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5514
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5515
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5516
          new FieldValueMetaData(TType.STRUCT)));
5517
    }});
5518
 
5519
    static {
5520
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5521
    }
5522
 
5523
    public getTransactionStatus_result() {
5524
    }
5525
 
5526
    public getTransactionStatus_result(
5527
      TransactionStatus success,
5528
      TransactionServiceException ex)
5529
    {
5530
      this();
5531
      this.success = success;
5532
      this.ex = ex;
5533
    }
5534
 
5535
    /**
5536
     * Performs a deep copy on <i>other</i>.
5537
     */
5538
    public getTransactionStatus_result(getTransactionStatus_result other) {
5539
      if (other.isSetSuccess()) {
5540
        this.success = other.success;
5541
      }
5542
      if (other.isSetEx()) {
5543
        this.ex = new TransactionServiceException(other.ex);
5544
      }
5545
    }
5546
 
5547
    public getTransactionStatus_result deepCopy() {
5548
      return new getTransactionStatus_result(this);
5549
    }
5550
 
5551
    @Deprecated
5552
    public getTransactionStatus_result clone() {
5553
      return new getTransactionStatus_result(this);
5554
    }
5555
 
5556
    /**
5557
     * 
5558
     * @see TransactionStatus
5559
     */
5560
    public TransactionStatus getSuccess() {
5561
      return this.success;
5562
    }
5563
 
5564
    /**
5565
     * 
5566
     * @see TransactionStatus
5567
     */
5568
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5569
      this.success = success;
5570
      return this;
5571
    }
5572
 
5573
    public void unsetSuccess() {
5574
      this.success = null;
5575
    }
5576
 
5577
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5578
    public boolean isSetSuccess() {
5579
      return this.success != null;
5580
    }
5581
 
5582
    public void setSuccessIsSet(boolean value) {
5583
      if (!value) {
5584
        this.success = null;
5585
      }
5586
    }
5587
 
5588
    public TransactionServiceException getEx() {
5589
      return this.ex;
5590
    }
5591
 
5592
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5593
      this.ex = ex;
5594
      return this;
5595
    }
5596
 
5597
    public void unsetEx() {
5598
      this.ex = null;
5599
    }
5600
 
5601
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5602
    public boolean isSetEx() {
5603
      return this.ex != null;
5604
    }
5605
 
5606
    public void setExIsSet(boolean value) {
5607
      if (!value) {
5608
        this.ex = null;
5609
      }
5610
    }
5611
 
5612
    public void setFieldValue(_Fields field, Object value) {
5613
      switch (field) {
5614
      case SUCCESS:
5615
        if (value == null) {
5616
          unsetSuccess();
5617
        } else {
5618
          setSuccess((TransactionStatus)value);
5619
        }
5620
        break;
5621
 
5622
      case EX:
5623
        if (value == null) {
5624
          unsetEx();
5625
        } else {
5626
          setEx((TransactionServiceException)value);
5627
        }
5628
        break;
5629
 
5630
      }
5631
    }
5632
 
5633
    public void setFieldValue(int fieldID, Object value) {
5634
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5635
    }
5636
 
5637
    public Object getFieldValue(_Fields field) {
5638
      switch (field) {
5639
      case SUCCESS:
5640
        return getSuccess();
5641
 
5642
      case EX:
5643
        return getEx();
5644
 
5645
      }
5646
      throw new IllegalStateException();
5647
    }
5648
 
5649
    public Object getFieldValue(int fieldId) {
5650
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5651
    }
5652
 
5653
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5654
    public boolean isSet(_Fields field) {
5655
      switch (field) {
5656
      case SUCCESS:
5657
        return isSetSuccess();
5658
      case EX:
5659
        return isSetEx();
5660
      }
5661
      throw new IllegalStateException();
5662
    }
5663
 
5664
    public boolean isSet(int fieldID) {
5665
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5666
    }
5667
 
5668
    @Override
5669
    public boolean equals(Object that) {
5670
      if (that == null)
5671
        return false;
5672
      if (that instanceof getTransactionStatus_result)
5673
        return this.equals((getTransactionStatus_result)that);
5674
      return false;
5675
    }
5676
 
5677
    public boolean equals(getTransactionStatus_result that) {
5678
      if (that == null)
5679
        return false;
5680
 
5681
      boolean this_present_success = true && this.isSetSuccess();
5682
      boolean that_present_success = true && that.isSetSuccess();
5683
      if (this_present_success || that_present_success) {
5684
        if (!(this_present_success && that_present_success))
5685
          return false;
5686
        if (!this.success.equals(that.success))
5687
          return false;
5688
      }
5689
 
5690
      boolean this_present_ex = true && this.isSetEx();
5691
      boolean that_present_ex = true && that.isSetEx();
5692
      if (this_present_ex || that_present_ex) {
5693
        if (!(this_present_ex && that_present_ex))
5694
          return false;
5695
        if (!this.ex.equals(that.ex))
5696
          return false;
5697
      }
5698
 
5699
      return true;
5700
    }
5701
 
5702
    @Override
5703
    public int hashCode() {
5704
      return 0;
5705
    }
5706
 
5707
    public int compareTo(getTransactionStatus_result other) {
5708
      if (!getClass().equals(other.getClass())) {
5709
        return getClass().getName().compareTo(other.getClass().getName());
5710
      }
5711
 
5712
      int lastComparison = 0;
5713
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5714
 
5715
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5716
      if (lastComparison != 0) {
5717
        return lastComparison;
5718
      }
5719
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5720
      if (lastComparison != 0) {
5721
        return lastComparison;
5722
      }
5723
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5724
      if (lastComparison != 0) {
5725
        return lastComparison;
5726
      }
5727
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5728
      if (lastComparison != 0) {
5729
        return lastComparison;
5730
      }
5731
      return 0;
5732
    }
5733
 
5734
    public void read(TProtocol iprot) throws TException {
5735
      TField field;
5736
      iprot.readStructBegin();
5737
      while (true)
5738
      {
5739
        field = iprot.readFieldBegin();
5740
        if (field.type == TType.STOP) { 
5741
          break;
5742
        }
5743
        _Fields fieldId = _Fields.findByThriftId(field.id);
5744
        if (fieldId == null) {
5745
          TProtocolUtil.skip(iprot, field.type);
5746
        } else {
5747
          switch (fieldId) {
5748
            case SUCCESS:
5749
              if (field.type == TType.I32) {
5750
                this.success = TransactionStatus.findByValue(iprot.readI32());
5751
              } else { 
5752
                TProtocolUtil.skip(iprot, field.type);
5753
              }
5754
              break;
5755
            case EX:
5756
              if (field.type == TType.STRUCT) {
5757
                this.ex = new TransactionServiceException();
5758
                this.ex.read(iprot);
5759
              } else { 
5760
                TProtocolUtil.skip(iprot, field.type);
5761
              }
5762
              break;
5763
          }
5764
          iprot.readFieldEnd();
5765
        }
5766
      }
5767
      iprot.readStructEnd();
5768
      validate();
5769
    }
5770
 
5771
    public void write(TProtocol oprot) throws TException {
5772
      oprot.writeStructBegin(STRUCT_DESC);
5773
 
5774
      if (this.isSetSuccess()) {
5775
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5776
        oprot.writeI32(this.success.getValue());
5777
        oprot.writeFieldEnd();
5778
      } else if (this.isSetEx()) {
5779
        oprot.writeFieldBegin(EX_FIELD_DESC);
5780
        this.ex.write(oprot);
5781
        oprot.writeFieldEnd();
5782
      }
5783
      oprot.writeFieldStop();
5784
      oprot.writeStructEnd();
5785
    }
5786
 
5787
    @Override
5788
    public String toString() {
5789
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5790
      boolean first = true;
5791
 
5792
      sb.append("success:");
5793
      if (this.success == null) {
5794
        sb.append("null");
5795
      } else {
5796
        String success_name = success.name();
5797
        if (success_name != null) {
5798
          sb.append(success_name);
5799
          sb.append(" (");
5800
        }
5801
        sb.append(this.success);
5802
        if (success_name != null) {
5803
          sb.append(")");
5804
        }
5805
      }
5806
      first = false;
5807
      if (!first) sb.append(", ");
5808
      sb.append("ex:");
5809
      if (this.ex == null) {
5810
        sb.append("null");
5811
      } else {
5812
        sb.append(this.ex);
5813
      }
5814
      first = false;
5815
      sb.append(")");
5816
      return sb.toString();
5817
    }
5818
 
5819
    public void validate() throws TException {
5820
      // check for required fields
5821
    }
5822
 
5823
  }
5824
 
5825
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5826
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5827
 
5828
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5829
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5830
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5831
 
5832
    private long transactionId;
5833
    private TransactionStatus status;
5834
    private String description;
5835
 
5836
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5837
    public enum _Fields implements TFieldIdEnum {
5838
      TRANSACTION_ID((short)1, "transactionId"),
5839
      /**
5840
       * 
5841
       * @see TransactionStatus
5842
       */
5843
      STATUS((short)2, "status"),
5844
      DESCRIPTION((short)3, "description");
5845
 
5846
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5847
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5848
 
5849
      static {
5850
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5851
          byId.put((int)field._thriftId, field);
5852
          byName.put(field.getFieldName(), field);
5853
        }
5854
      }
5855
 
5856
      /**
5857
       * Find the _Fields constant that matches fieldId, or null if its not found.
5858
       */
5859
      public static _Fields findByThriftId(int fieldId) {
5860
        return byId.get(fieldId);
5861
      }
5862
 
5863
      /**
5864
       * Find the _Fields constant that matches fieldId, throwing an exception
5865
       * if it is not found.
5866
       */
5867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5868
        _Fields fields = findByThriftId(fieldId);
5869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5870
        return fields;
5871
      }
5872
 
5873
      /**
5874
       * Find the _Fields constant that matches name, or null if its not found.
5875
       */
5876
      public static _Fields findByName(String name) {
5877
        return byName.get(name);
5878
      }
5879
 
5880
      private final short _thriftId;
5881
      private final String _fieldName;
5882
 
5883
      _Fields(short thriftId, String fieldName) {
5884
        _thriftId = thriftId;
5885
        _fieldName = fieldName;
5886
      }
5887
 
5888
      public short getThriftFieldId() {
5889
        return _thriftId;
5890
      }
5891
 
5892
      public String getFieldName() {
5893
        return _fieldName;
5894
      }
5895
    }
5896
 
5897
    // isset id assignments
5898
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5899
    private BitSet __isset_bit_vector = new BitSet(1);
5900
 
5901
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5902
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5903
          new FieldValueMetaData(TType.I64)));
5904
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5905
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5906
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
5907
          new FieldValueMetaData(TType.STRING)));
5908
    }});
5909
 
5910
    static {
5911
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
5912
    }
5913
 
5914
    public changeTransactionStatus_args() {
5915
    }
5916
 
5917
    public changeTransactionStatus_args(
5918
      long transactionId,
5919
      TransactionStatus status,
5920
      String description)
5921
    {
5922
      this();
5923
      this.transactionId = transactionId;
5924
      setTransactionIdIsSet(true);
5925
      this.status = status;
5926
      this.description = description;
5927
    }
5928
 
5929
    /**
5930
     * Performs a deep copy on <i>other</i>.
5931
     */
5932
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
5933
      __isset_bit_vector.clear();
5934
      __isset_bit_vector.or(other.__isset_bit_vector);
5935
      this.transactionId = other.transactionId;
5936
      if (other.isSetStatus()) {
5937
        this.status = other.status;
5938
      }
5939
      if (other.isSetDescription()) {
5940
        this.description = other.description;
5941
      }
5942
    }
5943
 
5944
    public changeTransactionStatus_args deepCopy() {
5945
      return new changeTransactionStatus_args(this);
5946
    }
5947
 
5948
    @Deprecated
5949
    public changeTransactionStatus_args clone() {
5950
      return new changeTransactionStatus_args(this);
5951
    }
5952
 
5953
    public long getTransactionId() {
5954
      return this.transactionId;
5955
    }
5956
 
5957
    public changeTransactionStatus_args setTransactionId(long transactionId) {
5958
      this.transactionId = transactionId;
5959
      setTransactionIdIsSet(true);
5960
      return this;
5961
    }
5962
 
5963
    public void unsetTransactionId() {
5964
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5965
    }
5966
 
5967
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5968
    public boolean isSetTransactionId() {
5969
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5970
    }
5971
 
5972
    public void setTransactionIdIsSet(boolean value) {
5973
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5974
    }
5975
 
5976
    /**
5977
     * 
5978
     * @see TransactionStatus
5979
     */
5980
    public TransactionStatus getStatus() {
5981
      return this.status;
5982
    }
5983
 
5984
    /**
5985
     * 
5986
     * @see TransactionStatus
5987
     */
5988
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
5989
      this.status = status;
5990
      return this;
5991
    }
5992
 
5993
    public void unsetStatus() {
5994
      this.status = null;
5995
    }
5996
 
5997
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5998
    public boolean isSetStatus() {
5999
      return this.status != null;
6000
    }
6001
 
6002
    public void setStatusIsSet(boolean value) {
6003
      if (!value) {
6004
        this.status = null;
6005
      }
6006
    }
6007
 
6008
    public String getDescription() {
6009
      return this.description;
6010
    }
6011
 
6012
    public changeTransactionStatus_args setDescription(String description) {
6013
      this.description = description;
6014
      return this;
6015
    }
6016
 
6017
    public void unsetDescription() {
6018
      this.description = null;
6019
    }
6020
 
6021
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6022
    public boolean isSetDescription() {
6023
      return this.description != null;
6024
    }
6025
 
6026
    public void setDescriptionIsSet(boolean value) {
6027
      if (!value) {
6028
        this.description = null;
6029
      }
6030
    }
6031
 
6032
    public void setFieldValue(_Fields field, Object value) {
6033
      switch (field) {
6034
      case TRANSACTION_ID:
6035
        if (value == null) {
6036
          unsetTransactionId();
6037
        } else {
6038
          setTransactionId((Long)value);
6039
        }
6040
        break;
6041
 
6042
      case STATUS:
6043
        if (value == null) {
6044
          unsetStatus();
6045
        } else {
6046
          setStatus((TransactionStatus)value);
6047
        }
6048
        break;
6049
 
6050
      case DESCRIPTION:
6051
        if (value == null) {
6052
          unsetDescription();
6053
        } else {
6054
          setDescription((String)value);
6055
        }
6056
        break;
6057
 
6058
      }
6059
    }
6060
 
6061
    public void setFieldValue(int fieldID, Object value) {
6062
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6063
    }
6064
 
6065
    public Object getFieldValue(_Fields field) {
6066
      switch (field) {
6067
      case TRANSACTION_ID:
6068
        return new Long(getTransactionId());
6069
 
6070
      case STATUS:
6071
        return getStatus();
6072
 
6073
      case DESCRIPTION:
6074
        return getDescription();
6075
 
6076
      }
6077
      throw new IllegalStateException();
6078
    }
6079
 
6080
    public Object getFieldValue(int fieldId) {
6081
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6082
    }
6083
 
6084
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6085
    public boolean isSet(_Fields field) {
6086
      switch (field) {
6087
      case TRANSACTION_ID:
6088
        return isSetTransactionId();
6089
      case STATUS:
6090
        return isSetStatus();
6091
      case DESCRIPTION:
6092
        return isSetDescription();
6093
      }
6094
      throw new IllegalStateException();
6095
    }
6096
 
6097
    public boolean isSet(int fieldID) {
6098
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6099
    }
6100
 
6101
    @Override
6102
    public boolean equals(Object that) {
6103
      if (that == null)
6104
        return false;
6105
      if (that instanceof changeTransactionStatus_args)
6106
        return this.equals((changeTransactionStatus_args)that);
6107
      return false;
6108
    }
6109
 
6110
    public boolean equals(changeTransactionStatus_args that) {
6111
      if (that == null)
6112
        return false;
6113
 
6114
      boolean this_present_transactionId = true;
6115
      boolean that_present_transactionId = true;
6116
      if (this_present_transactionId || that_present_transactionId) {
6117
        if (!(this_present_transactionId && that_present_transactionId))
6118
          return false;
6119
        if (this.transactionId != that.transactionId)
6120
          return false;
6121
      }
6122
 
6123
      boolean this_present_status = true && this.isSetStatus();
6124
      boolean that_present_status = true && that.isSetStatus();
6125
      if (this_present_status || that_present_status) {
6126
        if (!(this_present_status && that_present_status))
6127
          return false;
6128
        if (!this.status.equals(that.status))
6129
          return false;
6130
      }
6131
 
6132
      boolean this_present_description = true && this.isSetDescription();
6133
      boolean that_present_description = true && that.isSetDescription();
6134
      if (this_present_description || that_present_description) {
6135
        if (!(this_present_description && that_present_description))
6136
          return false;
6137
        if (!this.description.equals(that.description))
6138
          return false;
6139
      }
6140
 
6141
      return true;
6142
    }
6143
 
6144
    @Override
6145
    public int hashCode() {
6146
      return 0;
6147
    }
6148
 
6149
    public int compareTo(changeTransactionStatus_args other) {
6150
      if (!getClass().equals(other.getClass())) {
6151
        return getClass().getName().compareTo(other.getClass().getName());
6152
      }
6153
 
6154
      int lastComparison = 0;
6155
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6156
 
6157
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6158
      if (lastComparison != 0) {
6159
        return lastComparison;
6160
      }
6161
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6162
      if (lastComparison != 0) {
6163
        return lastComparison;
6164
      }
6165
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6166
      if (lastComparison != 0) {
6167
        return lastComparison;
6168
      }
6169
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6170
      if (lastComparison != 0) {
6171
        return lastComparison;
6172
      }
6173
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6174
      if (lastComparison != 0) {
6175
        return lastComparison;
6176
      }
6177
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6178
      if (lastComparison != 0) {
6179
        return lastComparison;
6180
      }
6181
      return 0;
6182
    }
6183
 
6184
    public void read(TProtocol iprot) throws TException {
6185
      TField field;
6186
      iprot.readStructBegin();
6187
      while (true)
6188
      {
6189
        field = iprot.readFieldBegin();
6190
        if (field.type == TType.STOP) { 
6191
          break;
6192
        }
6193
        _Fields fieldId = _Fields.findByThriftId(field.id);
6194
        if (fieldId == null) {
6195
          TProtocolUtil.skip(iprot, field.type);
6196
        } else {
6197
          switch (fieldId) {
6198
            case TRANSACTION_ID:
6199
              if (field.type == TType.I64) {
6200
                this.transactionId = iprot.readI64();
6201
                setTransactionIdIsSet(true);
6202
              } else { 
6203
                TProtocolUtil.skip(iprot, field.type);
6204
              }
6205
              break;
6206
            case STATUS:
6207
              if (field.type == TType.I32) {
6208
                this.status = TransactionStatus.findByValue(iprot.readI32());
6209
              } else { 
6210
                TProtocolUtil.skip(iprot, field.type);
6211
              }
6212
              break;
6213
            case DESCRIPTION:
6214
              if (field.type == TType.STRING) {
6215
                this.description = iprot.readString();
6216
              } else { 
6217
                TProtocolUtil.skip(iprot, field.type);
6218
              }
6219
              break;
6220
          }
6221
          iprot.readFieldEnd();
6222
        }
6223
      }
6224
      iprot.readStructEnd();
6225
      validate();
6226
    }
6227
 
6228
    public void write(TProtocol oprot) throws TException {
6229
      validate();
6230
 
6231
      oprot.writeStructBegin(STRUCT_DESC);
6232
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6233
      oprot.writeI64(this.transactionId);
6234
      oprot.writeFieldEnd();
6235
      if (this.status != null) {
6236
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6237
        oprot.writeI32(this.status.getValue());
6238
        oprot.writeFieldEnd();
6239
      }
6240
      if (this.description != null) {
6241
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6242
        oprot.writeString(this.description);
6243
        oprot.writeFieldEnd();
6244
      }
6245
      oprot.writeFieldStop();
6246
      oprot.writeStructEnd();
6247
    }
6248
 
6249
    @Override
6250
    public String toString() {
6251
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6252
      boolean first = true;
6253
 
6254
      sb.append("transactionId:");
6255
      sb.append(this.transactionId);
6256
      first = false;
6257
      if (!first) sb.append(", ");
6258
      sb.append("status:");
6259
      if (this.status == null) {
6260
        sb.append("null");
6261
      } else {
6262
        String status_name = status.name();
6263
        if (status_name != null) {
6264
          sb.append(status_name);
6265
          sb.append(" (");
6266
        }
6267
        sb.append(this.status);
6268
        if (status_name != null) {
6269
          sb.append(")");
6270
        }
6271
      }
6272
      first = false;
6273
      if (!first) sb.append(", ");
6274
      sb.append("description:");
6275
      if (this.description == null) {
6276
        sb.append("null");
6277
      } else {
6278
        sb.append(this.description);
6279
      }
6280
      first = false;
6281
      sb.append(")");
6282
      return sb.toString();
6283
    }
6284
 
6285
    public void validate() throws TException {
6286
      // check for required fields
6287
    }
6288
 
6289
  }
6290
 
6291
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6292
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6293
 
6294
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6295
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6296
 
6297
    private boolean success;
6298
    private TransactionServiceException ex;
6299
 
6300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6301
    public enum _Fields implements TFieldIdEnum {
6302
      SUCCESS((short)0, "success"),
6303
      EX((short)1, "ex");
6304
 
6305
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6306
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6307
 
6308
      static {
6309
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6310
          byId.put((int)field._thriftId, field);
6311
          byName.put(field.getFieldName(), field);
6312
        }
6313
      }
6314
 
6315
      /**
6316
       * Find the _Fields constant that matches fieldId, or null if its not found.
6317
       */
6318
      public static _Fields findByThriftId(int fieldId) {
6319
        return byId.get(fieldId);
6320
      }
6321
 
6322
      /**
6323
       * Find the _Fields constant that matches fieldId, throwing an exception
6324
       * if it is not found.
6325
       */
6326
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6327
        _Fields fields = findByThriftId(fieldId);
6328
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6329
        return fields;
6330
      }
6331
 
6332
      /**
6333
       * Find the _Fields constant that matches name, or null if its not found.
6334
       */
6335
      public static _Fields findByName(String name) {
6336
        return byName.get(name);
6337
      }
6338
 
6339
      private final short _thriftId;
6340
      private final String _fieldName;
6341
 
6342
      _Fields(short thriftId, String fieldName) {
6343
        _thriftId = thriftId;
6344
        _fieldName = fieldName;
6345
      }
6346
 
6347
      public short getThriftFieldId() {
6348
        return _thriftId;
6349
      }
6350
 
6351
      public String getFieldName() {
6352
        return _fieldName;
6353
      }
6354
    }
6355
 
6356
    // isset id assignments
6357
    private static final int __SUCCESS_ISSET_ID = 0;
6358
    private BitSet __isset_bit_vector = new BitSet(1);
6359
 
6360
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6361
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6362
          new FieldValueMetaData(TType.BOOL)));
6363
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6364
          new FieldValueMetaData(TType.STRUCT)));
6365
    }});
6366
 
6367
    static {
6368
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6369
    }
6370
 
6371
    public changeTransactionStatus_result() {
6372
    }
6373
 
6374
    public changeTransactionStatus_result(
6375
      boolean success,
6376
      TransactionServiceException ex)
6377
    {
6378
      this();
6379
      this.success = success;
6380
      setSuccessIsSet(true);
6381
      this.ex = ex;
6382
    }
6383
 
6384
    /**
6385
     * Performs a deep copy on <i>other</i>.
6386
     */
6387
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6388
      __isset_bit_vector.clear();
6389
      __isset_bit_vector.or(other.__isset_bit_vector);
6390
      this.success = other.success;
6391
      if (other.isSetEx()) {
6392
        this.ex = new TransactionServiceException(other.ex);
6393
      }
6394
    }
6395
 
6396
    public changeTransactionStatus_result deepCopy() {
6397
      return new changeTransactionStatus_result(this);
6398
    }
6399
 
6400
    @Deprecated
6401
    public changeTransactionStatus_result clone() {
6402
      return new changeTransactionStatus_result(this);
6403
    }
6404
 
6405
    public boolean isSuccess() {
6406
      return this.success;
6407
    }
6408
 
6409
    public changeTransactionStatus_result setSuccess(boolean success) {
6410
      this.success = success;
6411
      setSuccessIsSet(true);
6412
      return this;
6413
    }
6414
 
6415
    public void unsetSuccess() {
6416
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6417
    }
6418
 
6419
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6420
    public boolean isSetSuccess() {
6421
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6422
    }
6423
 
6424
    public void setSuccessIsSet(boolean value) {
6425
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6426
    }
6427
 
6428
    public TransactionServiceException getEx() {
6429
      return this.ex;
6430
    }
6431
 
6432
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6433
      this.ex = ex;
6434
      return this;
6435
    }
6436
 
6437
    public void unsetEx() {
6438
      this.ex = null;
6439
    }
6440
 
6441
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6442
    public boolean isSetEx() {
6443
      return this.ex != null;
6444
    }
6445
 
6446
    public void setExIsSet(boolean value) {
6447
      if (!value) {
6448
        this.ex = null;
6449
      }
6450
    }
6451
 
6452
    public void setFieldValue(_Fields field, Object value) {
6453
      switch (field) {
6454
      case SUCCESS:
6455
        if (value == null) {
6456
          unsetSuccess();
6457
        } else {
6458
          setSuccess((Boolean)value);
6459
        }
6460
        break;
6461
 
6462
      case EX:
6463
        if (value == null) {
6464
          unsetEx();
6465
        } else {
6466
          setEx((TransactionServiceException)value);
6467
        }
6468
        break;
6469
 
6470
      }
6471
    }
6472
 
6473
    public void setFieldValue(int fieldID, Object value) {
6474
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6475
    }
6476
 
6477
    public Object getFieldValue(_Fields field) {
6478
      switch (field) {
6479
      case SUCCESS:
6480
        return new Boolean(isSuccess());
6481
 
6482
      case EX:
6483
        return getEx();
6484
 
6485
      }
6486
      throw new IllegalStateException();
6487
    }
6488
 
6489
    public Object getFieldValue(int fieldId) {
6490
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6491
    }
6492
 
6493
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6494
    public boolean isSet(_Fields field) {
6495
      switch (field) {
6496
      case SUCCESS:
6497
        return isSetSuccess();
6498
      case EX:
6499
        return isSetEx();
6500
      }
6501
      throw new IllegalStateException();
6502
    }
6503
 
6504
    public boolean isSet(int fieldID) {
6505
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6506
    }
6507
 
6508
    @Override
6509
    public boolean equals(Object that) {
6510
      if (that == null)
6511
        return false;
6512
      if (that instanceof changeTransactionStatus_result)
6513
        return this.equals((changeTransactionStatus_result)that);
6514
      return false;
6515
    }
6516
 
6517
    public boolean equals(changeTransactionStatus_result that) {
6518
      if (that == null)
6519
        return false;
6520
 
6521
      boolean this_present_success = true;
6522
      boolean that_present_success = true;
6523
      if (this_present_success || that_present_success) {
6524
        if (!(this_present_success && that_present_success))
6525
          return false;
6526
        if (this.success != that.success)
6527
          return false;
6528
      }
6529
 
6530
      boolean this_present_ex = true && this.isSetEx();
6531
      boolean that_present_ex = true && that.isSetEx();
6532
      if (this_present_ex || that_present_ex) {
6533
        if (!(this_present_ex && that_present_ex))
6534
          return false;
6535
        if (!this.ex.equals(that.ex))
6536
          return false;
6537
      }
6538
 
6539
      return true;
6540
    }
6541
 
6542
    @Override
6543
    public int hashCode() {
6544
      return 0;
6545
    }
6546
 
6547
    public int compareTo(changeTransactionStatus_result other) {
6548
      if (!getClass().equals(other.getClass())) {
6549
        return getClass().getName().compareTo(other.getClass().getName());
6550
      }
6551
 
6552
      int lastComparison = 0;
6553
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6554
 
6555
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6556
      if (lastComparison != 0) {
6557
        return lastComparison;
6558
      }
6559
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6560
      if (lastComparison != 0) {
6561
        return lastComparison;
6562
      }
6563
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6564
      if (lastComparison != 0) {
6565
        return lastComparison;
6566
      }
6567
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6568
      if (lastComparison != 0) {
6569
        return lastComparison;
6570
      }
6571
      return 0;
6572
    }
6573
 
6574
    public void read(TProtocol iprot) throws TException {
6575
      TField field;
6576
      iprot.readStructBegin();
6577
      while (true)
6578
      {
6579
        field = iprot.readFieldBegin();
6580
        if (field.type == TType.STOP) { 
6581
          break;
6582
        }
6583
        _Fields fieldId = _Fields.findByThriftId(field.id);
6584
        if (fieldId == null) {
6585
          TProtocolUtil.skip(iprot, field.type);
6586
        } else {
6587
          switch (fieldId) {
6588
            case SUCCESS:
6589
              if (field.type == TType.BOOL) {
6590
                this.success = iprot.readBool();
6591
                setSuccessIsSet(true);
6592
              } else { 
6593
                TProtocolUtil.skip(iprot, field.type);
6594
              }
6595
              break;
6596
            case EX:
6597
              if (field.type == TType.STRUCT) {
6598
                this.ex = new TransactionServiceException();
6599
                this.ex.read(iprot);
6600
              } else { 
6601
                TProtocolUtil.skip(iprot, field.type);
6602
              }
6603
              break;
6604
          }
6605
          iprot.readFieldEnd();
6606
        }
6607
      }
6608
      iprot.readStructEnd();
6609
      validate();
6610
    }
6611
 
6612
    public void write(TProtocol oprot) throws TException {
6613
      oprot.writeStructBegin(STRUCT_DESC);
6614
 
6615
      if (this.isSetSuccess()) {
6616
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6617
        oprot.writeBool(this.success);
6618
        oprot.writeFieldEnd();
6619
      } else if (this.isSetEx()) {
6620
        oprot.writeFieldBegin(EX_FIELD_DESC);
6621
        this.ex.write(oprot);
6622
        oprot.writeFieldEnd();
6623
      }
6624
      oprot.writeFieldStop();
6625
      oprot.writeStructEnd();
6626
    }
6627
 
6628
    @Override
6629
    public String toString() {
6630
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6631
      boolean first = true;
6632
 
6633
      sb.append("success:");
6634
      sb.append(this.success);
6635
      first = false;
6636
      if (!first) sb.append(", ");
6637
      sb.append("ex:");
6638
      if (this.ex == null) {
6639
        sb.append("null");
6640
      } else {
6641
        sb.append(this.ex);
6642
      }
6643
      first = false;
6644
      sb.append(")");
6645
      return sb.toString();
6646
    }
6647
 
6648
    public void validate() throws TException {
6649
      // check for required fields
6650
    }
6651
 
6652
  }
6653
 
483 rajveer 6654
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6655
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6656
 
483 rajveer 6657
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6658
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6659
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6660
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6661
 
483 rajveer 6662
    private OrderStatus status;
6663
    private long from_date;
6664
    private long to_date;
6665
    private long warehouse_id;
68 ashish 6666
 
6667
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6668
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6669
      /**
6670
       * 
6671
       * @see OrderStatus
6672
       */
6673
      STATUS((short)1, "status"),
6674
      FROM_DATE((short)2, "from_date"),
6675
      TO_DATE((short)3, "to_date"),
6676
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6677
 
6678
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6680
 
6681
      static {
6682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6683
          byId.put((int)field._thriftId, field);
6684
          byName.put(field.getFieldName(), field);
6685
        }
6686
      }
6687
 
6688
      /**
6689
       * Find the _Fields constant that matches fieldId, or null if its not found.
6690
       */
6691
      public static _Fields findByThriftId(int fieldId) {
6692
        return byId.get(fieldId);
6693
      }
6694
 
6695
      /**
6696
       * Find the _Fields constant that matches fieldId, throwing an exception
6697
       * if it is not found.
6698
       */
6699
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6700
        _Fields fields = findByThriftId(fieldId);
6701
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6702
        return fields;
6703
      }
6704
 
6705
      /**
6706
       * Find the _Fields constant that matches name, or null if its not found.
6707
       */
6708
      public static _Fields findByName(String name) {
6709
        return byName.get(name);
6710
      }
6711
 
6712
      private final short _thriftId;
6713
      private final String _fieldName;
6714
 
6715
      _Fields(short thriftId, String fieldName) {
6716
        _thriftId = thriftId;
6717
        _fieldName = fieldName;
6718
      }
6719
 
6720
      public short getThriftFieldId() {
6721
        return _thriftId;
6722
      }
6723
 
6724
      public String getFieldName() {
6725
        return _fieldName;
6726
      }
6727
    }
6728
 
6729
    // isset id assignments
483 rajveer 6730
    private static final int __FROM_DATE_ISSET_ID = 0;
6731
    private static final int __TO_DATE_ISSET_ID = 1;
6732
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6733
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6734
 
6735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6736
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6737
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6738
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6739
          new FieldValueMetaData(TType.I64)));
483 rajveer 6740
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6741
          new FieldValueMetaData(TType.I64)));
6742
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6743
          new FieldValueMetaData(TType.I64)));
68 ashish 6744
    }});
6745
 
6746
    static {
483 rajveer 6747
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6748
    }
6749
 
483 rajveer 6750
    public getAllOrders_args() {
68 ashish 6751
    }
6752
 
483 rajveer 6753
    public getAllOrders_args(
6754
      OrderStatus status,
6755
      long from_date,
6756
      long to_date,
6757
      long warehouse_id)
68 ashish 6758
    {
6759
      this();
483 rajveer 6760
      this.status = status;
6761
      this.from_date = from_date;
6762
      setFrom_dateIsSet(true);
6763
      this.to_date = to_date;
6764
      setTo_dateIsSet(true);
6765
      this.warehouse_id = warehouse_id;
6766
      setWarehouse_idIsSet(true);
68 ashish 6767
    }
6768
 
6769
    /**
6770
     * Performs a deep copy on <i>other</i>.
6771
     */
483 rajveer 6772
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6773
      __isset_bit_vector.clear();
6774
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6775
      if (other.isSetStatus()) {
6776
        this.status = other.status;
6777
      }
6778
      this.from_date = other.from_date;
6779
      this.to_date = other.to_date;
6780
      this.warehouse_id = other.warehouse_id;
68 ashish 6781
    }
6782
 
483 rajveer 6783
    public getAllOrders_args deepCopy() {
6784
      return new getAllOrders_args(this);
68 ashish 6785
    }
6786
 
6787
    @Deprecated
483 rajveer 6788
    public getAllOrders_args clone() {
6789
      return new getAllOrders_args(this);
68 ashish 6790
    }
6791
 
483 rajveer 6792
    /**
6793
     * 
6794
     * @see OrderStatus
6795
     */
6796
    public OrderStatus getStatus() {
6797
      return this.status;
68 ashish 6798
    }
6799
 
483 rajveer 6800
    /**
6801
     * 
6802
     * @see OrderStatus
6803
     */
6804
    public getAllOrders_args setStatus(OrderStatus status) {
6805
      this.status = status;
68 ashish 6806
      return this;
6807
    }
6808
 
483 rajveer 6809
    public void unsetStatus() {
6810
      this.status = null;
68 ashish 6811
    }
6812
 
483 rajveer 6813
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6814
    public boolean isSetStatus() {
6815
      return this.status != null;
68 ashish 6816
    }
6817
 
483 rajveer 6818
    public void setStatusIsSet(boolean value) {
6819
      if (!value) {
6820
        this.status = null;
68 ashish 6821
      }
6822
    }
6823
 
483 rajveer 6824
    public long getFrom_date() {
6825
      return this.from_date;
68 ashish 6826
    }
6827
 
483 rajveer 6828
    public getAllOrders_args setFrom_date(long from_date) {
6829
      this.from_date = from_date;
6830
      setFrom_dateIsSet(true);
6831
      return this;
68 ashish 6832
    }
6833
 
483 rajveer 6834
    public void unsetFrom_date() {
6835
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6836
    }
6837
 
483 rajveer 6838
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6839
    public boolean isSetFrom_date() {
6840
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6841
    }
6842
 
483 rajveer 6843
    public void setFrom_dateIsSet(boolean value) {
6844
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6845
    }
6846
 
483 rajveer 6847
    public long getTo_date() {
6848
      return this.to_date;
68 ashish 6849
    }
6850
 
483 rajveer 6851
    public getAllOrders_args setTo_date(long to_date) {
6852
      this.to_date = to_date;
6853
      setTo_dateIsSet(true);
68 ashish 6854
      return this;
6855
    }
6856
 
483 rajveer 6857
    public void unsetTo_date() {
6858
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 6859
    }
6860
 
483 rajveer 6861
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
6862
    public boolean isSetTo_date() {
6863
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 6864
    }
6865
 
483 rajveer 6866
    public void setTo_dateIsSet(boolean value) {
6867
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 6868
    }
6869
 
483 rajveer 6870
    public long getWarehouse_id() {
6871
      return this.warehouse_id;
68 ashish 6872
    }
6873
 
483 rajveer 6874
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
6875
      this.warehouse_id = warehouse_id;
6876
      setWarehouse_idIsSet(true);
68 ashish 6877
      return this;
6878
    }
6879
 
483 rajveer 6880
    public void unsetWarehouse_id() {
6881
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6882
    }
6883
 
483 rajveer 6884
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
6885
    public boolean isSetWarehouse_id() {
6886
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6887
    }
6888
 
483 rajveer 6889
    public void setWarehouse_idIsSet(boolean value) {
6890
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 6891
    }
6892
 
6893
    public void setFieldValue(_Fields field, Object value) {
6894
      switch (field) {
483 rajveer 6895
      case STATUS:
68 ashish 6896
        if (value == null) {
483 rajveer 6897
          unsetStatus();
68 ashish 6898
        } else {
483 rajveer 6899
          setStatus((OrderStatus)value);
68 ashish 6900
        }
6901
        break;
6902
 
483 rajveer 6903
      case FROM_DATE:
68 ashish 6904
        if (value == null) {
483 rajveer 6905
          unsetFrom_date();
68 ashish 6906
        } else {
483 rajveer 6907
          setFrom_date((Long)value);
68 ashish 6908
        }
6909
        break;
6910
 
483 rajveer 6911
      case TO_DATE:
6912
        if (value == null) {
6913
          unsetTo_date();
6914
        } else {
6915
          setTo_date((Long)value);
6916
        }
6917
        break;
6918
 
6919
      case WAREHOUSE_ID:
6920
        if (value == null) {
6921
          unsetWarehouse_id();
6922
        } else {
6923
          setWarehouse_id((Long)value);
6924
        }
6925
        break;
6926
 
68 ashish 6927
      }
6928
    }
6929
 
6930
    public void setFieldValue(int fieldID, Object value) {
6931
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6932
    }
6933
 
6934
    public Object getFieldValue(_Fields field) {
6935
      switch (field) {
483 rajveer 6936
      case STATUS:
6937
        return getStatus();
68 ashish 6938
 
483 rajveer 6939
      case FROM_DATE:
6940
        return new Long(getFrom_date());
68 ashish 6941
 
483 rajveer 6942
      case TO_DATE:
6943
        return new Long(getTo_date());
6944
 
6945
      case WAREHOUSE_ID:
6946
        return new Long(getWarehouse_id());
6947
 
68 ashish 6948
      }
6949
      throw new IllegalStateException();
6950
    }
6951
 
6952
    public Object getFieldValue(int fieldId) {
6953
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6954
    }
6955
 
6956
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6957
    public boolean isSet(_Fields field) {
6958
      switch (field) {
483 rajveer 6959
      case STATUS:
6960
        return isSetStatus();
6961
      case FROM_DATE:
6962
        return isSetFrom_date();
6963
      case TO_DATE:
6964
        return isSetTo_date();
6965
      case WAREHOUSE_ID:
6966
        return isSetWarehouse_id();
68 ashish 6967
      }
6968
      throw new IllegalStateException();
6969
    }
6970
 
6971
    public boolean isSet(int fieldID) {
6972
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6973
    }
6974
 
6975
    @Override
6976
    public boolean equals(Object that) {
6977
      if (that == null)
6978
        return false;
483 rajveer 6979
      if (that instanceof getAllOrders_args)
6980
        return this.equals((getAllOrders_args)that);
68 ashish 6981
      return false;
6982
    }
6983
 
483 rajveer 6984
    public boolean equals(getAllOrders_args that) {
68 ashish 6985
      if (that == null)
6986
        return false;
6987
 
483 rajveer 6988
      boolean this_present_status = true && this.isSetStatus();
6989
      boolean that_present_status = true && that.isSetStatus();
6990
      if (this_present_status || that_present_status) {
6991
        if (!(this_present_status && that_present_status))
68 ashish 6992
          return false;
483 rajveer 6993
        if (!this.status.equals(that.status))
68 ashish 6994
          return false;
6995
      }
6996
 
483 rajveer 6997
      boolean this_present_from_date = true;
6998
      boolean that_present_from_date = true;
6999
      if (this_present_from_date || that_present_from_date) {
7000
        if (!(this_present_from_date && that_present_from_date))
68 ashish 7001
          return false;
483 rajveer 7002
        if (this.from_date != that.from_date)
68 ashish 7003
          return false;
7004
      }
7005
 
483 rajveer 7006
      boolean this_present_to_date = true;
7007
      boolean that_present_to_date = true;
7008
      if (this_present_to_date || that_present_to_date) {
7009
        if (!(this_present_to_date && that_present_to_date))
7010
          return false;
7011
        if (this.to_date != that.to_date)
7012
          return false;
68 ashish 7013
      }
7014
 
483 rajveer 7015
      boolean this_present_warehouse_id = true;
7016
      boolean that_present_warehouse_id = true;
7017
      if (this_present_warehouse_id || that_present_warehouse_id) {
7018
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 7019
          return false;
483 rajveer 7020
        if (this.warehouse_id != that.warehouse_id)
68 ashish 7021
          return false;
7022
      }
7023
 
7024
      return true;
7025
    }
7026
 
7027
    @Override
7028
    public int hashCode() {
7029
      return 0;
7030
    }
7031
 
483 rajveer 7032
    public int compareTo(getAllOrders_args other) {
68 ashish 7033
      if (!getClass().equals(other.getClass())) {
7034
        return getClass().getName().compareTo(other.getClass().getName());
7035
      }
7036
 
7037
      int lastComparison = 0;
483 rajveer 7038
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 7039
 
483 rajveer 7040
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 7041
      if (lastComparison != 0) {
7042
        return lastComparison;
7043
      }
483 rajveer 7044
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 7045
      if (lastComparison != 0) {
7046
        return lastComparison;
7047
      }
483 rajveer 7048
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
7049
      if (lastComparison != 0) {
7050
        return lastComparison;
7051
      }
7052
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
7053
      if (lastComparison != 0) {
7054
        return lastComparison;
7055
      }
7056
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
7057
      if (lastComparison != 0) {
7058
        return lastComparison;
7059
      }
7060
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
7061
      if (lastComparison != 0) {
7062
        return lastComparison;
7063
      }
7064
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
7065
      if (lastComparison != 0) {
7066
        return lastComparison;
7067
      }
7068
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
7069
      if (lastComparison != 0) {
7070
        return lastComparison;
7071
      }
68 ashish 7072
      return 0;
7073
    }
7074
 
7075
    public void read(TProtocol iprot) throws TException {
7076
      TField field;
7077
      iprot.readStructBegin();
7078
      while (true)
7079
      {
7080
        field = iprot.readFieldBegin();
7081
        if (field.type == TType.STOP) { 
7082
          break;
7083
        }
7084
        _Fields fieldId = _Fields.findByThriftId(field.id);
7085
        if (fieldId == null) {
7086
          TProtocolUtil.skip(iprot, field.type);
7087
        } else {
7088
          switch (fieldId) {
483 rajveer 7089
            case STATUS:
7090
              if (field.type == TType.I32) {
7091
                this.status = OrderStatus.findByValue(iprot.readI32());
7092
              } else { 
7093
                TProtocolUtil.skip(iprot, field.type);
7094
              }
7095
              break;
7096
            case FROM_DATE:
68 ashish 7097
              if (field.type == TType.I64) {
483 rajveer 7098
                this.from_date = iprot.readI64();
7099
                setFrom_dateIsSet(true);
68 ashish 7100
              } else { 
7101
                TProtocolUtil.skip(iprot, field.type);
7102
              }
7103
              break;
483 rajveer 7104
            case TO_DATE:
7105
              if (field.type == TType.I64) {
7106
                this.to_date = iprot.readI64();
7107
                setTo_dateIsSet(true);
7108
              } else { 
7109
                TProtocolUtil.skip(iprot, field.type);
7110
              }
7111
              break;
7112
            case WAREHOUSE_ID:
7113
              if (field.type == TType.I64) {
7114
                this.warehouse_id = iprot.readI64();
7115
                setWarehouse_idIsSet(true);
7116
              } else { 
7117
                TProtocolUtil.skip(iprot, field.type);
7118
              }
7119
              break;
68 ashish 7120
          }
7121
          iprot.readFieldEnd();
7122
        }
7123
      }
7124
      iprot.readStructEnd();
7125
      validate();
7126
    }
7127
 
7128
    public void write(TProtocol oprot) throws TException {
7129
      validate();
7130
 
7131
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 7132
      if (this.status != null) {
7133
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7134
        oprot.writeI32(this.status.getValue());
7135
        oprot.writeFieldEnd();
7136
      }
7137
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
7138
      oprot.writeI64(this.from_date);
68 ashish 7139
      oprot.writeFieldEnd();
483 rajveer 7140
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
7141
      oprot.writeI64(this.to_date);
7142
      oprot.writeFieldEnd();
7143
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7144
      oprot.writeI64(this.warehouse_id);
7145
      oprot.writeFieldEnd();
68 ashish 7146
      oprot.writeFieldStop();
7147
      oprot.writeStructEnd();
7148
    }
7149
 
7150
    @Override
7151
    public String toString() {
483 rajveer 7152
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 7153
      boolean first = true;
7154
 
483 rajveer 7155
      sb.append("status:");
7156
      if (this.status == null) {
7157
        sb.append("null");
7158
      } else {
7159
        String status_name = status.name();
7160
        if (status_name != null) {
7161
          sb.append(status_name);
7162
          sb.append(" (");
7163
        }
7164
        sb.append(this.status);
7165
        if (status_name != null) {
7166
          sb.append(")");
7167
        }
7168
      }
68 ashish 7169
      first = false;
483 rajveer 7170
      if (!first) sb.append(", ");
7171
      sb.append("from_date:");
7172
      sb.append(this.from_date);
7173
      first = false;
7174
      if (!first) sb.append(", ");
7175
      sb.append("to_date:");
7176
      sb.append(this.to_date);
7177
      first = false;
7178
      if (!first) sb.append(", ");
7179
      sb.append("warehouse_id:");
7180
      sb.append(this.warehouse_id);
7181
      first = false;
68 ashish 7182
      sb.append(")");
7183
      return sb.toString();
7184
    }
7185
 
7186
    public void validate() throws TException {
7187
      // check for required fields
7188
    }
7189
 
7190
  }
7191
 
483 rajveer 7192
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
7193
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 7194
 
483 rajveer 7195
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 7196
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7197
 
483 rajveer 7198
    private List<Order> success;
68 ashish 7199
    private TransactionServiceException ex;
7200
 
7201
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7202
    public enum _Fields implements TFieldIdEnum {
7203
      SUCCESS((short)0, "success"),
7204
      EX((short)1, "ex");
7205
 
7206
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7207
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7208
 
7209
      static {
7210
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7211
          byId.put((int)field._thriftId, field);
7212
          byName.put(field.getFieldName(), field);
7213
        }
7214
      }
7215
 
7216
      /**
7217
       * Find the _Fields constant that matches fieldId, or null if its not found.
7218
       */
7219
      public static _Fields findByThriftId(int fieldId) {
7220
        return byId.get(fieldId);
7221
      }
7222
 
7223
      /**
7224
       * Find the _Fields constant that matches fieldId, throwing an exception
7225
       * if it is not found.
7226
       */
7227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7228
        _Fields fields = findByThriftId(fieldId);
7229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7230
        return fields;
7231
      }
7232
 
7233
      /**
7234
       * Find the _Fields constant that matches name, or null if its not found.
7235
       */
7236
      public static _Fields findByName(String name) {
7237
        return byName.get(name);
7238
      }
7239
 
7240
      private final short _thriftId;
7241
      private final String _fieldName;
7242
 
7243
      _Fields(short thriftId, String fieldName) {
7244
        _thriftId = thriftId;
7245
        _fieldName = fieldName;
7246
      }
7247
 
7248
      public short getThriftFieldId() {
7249
        return _thriftId;
7250
      }
7251
 
7252
      public String getFieldName() {
7253
        return _fieldName;
7254
      }
7255
    }
7256
 
7257
    // isset id assignments
7258
 
7259
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7260
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 7261
          new ListMetaData(TType.LIST, 
7262
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 7263
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7264
          new FieldValueMetaData(TType.STRUCT)));
7265
    }});
7266
 
7267
    static {
483 rajveer 7268
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 7269
    }
7270
 
483 rajveer 7271
    public getAllOrders_result() {
68 ashish 7272
    }
7273
 
483 rajveer 7274
    public getAllOrders_result(
7275
      List<Order> success,
68 ashish 7276
      TransactionServiceException ex)
7277
    {
7278
      this();
7279
      this.success = success;
7280
      this.ex = ex;
7281
    }
7282
 
7283
    /**
7284
     * Performs a deep copy on <i>other</i>.
7285
     */
483 rajveer 7286
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 7287
      if (other.isSetSuccess()) {
483 rajveer 7288
        List<Order> __this__success = new ArrayList<Order>();
7289
        for (Order other_element : other.success) {
7290
          __this__success.add(new Order(other_element));
7291
        }
7292
        this.success = __this__success;
68 ashish 7293
      }
7294
      if (other.isSetEx()) {
7295
        this.ex = new TransactionServiceException(other.ex);
7296
      }
7297
    }
7298
 
483 rajveer 7299
    public getAllOrders_result deepCopy() {
7300
      return new getAllOrders_result(this);
68 ashish 7301
    }
7302
 
7303
    @Deprecated
483 rajveer 7304
    public getAllOrders_result clone() {
7305
      return new getAllOrders_result(this);
68 ashish 7306
    }
7307
 
483 rajveer 7308
    public int getSuccessSize() {
7309
      return (this.success == null) ? 0 : this.success.size();
7310
    }
7311
 
7312
    public java.util.Iterator<Order> getSuccessIterator() {
7313
      return (this.success == null) ? null : this.success.iterator();
7314
    }
7315
 
7316
    public void addToSuccess(Order elem) {
7317
      if (this.success == null) {
7318
        this.success = new ArrayList<Order>();
7319
      }
7320
      this.success.add(elem);
7321
    }
7322
 
7323
    public List<Order> getSuccess() {
68 ashish 7324
      return this.success;
7325
    }
7326
 
483 rajveer 7327
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 7328
      this.success = success;
7329
      return this;
7330
    }
7331
 
7332
    public void unsetSuccess() {
7333
      this.success = null;
7334
    }
7335
 
7336
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7337
    public boolean isSetSuccess() {
7338
      return this.success != null;
7339
    }
7340
 
7341
    public void setSuccessIsSet(boolean value) {
7342
      if (!value) {
7343
        this.success = null;
7344
      }
7345
    }
7346
 
7347
    public TransactionServiceException getEx() {
7348
      return this.ex;
7349
    }
7350
 
483 rajveer 7351
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 7352
      this.ex = ex;
7353
      return this;
7354
    }
7355
 
7356
    public void unsetEx() {
7357
      this.ex = null;
7358
    }
7359
 
7360
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7361
    public boolean isSetEx() {
7362
      return this.ex != null;
7363
    }
7364
 
7365
    public void setExIsSet(boolean value) {
7366
      if (!value) {
7367
        this.ex = null;
7368
      }
7369
    }
7370
 
7371
    public void setFieldValue(_Fields field, Object value) {
7372
      switch (field) {
7373
      case SUCCESS:
7374
        if (value == null) {
7375
          unsetSuccess();
7376
        } else {
483 rajveer 7377
          setSuccess((List<Order>)value);
68 ashish 7378
        }
7379
        break;
7380
 
7381
      case EX:
7382
        if (value == null) {
7383
          unsetEx();
7384
        } else {
7385
          setEx((TransactionServiceException)value);
7386
        }
7387
        break;
7388
 
7389
      }
7390
    }
7391
 
7392
    public void setFieldValue(int fieldID, Object value) {
7393
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7394
    }
7395
 
7396
    public Object getFieldValue(_Fields field) {
7397
      switch (field) {
7398
      case SUCCESS:
7399
        return getSuccess();
7400
 
7401
      case EX:
7402
        return getEx();
7403
 
7404
      }
7405
      throw new IllegalStateException();
7406
    }
7407
 
7408
    public Object getFieldValue(int fieldId) {
7409
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7410
    }
7411
 
7412
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7413
    public boolean isSet(_Fields field) {
7414
      switch (field) {
7415
      case SUCCESS:
7416
        return isSetSuccess();
7417
      case EX:
7418
        return isSetEx();
7419
      }
7420
      throw new IllegalStateException();
7421
    }
7422
 
7423
    public boolean isSet(int fieldID) {
7424
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7425
    }
7426
 
7427
    @Override
7428
    public boolean equals(Object that) {
7429
      if (that == null)
7430
        return false;
483 rajveer 7431
      if (that instanceof getAllOrders_result)
7432
        return this.equals((getAllOrders_result)that);
68 ashish 7433
      return false;
7434
    }
7435
 
483 rajveer 7436
    public boolean equals(getAllOrders_result that) {
68 ashish 7437
      if (that == null)
7438
        return false;
7439
 
7440
      boolean this_present_success = true && this.isSetSuccess();
7441
      boolean that_present_success = true && that.isSetSuccess();
7442
      if (this_present_success || that_present_success) {
7443
        if (!(this_present_success && that_present_success))
7444
          return false;
7445
        if (!this.success.equals(that.success))
7446
          return false;
7447
      }
7448
 
7449
      boolean this_present_ex = true && this.isSetEx();
7450
      boolean that_present_ex = true && that.isSetEx();
7451
      if (this_present_ex || that_present_ex) {
7452
        if (!(this_present_ex && that_present_ex))
7453
          return false;
7454
        if (!this.ex.equals(that.ex))
7455
          return false;
7456
      }
7457
 
7458
      return true;
7459
    }
7460
 
7461
    @Override
7462
    public int hashCode() {
7463
      return 0;
7464
    }
7465
 
483 rajveer 7466
    public int compareTo(getAllOrders_result other) {
7467
      if (!getClass().equals(other.getClass())) {
7468
        return getClass().getName().compareTo(other.getClass().getName());
7469
      }
7470
 
7471
      int lastComparison = 0;
7472
      getAllOrders_result typedOther = (getAllOrders_result)other;
7473
 
7474
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7475
      if (lastComparison != 0) {
7476
        return lastComparison;
7477
      }
7478
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7479
      if (lastComparison != 0) {
7480
        return lastComparison;
7481
      }
7482
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7483
      if (lastComparison != 0) {
7484
        return lastComparison;
7485
      }
7486
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7487
      if (lastComparison != 0) {
7488
        return lastComparison;
7489
      }
7490
      return 0;
7491
    }
7492
 
68 ashish 7493
    public void read(TProtocol iprot) throws TException {
7494
      TField field;
7495
      iprot.readStructBegin();
7496
      while (true)
7497
      {
7498
        field = iprot.readFieldBegin();
7499
        if (field.type == TType.STOP) { 
7500
          break;
7501
        }
7502
        _Fields fieldId = _Fields.findByThriftId(field.id);
7503
        if (fieldId == null) {
7504
          TProtocolUtil.skip(iprot, field.type);
7505
        } else {
7506
          switch (fieldId) {
7507
            case SUCCESS:
483 rajveer 7508
              if (field.type == TType.LIST) {
7509
                {
684 chandransh 7510
                  TList _list16 = iprot.readListBegin();
7511
                  this.success = new ArrayList<Order>(_list16.size);
7512
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7513
                  {
684 chandransh 7514
                    Order _elem18;
7515
                    _elem18 = new Order();
7516
                    _elem18.read(iprot);
7517
                    this.success.add(_elem18);
483 rajveer 7518
                  }
7519
                  iprot.readListEnd();
7520
                }
68 ashish 7521
              } else { 
7522
                TProtocolUtil.skip(iprot, field.type);
7523
              }
7524
              break;
7525
            case EX:
7526
              if (field.type == TType.STRUCT) {
7527
                this.ex = new TransactionServiceException();
7528
                this.ex.read(iprot);
7529
              } else { 
7530
                TProtocolUtil.skip(iprot, field.type);
7531
              }
7532
              break;
7533
          }
7534
          iprot.readFieldEnd();
7535
        }
7536
      }
7537
      iprot.readStructEnd();
7538
      validate();
7539
    }
7540
 
7541
    public void write(TProtocol oprot) throws TException {
7542
      oprot.writeStructBegin(STRUCT_DESC);
7543
 
7544
      if (this.isSetSuccess()) {
7545
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7546
        {
7547
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7548
          for (Order _iter19 : this.success)
483 rajveer 7549
          {
684 chandransh 7550
            _iter19.write(oprot);
483 rajveer 7551
          }
7552
          oprot.writeListEnd();
7553
        }
68 ashish 7554
        oprot.writeFieldEnd();
7555
      } else if (this.isSetEx()) {
7556
        oprot.writeFieldBegin(EX_FIELD_DESC);
7557
        this.ex.write(oprot);
7558
        oprot.writeFieldEnd();
7559
      }
7560
      oprot.writeFieldStop();
7561
      oprot.writeStructEnd();
7562
    }
7563
 
7564
    @Override
7565
    public String toString() {
483 rajveer 7566
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7567
      boolean first = true;
7568
 
7569
      sb.append("success:");
7570
      if (this.success == null) {
7571
        sb.append("null");
7572
      } else {
7573
        sb.append(this.success);
7574
      }
7575
      first = false;
7576
      if (!first) sb.append(", ");
7577
      sb.append("ex:");
7578
      if (this.ex == null) {
7579
        sb.append("null");
7580
      } else {
7581
        sb.append(this.ex);
7582
      }
7583
      first = false;
7584
      sb.append(")");
7585
      return sb.toString();
7586
    }
7587
 
7588
    public void validate() throws TException {
7589
      // check for required fields
7590
    }
7591
 
7592
  }
7593
 
1022 varun.gupt 7594
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
7595
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
7596
 
7597
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7598
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
7599
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
7600
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
7601
 
7602
    private OrderStatus status;
7603
    private long start_billing_date;
7604
    private long end_billing_date;
7605
    private long warehouse_id;
7606
 
7607
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7608
    public enum _Fields implements TFieldIdEnum {
7609
      /**
7610
       * 
7611
       * @see OrderStatus
7612
       */
7613
      STATUS((short)1, "status"),
7614
      START_BILLING_DATE((short)2, "start_billing_date"),
7615
      END_BILLING_DATE((short)3, "end_billing_date"),
7616
      WAREHOUSE_ID((short)4, "warehouse_id");
7617
 
7618
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7619
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7620
 
7621
      static {
7622
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7623
          byId.put((int)field._thriftId, field);
7624
          byName.put(field.getFieldName(), field);
7625
        }
7626
      }
7627
 
7628
      /**
7629
       * Find the _Fields constant that matches fieldId, or null if its not found.
7630
       */
7631
      public static _Fields findByThriftId(int fieldId) {
7632
        return byId.get(fieldId);
7633
      }
7634
 
7635
      /**
7636
       * Find the _Fields constant that matches fieldId, throwing an exception
7637
       * if it is not found.
7638
       */
7639
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7640
        _Fields fields = findByThriftId(fieldId);
7641
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7642
        return fields;
7643
      }
7644
 
7645
      /**
7646
       * Find the _Fields constant that matches name, or null if its not found.
7647
       */
7648
      public static _Fields findByName(String name) {
7649
        return byName.get(name);
7650
      }
7651
 
7652
      private final short _thriftId;
7653
      private final String _fieldName;
7654
 
7655
      _Fields(short thriftId, String fieldName) {
7656
        _thriftId = thriftId;
7657
        _fieldName = fieldName;
7658
      }
7659
 
7660
      public short getThriftFieldId() {
7661
        return _thriftId;
7662
      }
7663
 
7664
      public String getFieldName() {
7665
        return _fieldName;
7666
      }
7667
    }
7668
 
7669
    // isset id assignments
7670
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
7671
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
7672
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7673
    private BitSet __isset_bit_vector = new BitSet(3);
7674
 
7675
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7676
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7677
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7678
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
7679
          new FieldValueMetaData(TType.I64)));
7680
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
7681
          new FieldValueMetaData(TType.I64)));
7682
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7683
          new FieldValueMetaData(TType.I64)));
7684
    }});
7685
 
7686
    static {
7687
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
7688
    }
7689
 
7690
    public getOrdersByBillingDate_args() {
7691
    }
7692
 
7693
    public getOrdersByBillingDate_args(
7694
      OrderStatus status,
7695
      long start_billing_date,
7696
      long end_billing_date,
7697
      long warehouse_id)
7698
    {
7699
      this();
7700
      this.status = status;
7701
      this.start_billing_date = start_billing_date;
7702
      setStart_billing_dateIsSet(true);
7703
      this.end_billing_date = end_billing_date;
7704
      setEnd_billing_dateIsSet(true);
7705
      this.warehouse_id = warehouse_id;
7706
      setWarehouse_idIsSet(true);
7707
    }
7708
 
7709
    /**
7710
     * Performs a deep copy on <i>other</i>.
7711
     */
7712
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
7713
      __isset_bit_vector.clear();
7714
      __isset_bit_vector.or(other.__isset_bit_vector);
7715
      if (other.isSetStatus()) {
7716
        this.status = other.status;
7717
      }
7718
      this.start_billing_date = other.start_billing_date;
7719
      this.end_billing_date = other.end_billing_date;
7720
      this.warehouse_id = other.warehouse_id;
7721
    }
7722
 
7723
    public getOrdersByBillingDate_args deepCopy() {
7724
      return new getOrdersByBillingDate_args(this);
7725
    }
7726
 
7727
    @Deprecated
7728
    public getOrdersByBillingDate_args clone() {
7729
      return new getOrdersByBillingDate_args(this);
7730
    }
7731
 
7732
    /**
7733
     * 
7734
     * @see OrderStatus
7735
     */
7736
    public OrderStatus getStatus() {
7737
      return this.status;
7738
    }
7739
 
7740
    /**
7741
     * 
7742
     * @see OrderStatus
7743
     */
7744
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
7745
      this.status = status;
7746
      return this;
7747
    }
7748
 
7749
    public void unsetStatus() {
7750
      this.status = null;
7751
    }
7752
 
7753
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7754
    public boolean isSetStatus() {
7755
      return this.status != null;
7756
    }
7757
 
7758
    public void setStatusIsSet(boolean value) {
7759
      if (!value) {
7760
        this.status = null;
7761
      }
7762
    }
7763
 
7764
    public long getStart_billing_date() {
7765
      return this.start_billing_date;
7766
    }
7767
 
7768
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
7769
      this.start_billing_date = start_billing_date;
7770
      setStart_billing_dateIsSet(true);
7771
      return this;
7772
    }
7773
 
7774
    public void unsetStart_billing_date() {
7775
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
7776
    }
7777
 
7778
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
7779
    public boolean isSetStart_billing_date() {
7780
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
7781
    }
7782
 
7783
    public void setStart_billing_dateIsSet(boolean value) {
7784
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
7785
    }
7786
 
7787
    public long getEnd_billing_date() {
7788
      return this.end_billing_date;
7789
    }
7790
 
7791
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
7792
      this.end_billing_date = end_billing_date;
7793
      setEnd_billing_dateIsSet(true);
7794
      return this;
7795
    }
7796
 
7797
    public void unsetEnd_billing_date() {
7798
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
7799
    }
7800
 
7801
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
7802
    public boolean isSetEnd_billing_date() {
7803
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
7804
    }
7805
 
7806
    public void setEnd_billing_dateIsSet(boolean value) {
7807
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
7808
    }
7809
 
7810
    public long getWarehouse_id() {
7811
      return this.warehouse_id;
7812
    }
7813
 
7814
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
7815
      this.warehouse_id = warehouse_id;
7816
      setWarehouse_idIsSet(true);
7817
      return this;
7818
    }
7819
 
7820
    public void unsetWarehouse_id() {
7821
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
7822
    }
7823
 
7824
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7825
    public boolean isSetWarehouse_id() {
7826
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
7827
    }
7828
 
7829
    public void setWarehouse_idIsSet(boolean value) {
7830
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
7831
    }
7832
 
7833
    public void setFieldValue(_Fields field, Object value) {
7834
      switch (field) {
7835
      case STATUS:
7836
        if (value == null) {
7837
          unsetStatus();
7838
        } else {
7839
          setStatus((OrderStatus)value);
7840
        }
7841
        break;
7842
 
7843
      case START_BILLING_DATE:
7844
        if (value == null) {
7845
          unsetStart_billing_date();
7846
        } else {
7847
          setStart_billing_date((Long)value);
7848
        }
7849
        break;
7850
 
7851
      case END_BILLING_DATE:
7852
        if (value == null) {
7853
          unsetEnd_billing_date();
7854
        } else {
7855
          setEnd_billing_date((Long)value);
7856
        }
7857
        break;
7858
 
7859
      case WAREHOUSE_ID:
7860
        if (value == null) {
7861
          unsetWarehouse_id();
7862
        } else {
7863
          setWarehouse_id((Long)value);
7864
        }
7865
        break;
7866
 
7867
      }
7868
    }
7869
 
7870
    public void setFieldValue(int fieldID, Object value) {
7871
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7872
    }
7873
 
7874
    public Object getFieldValue(_Fields field) {
7875
      switch (field) {
7876
      case STATUS:
7877
        return getStatus();
7878
 
7879
      case START_BILLING_DATE:
7880
        return new Long(getStart_billing_date());
7881
 
7882
      case END_BILLING_DATE:
7883
        return new Long(getEnd_billing_date());
7884
 
7885
      case WAREHOUSE_ID:
7886
        return new Long(getWarehouse_id());
7887
 
7888
      }
7889
      throw new IllegalStateException();
7890
    }
7891
 
7892
    public Object getFieldValue(int fieldId) {
7893
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7894
    }
7895
 
7896
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7897
    public boolean isSet(_Fields field) {
7898
      switch (field) {
7899
      case STATUS:
7900
        return isSetStatus();
7901
      case START_BILLING_DATE:
7902
        return isSetStart_billing_date();
7903
      case END_BILLING_DATE:
7904
        return isSetEnd_billing_date();
7905
      case WAREHOUSE_ID:
7906
        return isSetWarehouse_id();
7907
      }
7908
      throw new IllegalStateException();
7909
    }
7910
 
7911
    public boolean isSet(int fieldID) {
7912
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7913
    }
7914
 
7915
    @Override
7916
    public boolean equals(Object that) {
7917
      if (that == null)
7918
        return false;
7919
      if (that instanceof getOrdersByBillingDate_args)
7920
        return this.equals((getOrdersByBillingDate_args)that);
7921
      return false;
7922
    }
7923
 
7924
    public boolean equals(getOrdersByBillingDate_args that) {
7925
      if (that == null)
7926
        return false;
7927
 
7928
      boolean this_present_status = true && this.isSetStatus();
7929
      boolean that_present_status = true && that.isSetStatus();
7930
      if (this_present_status || that_present_status) {
7931
        if (!(this_present_status && that_present_status))
7932
          return false;
7933
        if (!this.status.equals(that.status))
7934
          return false;
7935
      }
7936
 
7937
      boolean this_present_start_billing_date = true;
7938
      boolean that_present_start_billing_date = true;
7939
      if (this_present_start_billing_date || that_present_start_billing_date) {
7940
        if (!(this_present_start_billing_date && that_present_start_billing_date))
7941
          return false;
7942
        if (this.start_billing_date != that.start_billing_date)
7943
          return false;
7944
      }
7945
 
7946
      boolean this_present_end_billing_date = true;
7947
      boolean that_present_end_billing_date = true;
7948
      if (this_present_end_billing_date || that_present_end_billing_date) {
7949
        if (!(this_present_end_billing_date && that_present_end_billing_date))
7950
          return false;
7951
        if (this.end_billing_date != that.end_billing_date)
7952
          return false;
7953
      }
7954
 
7955
      boolean this_present_warehouse_id = true;
7956
      boolean that_present_warehouse_id = true;
7957
      if (this_present_warehouse_id || that_present_warehouse_id) {
7958
        if (!(this_present_warehouse_id && that_present_warehouse_id))
7959
          return false;
7960
        if (this.warehouse_id != that.warehouse_id)
7961
          return false;
7962
      }
7963
 
7964
      return true;
7965
    }
7966
 
7967
    @Override
7968
    public int hashCode() {
7969
      return 0;
7970
    }
7971
 
7972
    public int compareTo(getOrdersByBillingDate_args other) {
7973
      if (!getClass().equals(other.getClass())) {
7974
        return getClass().getName().compareTo(other.getClass().getName());
7975
      }
7976
 
7977
      int lastComparison = 0;
7978
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
7979
 
7980
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7981
      if (lastComparison != 0) {
7982
        return lastComparison;
7983
      }
7984
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7985
      if (lastComparison != 0) {
7986
        return lastComparison;
7987
      }
7988
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
7989
      if (lastComparison != 0) {
7990
        return lastComparison;
7991
      }
7992
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
7993
      if (lastComparison != 0) {
7994
        return lastComparison;
7995
      }
7996
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
7997
      if (lastComparison != 0) {
7998
        return lastComparison;
7999
      }
8000
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
8001
      if (lastComparison != 0) {
8002
        return lastComparison;
8003
      }
8004
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8005
      if (lastComparison != 0) {
8006
        return lastComparison;
8007
      }
8008
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8009
      if (lastComparison != 0) {
8010
        return lastComparison;
8011
      }
8012
      return 0;
8013
    }
8014
 
8015
    public void read(TProtocol iprot) throws TException {
8016
      TField field;
8017
      iprot.readStructBegin();
8018
      while (true)
8019
      {
8020
        field = iprot.readFieldBegin();
8021
        if (field.type == TType.STOP) { 
8022
          break;
8023
        }
8024
        _Fields fieldId = _Fields.findByThriftId(field.id);
8025
        if (fieldId == null) {
8026
          TProtocolUtil.skip(iprot, field.type);
8027
        } else {
8028
          switch (fieldId) {
8029
            case STATUS:
8030
              if (field.type == TType.I32) {
8031
                this.status = OrderStatus.findByValue(iprot.readI32());
8032
              } else { 
8033
                TProtocolUtil.skip(iprot, field.type);
8034
              }
8035
              break;
8036
            case START_BILLING_DATE:
8037
              if (field.type == TType.I64) {
8038
                this.start_billing_date = iprot.readI64();
8039
                setStart_billing_dateIsSet(true);
8040
              } else { 
8041
                TProtocolUtil.skip(iprot, field.type);
8042
              }
8043
              break;
8044
            case END_BILLING_DATE:
8045
              if (field.type == TType.I64) {
8046
                this.end_billing_date = iprot.readI64();
8047
                setEnd_billing_dateIsSet(true);
8048
              } else { 
8049
                TProtocolUtil.skip(iprot, field.type);
8050
              }
8051
              break;
8052
            case WAREHOUSE_ID:
8053
              if (field.type == TType.I64) {
8054
                this.warehouse_id = iprot.readI64();
8055
                setWarehouse_idIsSet(true);
8056
              } else { 
8057
                TProtocolUtil.skip(iprot, field.type);
8058
              }
8059
              break;
8060
          }
8061
          iprot.readFieldEnd();
8062
        }
8063
      }
8064
      iprot.readStructEnd();
8065
      validate();
8066
    }
8067
 
8068
    public void write(TProtocol oprot) throws TException {
8069
      validate();
8070
 
8071
      oprot.writeStructBegin(STRUCT_DESC);
8072
      if (this.status != null) {
8073
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8074
        oprot.writeI32(this.status.getValue());
8075
        oprot.writeFieldEnd();
8076
      }
8077
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
8078
      oprot.writeI64(this.start_billing_date);
8079
      oprot.writeFieldEnd();
8080
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
8081
      oprot.writeI64(this.end_billing_date);
8082
      oprot.writeFieldEnd();
8083
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8084
      oprot.writeI64(this.warehouse_id);
8085
      oprot.writeFieldEnd();
8086
      oprot.writeFieldStop();
8087
      oprot.writeStructEnd();
8088
    }
8089
 
8090
    @Override
8091
    public String toString() {
8092
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
8093
      boolean first = true;
8094
 
8095
      sb.append("status:");
8096
      if (this.status == null) {
8097
        sb.append("null");
8098
      } else {
8099
        String status_name = status.name();
8100
        if (status_name != null) {
8101
          sb.append(status_name);
8102
          sb.append(" (");
8103
        }
8104
        sb.append(this.status);
8105
        if (status_name != null) {
8106
          sb.append(")");
8107
        }
8108
      }
8109
      first = false;
8110
      if (!first) sb.append(", ");
8111
      sb.append("start_billing_date:");
8112
      sb.append(this.start_billing_date);
8113
      first = false;
8114
      if (!first) sb.append(", ");
8115
      sb.append("end_billing_date:");
8116
      sb.append(this.end_billing_date);
8117
      first = false;
8118
      if (!first) sb.append(", ");
8119
      sb.append("warehouse_id:");
8120
      sb.append(this.warehouse_id);
8121
      first = false;
8122
      sb.append(")");
8123
      return sb.toString();
8124
    }
8125
 
8126
    public void validate() throws TException {
8127
      // check for required fields
8128
    }
8129
 
8130
  }
8131
 
8132
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
8133
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
8134
 
8135
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
8136
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8137
 
8138
    private List<Order> success;
8139
    private TransactionServiceException ex;
8140
 
8141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8142
    public enum _Fields implements TFieldIdEnum {
8143
      SUCCESS((short)0, "success"),
8144
      EX((short)1, "ex");
8145
 
8146
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8147
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8148
 
8149
      static {
8150
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8151
          byId.put((int)field._thriftId, field);
8152
          byName.put(field.getFieldName(), field);
8153
        }
8154
      }
8155
 
8156
      /**
8157
       * Find the _Fields constant that matches fieldId, or null if its not found.
8158
       */
8159
      public static _Fields findByThriftId(int fieldId) {
8160
        return byId.get(fieldId);
8161
      }
8162
 
8163
      /**
8164
       * Find the _Fields constant that matches fieldId, throwing an exception
8165
       * if it is not found.
8166
       */
8167
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8168
        _Fields fields = findByThriftId(fieldId);
8169
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8170
        return fields;
8171
      }
8172
 
8173
      /**
8174
       * Find the _Fields constant that matches name, or null if its not found.
8175
       */
8176
      public static _Fields findByName(String name) {
8177
        return byName.get(name);
8178
      }
8179
 
8180
      private final short _thriftId;
8181
      private final String _fieldName;
8182
 
8183
      _Fields(short thriftId, String fieldName) {
8184
        _thriftId = thriftId;
8185
        _fieldName = fieldName;
8186
      }
8187
 
8188
      public short getThriftFieldId() {
8189
        return _thriftId;
8190
      }
8191
 
8192
      public String getFieldName() {
8193
        return _fieldName;
8194
      }
8195
    }
8196
 
8197
    // isset id assignments
8198
 
8199
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8200
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8201
          new ListMetaData(TType.LIST, 
8202
              new StructMetaData(TType.STRUCT, Order.class))));
8203
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8204
          new FieldValueMetaData(TType.STRUCT)));
8205
    }});
8206
 
8207
    static {
8208
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
8209
    }
8210
 
8211
    public getOrdersByBillingDate_result() {
8212
    }
8213
 
8214
    public getOrdersByBillingDate_result(
8215
      List<Order> success,
8216
      TransactionServiceException ex)
8217
    {
8218
      this();
8219
      this.success = success;
8220
      this.ex = ex;
8221
    }
8222
 
8223
    /**
8224
     * Performs a deep copy on <i>other</i>.
8225
     */
8226
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
8227
      if (other.isSetSuccess()) {
8228
        List<Order> __this__success = new ArrayList<Order>();
8229
        for (Order other_element : other.success) {
8230
          __this__success.add(new Order(other_element));
8231
        }
8232
        this.success = __this__success;
8233
      }
8234
      if (other.isSetEx()) {
8235
        this.ex = new TransactionServiceException(other.ex);
8236
      }
8237
    }
8238
 
8239
    public getOrdersByBillingDate_result deepCopy() {
8240
      return new getOrdersByBillingDate_result(this);
8241
    }
8242
 
8243
    @Deprecated
8244
    public getOrdersByBillingDate_result clone() {
8245
      return new getOrdersByBillingDate_result(this);
8246
    }
8247
 
8248
    public int getSuccessSize() {
8249
      return (this.success == null) ? 0 : this.success.size();
8250
    }
8251
 
8252
    public java.util.Iterator<Order> getSuccessIterator() {
8253
      return (this.success == null) ? null : this.success.iterator();
8254
    }
8255
 
8256
    public void addToSuccess(Order elem) {
8257
      if (this.success == null) {
8258
        this.success = new ArrayList<Order>();
8259
      }
8260
      this.success.add(elem);
8261
    }
8262
 
8263
    public List<Order> getSuccess() {
8264
      return this.success;
8265
    }
8266
 
8267
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
8268
      this.success = success;
8269
      return this;
8270
    }
8271
 
8272
    public void unsetSuccess() {
8273
      this.success = null;
8274
    }
8275
 
8276
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8277
    public boolean isSetSuccess() {
8278
      return this.success != null;
8279
    }
8280
 
8281
    public void setSuccessIsSet(boolean value) {
8282
      if (!value) {
8283
        this.success = null;
8284
      }
8285
    }
8286
 
8287
    public TransactionServiceException getEx() {
8288
      return this.ex;
8289
    }
8290
 
8291
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
8292
      this.ex = ex;
8293
      return this;
8294
    }
8295
 
8296
    public void unsetEx() {
8297
      this.ex = null;
8298
    }
8299
 
8300
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8301
    public boolean isSetEx() {
8302
      return this.ex != null;
8303
    }
8304
 
8305
    public void setExIsSet(boolean value) {
8306
      if (!value) {
8307
        this.ex = null;
8308
      }
8309
    }
8310
 
8311
    public void setFieldValue(_Fields field, Object value) {
8312
      switch (field) {
8313
      case SUCCESS:
8314
        if (value == null) {
8315
          unsetSuccess();
8316
        } else {
8317
          setSuccess((List<Order>)value);
8318
        }
8319
        break;
8320
 
8321
      case EX:
8322
        if (value == null) {
8323
          unsetEx();
8324
        } else {
8325
          setEx((TransactionServiceException)value);
8326
        }
8327
        break;
8328
 
8329
      }
8330
    }
8331
 
8332
    public void setFieldValue(int fieldID, Object value) {
8333
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8334
    }
8335
 
8336
    public Object getFieldValue(_Fields field) {
8337
      switch (field) {
8338
      case SUCCESS:
8339
        return getSuccess();
8340
 
8341
      case EX:
8342
        return getEx();
8343
 
8344
      }
8345
      throw new IllegalStateException();
8346
    }
8347
 
8348
    public Object getFieldValue(int fieldId) {
8349
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8350
    }
8351
 
8352
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8353
    public boolean isSet(_Fields field) {
8354
      switch (field) {
8355
      case SUCCESS:
8356
        return isSetSuccess();
8357
      case EX:
8358
        return isSetEx();
8359
      }
8360
      throw new IllegalStateException();
8361
    }
8362
 
8363
    public boolean isSet(int fieldID) {
8364
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8365
    }
8366
 
8367
    @Override
8368
    public boolean equals(Object that) {
8369
      if (that == null)
8370
        return false;
8371
      if (that instanceof getOrdersByBillingDate_result)
8372
        return this.equals((getOrdersByBillingDate_result)that);
8373
      return false;
8374
    }
8375
 
8376
    public boolean equals(getOrdersByBillingDate_result that) {
8377
      if (that == null)
8378
        return false;
8379
 
8380
      boolean this_present_success = true && this.isSetSuccess();
8381
      boolean that_present_success = true && that.isSetSuccess();
8382
      if (this_present_success || that_present_success) {
8383
        if (!(this_present_success && that_present_success))
8384
          return false;
8385
        if (!this.success.equals(that.success))
8386
          return false;
8387
      }
8388
 
8389
      boolean this_present_ex = true && this.isSetEx();
8390
      boolean that_present_ex = true && that.isSetEx();
8391
      if (this_present_ex || that_present_ex) {
8392
        if (!(this_present_ex && that_present_ex))
8393
          return false;
8394
        if (!this.ex.equals(that.ex))
8395
          return false;
8396
      }
8397
 
8398
      return true;
8399
    }
8400
 
8401
    @Override
8402
    public int hashCode() {
8403
      return 0;
8404
    }
8405
 
8406
    public int compareTo(getOrdersByBillingDate_result other) {
8407
      if (!getClass().equals(other.getClass())) {
8408
        return getClass().getName().compareTo(other.getClass().getName());
8409
      }
8410
 
8411
      int lastComparison = 0;
8412
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
8413
 
8414
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8415
      if (lastComparison != 0) {
8416
        return lastComparison;
8417
      }
8418
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8419
      if (lastComparison != 0) {
8420
        return lastComparison;
8421
      }
8422
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8423
      if (lastComparison != 0) {
8424
        return lastComparison;
8425
      }
8426
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8427
      if (lastComparison != 0) {
8428
        return lastComparison;
8429
      }
8430
      return 0;
8431
    }
8432
 
8433
    public void read(TProtocol iprot) throws TException {
8434
      TField field;
8435
      iprot.readStructBegin();
8436
      while (true)
8437
      {
8438
        field = iprot.readFieldBegin();
8439
        if (field.type == TType.STOP) { 
8440
          break;
8441
        }
8442
        _Fields fieldId = _Fields.findByThriftId(field.id);
8443
        if (fieldId == null) {
8444
          TProtocolUtil.skip(iprot, field.type);
8445
        } else {
8446
          switch (fieldId) {
8447
            case SUCCESS:
8448
              if (field.type == TType.LIST) {
8449
                {
8450
                  TList _list20 = iprot.readListBegin();
8451
                  this.success = new ArrayList<Order>(_list20.size);
8452
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
8453
                  {
8454
                    Order _elem22;
8455
                    _elem22 = new Order();
8456
                    _elem22.read(iprot);
8457
                    this.success.add(_elem22);
8458
                  }
8459
                  iprot.readListEnd();
8460
                }
8461
              } else { 
8462
                TProtocolUtil.skip(iprot, field.type);
8463
              }
8464
              break;
8465
            case EX:
8466
              if (field.type == TType.STRUCT) {
8467
                this.ex = new TransactionServiceException();
8468
                this.ex.read(iprot);
8469
              } else { 
8470
                TProtocolUtil.skip(iprot, field.type);
8471
              }
8472
              break;
8473
          }
8474
          iprot.readFieldEnd();
8475
        }
8476
      }
8477
      iprot.readStructEnd();
8478
      validate();
8479
    }
8480
 
8481
    public void write(TProtocol oprot) throws TException {
8482
      oprot.writeStructBegin(STRUCT_DESC);
8483
 
8484
      if (this.isSetSuccess()) {
8485
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8486
        {
8487
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
8488
          for (Order _iter23 : this.success)
8489
          {
8490
            _iter23.write(oprot);
8491
          }
8492
          oprot.writeListEnd();
8493
        }
8494
        oprot.writeFieldEnd();
8495
      } else if (this.isSetEx()) {
8496
        oprot.writeFieldBegin(EX_FIELD_DESC);
8497
        this.ex.write(oprot);
8498
        oprot.writeFieldEnd();
8499
      }
8500
      oprot.writeFieldStop();
8501
      oprot.writeStructEnd();
8502
    }
8503
 
8504
    @Override
8505
    public String toString() {
8506
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
8507
      boolean first = true;
8508
 
8509
      sb.append("success:");
8510
      if (this.success == null) {
8511
        sb.append("null");
8512
      } else {
8513
        sb.append(this.success);
8514
      }
8515
      first = false;
8516
      if (!first) sb.append(", ");
8517
      sb.append("ex:");
8518
      if (this.ex == null) {
8519
        sb.append("null");
8520
      } else {
8521
        sb.append(this.ex);
8522
      }
8523
      first = false;
8524
      sb.append(")");
8525
      return sb.toString();
8526
    }
8527
 
8528
    public void validate() throws TException {
8529
      // check for required fields
8530
    }
8531
 
8532
  }
8533
 
483 rajveer 8534
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
8535
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 8536
 
483 rajveer 8537
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8538
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
8539
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 8540
 
483 rajveer 8541
    private long orderId;
8542
    private OrderStatus status;
8543
    private String description;
68 ashish 8544
 
8545
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8546
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8547
      ORDER_ID((short)1, "orderId"),
8548
      /**
8549
       * 
8550
       * @see OrderStatus
8551
       */
8552
      STATUS((short)2, "status"),
8553
      DESCRIPTION((short)3, "description");
68 ashish 8554
 
8555
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8556
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8557
 
8558
      static {
8559
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8560
          byId.put((int)field._thriftId, field);
8561
          byName.put(field.getFieldName(), field);
8562
        }
8563
      }
8564
 
8565
      /**
8566
       * Find the _Fields constant that matches fieldId, or null if its not found.
8567
       */
8568
      public static _Fields findByThriftId(int fieldId) {
8569
        return byId.get(fieldId);
8570
      }
8571
 
8572
      /**
8573
       * Find the _Fields constant that matches fieldId, throwing an exception
8574
       * if it is not found.
8575
       */
8576
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8577
        _Fields fields = findByThriftId(fieldId);
8578
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8579
        return fields;
8580
      }
8581
 
8582
      /**
8583
       * Find the _Fields constant that matches name, or null if its not found.
8584
       */
8585
      public static _Fields findByName(String name) {
8586
        return byName.get(name);
8587
      }
8588
 
8589
      private final short _thriftId;
8590
      private final String _fieldName;
8591
 
8592
      _Fields(short thriftId, String fieldName) {
8593
        _thriftId = thriftId;
8594
        _fieldName = fieldName;
8595
      }
8596
 
8597
      public short getThriftFieldId() {
8598
        return _thriftId;
8599
      }
8600
 
8601
      public String getFieldName() {
8602
        return _fieldName;
8603
      }
8604
    }
8605
 
8606
    // isset id assignments
483 rajveer 8607
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 8608
    private BitSet __isset_bit_vector = new BitSet(1);
8609
 
8610
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8611
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 8612
          new FieldValueMetaData(TType.I64)));
483 rajveer 8613
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8614
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8615
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
8616
          new FieldValueMetaData(TType.STRING)));
68 ashish 8617
    }});
8618
 
8619
    static {
483 rajveer 8620
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 8621
    }
8622
 
483 rajveer 8623
    public changeOrderStatus_args() {
68 ashish 8624
    }
8625
 
483 rajveer 8626
    public changeOrderStatus_args(
8627
      long orderId,
8628
      OrderStatus status,
8629
      String description)
68 ashish 8630
    {
8631
      this();
483 rajveer 8632
      this.orderId = orderId;
8633
      setOrderIdIsSet(true);
8634
      this.status = status;
8635
      this.description = description;
68 ashish 8636
    }
8637
 
8638
    /**
8639
     * Performs a deep copy on <i>other</i>.
8640
     */
483 rajveer 8641
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 8642
      __isset_bit_vector.clear();
8643
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8644
      this.orderId = other.orderId;
8645
      if (other.isSetStatus()) {
8646
        this.status = other.status;
8647
      }
8648
      if (other.isSetDescription()) {
8649
        this.description = other.description;
8650
      }
68 ashish 8651
    }
8652
 
483 rajveer 8653
    public changeOrderStatus_args deepCopy() {
8654
      return new changeOrderStatus_args(this);
68 ashish 8655
    }
8656
 
8657
    @Deprecated
483 rajveer 8658
    public changeOrderStatus_args clone() {
8659
      return new changeOrderStatus_args(this);
68 ashish 8660
    }
8661
 
483 rajveer 8662
    public long getOrderId() {
8663
      return this.orderId;
68 ashish 8664
    }
8665
 
483 rajveer 8666
    public changeOrderStatus_args setOrderId(long orderId) {
8667
      this.orderId = orderId;
8668
      setOrderIdIsSet(true);
68 ashish 8669
      return this;
8670
    }
8671
 
483 rajveer 8672
    public void unsetOrderId() {
8673
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 8674
    }
8675
 
483 rajveer 8676
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8677
    public boolean isSetOrderId() {
8678
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 8679
    }
8680
 
483 rajveer 8681
    public void setOrderIdIsSet(boolean value) {
8682
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 8683
    }
8684
 
483 rajveer 8685
    /**
8686
     * 
8687
     * @see OrderStatus
8688
     */
8689
    public OrderStatus getStatus() {
8690
      return this.status;
68 ashish 8691
    }
8692
 
8693
    /**
483 rajveer 8694
     * 
8695
     * @see OrderStatus
68 ashish 8696
     */
483 rajveer 8697
    public changeOrderStatus_args setStatus(OrderStatus status) {
8698
      this.status = status;
68 ashish 8699
      return this;
8700
    }
8701
 
483 rajveer 8702
    public void unsetStatus() {
8703
      this.status = null;
68 ashish 8704
    }
8705
 
483 rajveer 8706
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8707
    public boolean isSetStatus() {
8708
      return this.status != null;
68 ashish 8709
    }
8710
 
483 rajveer 8711
    public void setStatusIsSet(boolean value) {
68 ashish 8712
      if (!value) {
483 rajveer 8713
        this.status = null;
68 ashish 8714
      }
8715
    }
8716
 
483 rajveer 8717
    public String getDescription() {
8718
      return this.description;
68 ashish 8719
    }
8720
 
483 rajveer 8721
    public changeOrderStatus_args setDescription(String description) {
8722
      this.description = description;
68 ashish 8723
      return this;
8724
    }
8725
 
483 rajveer 8726
    public void unsetDescription() {
8727
      this.description = null;
68 ashish 8728
    }
8729
 
483 rajveer 8730
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
8731
    public boolean isSetDescription() {
8732
      return this.description != null;
68 ashish 8733
    }
8734
 
483 rajveer 8735
    public void setDescriptionIsSet(boolean value) {
68 ashish 8736
      if (!value) {
483 rajveer 8737
        this.description = null;
68 ashish 8738
      }
8739
    }
8740
 
8741
    public void setFieldValue(_Fields field, Object value) {
8742
      switch (field) {
483 rajveer 8743
      case ORDER_ID:
68 ashish 8744
        if (value == null) {
483 rajveer 8745
          unsetOrderId();
68 ashish 8746
        } else {
483 rajveer 8747
          setOrderId((Long)value);
68 ashish 8748
        }
8749
        break;
8750
 
483 rajveer 8751
      case STATUS:
68 ashish 8752
        if (value == null) {
483 rajveer 8753
          unsetStatus();
68 ashish 8754
        } else {
483 rajveer 8755
          setStatus((OrderStatus)value);
68 ashish 8756
        }
8757
        break;
8758
 
483 rajveer 8759
      case DESCRIPTION:
8760
        if (value == null) {
8761
          unsetDescription();
8762
        } else {
8763
          setDescription((String)value);
8764
        }
8765
        break;
8766
 
68 ashish 8767
      }
8768
    }
8769
 
8770
    public void setFieldValue(int fieldID, Object value) {
8771
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8772
    }
8773
 
8774
    public Object getFieldValue(_Fields field) {
8775
      switch (field) {
483 rajveer 8776
      case ORDER_ID:
8777
        return new Long(getOrderId());
68 ashish 8778
 
483 rajveer 8779
      case STATUS:
8780
        return getStatus();
68 ashish 8781
 
483 rajveer 8782
      case DESCRIPTION:
8783
        return getDescription();
8784
 
68 ashish 8785
      }
8786
      throw new IllegalStateException();
8787
    }
8788
 
8789
    public Object getFieldValue(int fieldId) {
8790
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8791
    }
8792
 
8793
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8794
    public boolean isSet(_Fields field) {
8795
      switch (field) {
483 rajveer 8796
      case ORDER_ID:
8797
        return isSetOrderId();
8798
      case STATUS:
8799
        return isSetStatus();
8800
      case DESCRIPTION:
8801
        return isSetDescription();
68 ashish 8802
      }
8803
      throw new IllegalStateException();
8804
    }
8805
 
8806
    public boolean isSet(int fieldID) {
8807
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8808
    }
8809
 
8810
    @Override
8811
    public boolean equals(Object that) {
8812
      if (that == null)
8813
        return false;
483 rajveer 8814
      if (that instanceof changeOrderStatus_args)
8815
        return this.equals((changeOrderStatus_args)that);
68 ashish 8816
      return false;
8817
    }
8818
 
483 rajveer 8819
    public boolean equals(changeOrderStatus_args that) {
68 ashish 8820
      if (that == null)
8821
        return false;
8822
 
483 rajveer 8823
      boolean this_present_orderId = true;
8824
      boolean that_present_orderId = true;
8825
      if (this_present_orderId || that_present_orderId) {
8826
        if (!(this_present_orderId && that_present_orderId))
68 ashish 8827
          return false;
483 rajveer 8828
        if (this.orderId != that.orderId)
68 ashish 8829
          return false;
8830
      }
8831
 
483 rajveer 8832
      boolean this_present_status = true && this.isSetStatus();
8833
      boolean that_present_status = true && that.isSetStatus();
8834
      if (this_present_status || that_present_status) {
8835
        if (!(this_present_status && that_present_status))
68 ashish 8836
          return false;
483 rajveer 8837
        if (!this.status.equals(that.status))
68 ashish 8838
          return false;
8839
      }
8840
 
483 rajveer 8841
      boolean this_present_description = true && this.isSetDescription();
8842
      boolean that_present_description = true && that.isSetDescription();
8843
      if (this_present_description || that_present_description) {
8844
        if (!(this_present_description && that_present_description))
8845
          return false;
8846
        if (!this.description.equals(that.description))
8847
          return false;
8848
      }
8849
 
68 ashish 8850
      return true;
8851
    }
8852
 
8853
    @Override
8854
    public int hashCode() {
8855
      return 0;
8856
    }
8857
 
483 rajveer 8858
    public int compareTo(changeOrderStatus_args other) {
8859
      if (!getClass().equals(other.getClass())) {
8860
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 8861
      }
8862
 
483 rajveer 8863
      int lastComparison = 0;
8864
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 8865
 
483 rajveer 8866
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
8867
      if (lastComparison != 0) {
8868
        return lastComparison;
68 ashish 8869
      }
483 rajveer 8870
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
8871
      if (lastComparison != 0) {
8872
        return lastComparison;
68 ashish 8873
      }
483 rajveer 8874
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8875
      if (lastComparison != 0) {
8876
        return lastComparison;
68 ashish 8877
      }
483 rajveer 8878
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8879
      if (lastComparison != 0) {
8880
        return lastComparison;
68 ashish 8881
      }
483 rajveer 8882
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
8883
      if (lastComparison != 0) {
8884
        return lastComparison;
68 ashish 8885
      }
483 rajveer 8886
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
8887
      if (lastComparison != 0) {
8888
        return lastComparison;
68 ashish 8889
      }
8890
      return 0;
8891
    }
8892
 
8893
    public void read(TProtocol iprot) throws TException {
8894
      TField field;
8895
      iprot.readStructBegin();
8896
      while (true)
8897
      {
8898
        field = iprot.readFieldBegin();
8899
        if (field.type == TType.STOP) { 
8900
          break;
8901
        }
8902
        _Fields fieldId = _Fields.findByThriftId(field.id);
8903
        if (fieldId == null) {
8904
          TProtocolUtil.skip(iprot, field.type);
8905
        } else {
8906
          switch (fieldId) {
483 rajveer 8907
            case ORDER_ID:
68 ashish 8908
              if (field.type == TType.I64) {
483 rajveer 8909
                this.orderId = iprot.readI64();
8910
                setOrderIdIsSet(true);
68 ashish 8911
              } else { 
8912
                TProtocolUtil.skip(iprot, field.type);
8913
              }
8914
              break;
483 rajveer 8915
            case STATUS:
8916
              if (field.type == TType.I32) {
8917
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 8918
              } else { 
8919
                TProtocolUtil.skip(iprot, field.type);
8920
              }
8921
              break;
483 rajveer 8922
            case DESCRIPTION:
8923
              if (field.type == TType.STRING) {
8924
                this.description = iprot.readString();
8925
              } else { 
8926
                TProtocolUtil.skip(iprot, field.type);
8927
              }
8928
              break;
68 ashish 8929
          }
8930
          iprot.readFieldEnd();
8931
        }
8932
      }
8933
      iprot.readStructEnd();
8934
      validate();
8935
    }
8936
 
8937
    public void write(TProtocol oprot) throws TException {
8938
      validate();
8939
 
8940
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8941
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8942
      oprot.writeI64(this.orderId);
68 ashish 8943
      oprot.writeFieldEnd();
483 rajveer 8944
      if (this.status != null) {
8945
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8946
        oprot.writeI32(this.status.getValue());
68 ashish 8947
        oprot.writeFieldEnd();
8948
      }
483 rajveer 8949
      if (this.description != null) {
8950
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8951
        oprot.writeString(this.description);
8952
        oprot.writeFieldEnd();
8953
      }
68 ashish 8954
      oprot.writeFieldStop();
8955
      oprot.writeStructEnd();
8956
    }
8957
 
8958
    @Override
8959
    public String toString() {
483 rajveer 8960
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 8961
      boolean first = true;
8962
 
483 rajveer 8963
      sb.append("orderId:");
8964
      sb.append(this.orderId);
68 ashish 8965
      first = false;
8966
      if (!first) sb.append(", ");
483 rajveer 8967
      sb.append("status:");
8968
      if (this.status == null) {
68 ashish 8969
        sb.append("null");
8970
      } else {
483 rajveer 8971
        String status_name = status.name();
8972
        if (status_name != null) {
8973
          sb.append(status_name);
8974
          sb.append(" (");
8975
        }
8976
        sb.append(this.status);
8977
        if (status_name != null) {
8978
          sb.append(")");
8979
        }
68 ashish 8980
      }
8981
      first = false;
483 rajveer 8982
      if (!first) sb.append(", ");
8983
      sb.append("description:");
8984
      if (this.description == null) {
8985
        sb.append("null");
8986
      } else {
8987
        sb.append(this.description);
8988
      }
8989
      first = false;
68 ashish 8990
      sb.append(")");
8991
      return sb.toString();
8992
    }
8993
 
8994
    public void validate() throws TException {
8995
      // check for required fields
8996
    }
8997
 
8998
  }
8999
 
483 rajveer 9000
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
9001
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 9002
 
9003
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9004
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9005
 
9006
    private boolean success;
9007
    private TransactionServiceException ex;
9008
 
9009
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9010
    public enum _Fields implements TFieldIdEnum {
9011
      SUCCESS((short)0, "success"),
9012
      EX((short)1, "ex");
9013
 
9014
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9015
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9016
 
9017
      static {
9018
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9019
          byId.put((int)field._thriftId, field);
9020
          byName.put(field.getFieldName(), field);
9021
        }
9022
      }
9023
 
9024
      /**
9025
       * Find the _Fields constant that matches fieldId, or null if its not found.
9026
       */
9027
      public static _Fields findByThriftId(int fieldId) {
9028
        return byId.get(fieldId);
9029
      }
9030
 
9031
      /**
9032
       * Find the _Fields constant that matches fieldId, throwing an exception
9033
       * if it is not found.
9034
       */
9035
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9036
        _Fields fields = findByThriftId(fieldId);
9037
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9038
        return fields;
9039
      }
9040
 
9041
      /**
9042
       * Find the _Fields constant that matches name, or null if its not found.
9043
       */
9044
      public static _Fields findByName(String name) {
9045
        return byName.get(name);
9046
      }
9047
 
9048
      private final short _thriftId;
9049
      private final String _fieldName;
9050
 
9051
      _Fields(short thriftId, String fieldName) {
9052
        _thriftId = thriftId;
9053
        _fieldName = fieldName;
9054
      }
9055
 
9056
      public short getThriftFieldId() {
9057
        return _thriftId;
9058
      }
9059
 
9060
      public String getFieldName() {
9061
        return _fieldName;
9062
      }
9063
    }
9064
 
9065
    // isset id assignments
9066
    private static final int __SUCCESS_ISSET_ID = 0;
9067
    private BitSet __isset_bit_vector = new BitSet(1);
9068
 
9069
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9070
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9071
          new FieldValueMetaData(TType.BOOL)));
9072
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9073
          new FieldValueMetaData(TType.STRUCT)));
9074
    }});
9075
 
9076
    static {
483 rajveer 9077
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 9078
    }
9079
 
483 rajveer 9080
    public changeOrderStatus_result() {
68 ashish 9081
    }
9082
 
483 rajveer 9083
    public changeOrderStatus_result(
68 ashish 9084
      boolean success,
9085
      TransactionServiceException ex)
9086
    {
9087
      this();
9088
      this.success = success;
9089
      setSuccessIsSet(true);
9090
      this.ex = ex;
9091
    }
9092
 
9093
    /**
9094
     * Performs a deep copy on <i>other</i>.
9095
     */
483 rajveer 9096
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 9097
      __isset_bit_vector.clear();
9098
      __isset_bit_vector.or(other.__isset_bit_vector);
9099
      this.success = other.success;
9100
      if (other.isSetEx()) {
9101
        this.ex = new TransactionServiceException(other.ex);
9102
      }
9103
    }
9104
 
483 rajveer 9105
    public changeOrderStatus_result deepCopy() {
9106
      return new changeOrderStatus_result(this);
68 ashish 9107
    }
9108
 
9109
    @Deprecated
483 rajveer 9110
    public changeOrderStatus_result clone() {
9111
      return new changeOrderStatus_result(this);
68 ashish 9112
    }
9113
 
9114
    public boolean isSuccess() {
9115
      return this.success;
9116
    }
9117
 
483 rajveer 9118
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 9119
      this.success = success;
9120
      setSuccessIsSet(true);
9121
      return this;
9122
    }
9123
 
9124
    public void unsetSuccess() {
9125
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9126
    }
9127
 
9128
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9129
    public boolean isSetSuccess() {
9130
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9131
    }
9132
 
9133
    public void setSuccessIsSet(boolean value) {
9134
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9135
    }
9136
 
9137
    public TransactionServiceException getEx() {
9138
      return this.ex;
9139
    }
9140
 
483 rajveer 9141
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 9142
      this.ex = ex;
9143
      return this;
9144
    }
9145
 
9146
    public void unsetEx() {
9147
      this.ex = null;
9148
    }
9149
 
9150
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9151
    public boolean isSetEx() {
9152
      return this.ex != null;
9153
    }
9154
 
9155
    public void setExIsSet(boolean value) {
9156
      if (!value) {
9157
        this.ex = null;
9158
      }
9159
    }
9160
 
9161
    public void setFieldValue(_Fields field, Object value) {
9162
      switch (field) {
9163
      case SUCCESS:
9164
        if (value == null) {
9165
          unsetSuccess();
9166
        } else {
9167
          setSuccess((Boolean)value);
9168
        }
9169
        break;
9170
 
9171
      case EX:
9172
        if (value == null) {
9173
          unsetEx();
9174
        } else {
9175
          setEx((TransactionServiceException)value);
9176
        }
9177
        break;
9178
 
9179
      }
9180
    }
9181
 
9182
    public void setFieldValue(int fieldID, Object value) {
9183
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9184
    }
9185
 
9186
    public Object getFieldValue(_Fields field) {
9187
      switch (field) {
9188
      case SUCCESS:
9189
        return new Boolean(isSuccess());
9190
 
9191
      case EX:
9192
        return getEx();
9193
 
9194
      }
9195
      throw new IllegalStateException();
9196
    }
9197
 
9198
    public Object getFieldValue(int fieldId) {
9199
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9200
    }
9201
 
9202
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9203
    public boolean isSet(_Fields field) {
9204
      switch (field) {
9205
      case SUCCESS:
9206
        return isSetSuccess();
9207
      case EX:
9208
        return isSetEx();
9209
      }
9210
      throw new IllegalStateException();
9211
    }
9212
 
9213
    public boolean isSet(int fieldID) {
9214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9215
    }
9216
 
9217
    @Override
9218
    public boolean equals(Object that) {
9219
      if (that == null)
9220
        return false;
483 rajveer 9221
      if (that instanceof changeOrderStatus_result)
9222
        return this.equals((changeOrderStatus_result)that);
68 ashish 9223
      return false;
9224
    }
9225
 
483 rajveer 9226
    public boolean equals(changeOrderStatus_result that) {
68 ashish 9227
      if (that == null)
9228
        return false;
9229
 
9230
      boolean this_present_success = true;
9231
      boolean that_present_success = true;
9232
      if (this_present_success || that_present_success) {
9233
        if (!(this_present_success && that_present_success))
9234
          return false;
9235
        if (this.success != that.success)
9236
          return false;
9237
      }
9238
 
9239
      boolean this_present_ex = true && this.isSetEx();
9240
      boolean that_present_ex = true && that.isSetEx();
9241
      if (this_present_ex || that_present_ex) {
9242
        if (!(this_present_ex && that_present_ex))
9243
          return false;
9244
        if (!this.ex.equals(that.ex))
9245
          return false;
9246
      }
9247
 
9248
      return true;
9249
    }
9250
 
9251
    @Override
9252
    public int hashCode() {
9253
      return 0;
9254
    }
9255
 
483 rajveer 9256
    public int compareTo(changeOrderStatus_result other) {
68 ashish 9257
      if (!getClass().equals(other.getClass())) {
9258
        return getClass().getName().compareTo(other.getClass().getName());
9259
      }
9260
 
9261
      int lastComparison = 0;
483 rajveer 9262
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 9263
 
9264
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9265
      if (lastComparison != 0) {
9266
        return lastComparison;
9267
      }
9268
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9269
      if (lastComparison != 0) {
9270
        return lastComparison;
9271
      }
9272
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9273
      if (lastComparison != 0) {
9274
        return lastComparison;
9275
      }
9276
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9277
      if (lastComparison != 0) {
9278
        return lastComparison;
9279
      }
9280
      return 0;
9281
    }
9282
 
9283
    public void read(TProtocol iprot) throws TException {
9284
      TField field;
9285
      iprot.readStructBegin();
9286
      while (true)
9287
      {
9288
        field = iprot.readFieldBegin();
9289
        if (field.type == TType.STOP) { 
9290
          break;
9291
        }
9292
        _Fields fieldId = _Fields.findByThriftId(field.id);
9293
        if (fieldId == null) {
9294
          TProtocolUtil.skip(iprot, field.type);
9295
        } else {
9296
          switch (fieldId) {
9297
            case SUCCESS:
9298
              if (field.type == TType.BOOL) {
9299
                this.success = iprot.readBool();
9300
                setSuccessIsSet(true);
9301
              } else { 
9302
                TProtocolUtil.skip(iprot, field.type);
9303
              }
9304
              break;
9305
            case EX:
9306
              if (field.type == TType.STRUCT) {
9307
                this.ex = new TransactionServiceException();
9308
                this.ex.read(iprot);
9309
              } else { 
9310
                TProtocolUtil.skip(iprot, field.type);
9311
              }
9312
              break;
9313
          }
9314
          iprot.readFieldEnd();
9315
        }
9316
      }
9317
      iprot.readStructEnd();
9318
      validate();
9319
    }
9320
 
9321
    public void write(TProtocol oprot) throws TException {
9322
      oprot.writeStructBegin(STRUCT_DESC);
9323
 
9324
      if (this.isSetSuccess()) {
9325
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9326
        oprot.writeBool(this.success);
9327
        oprot.writeFieldEnd();
9328
      } else if (this.isSetEx()) {
9329
        oprot.writeFieldBegin(EX_FIELD_DESC);
9330
        this.ex.write(oprot);
9331
        oprot.writeFieldEnd();
9332
      }
9333
      oprot.writeFieldStop();
9334
      oprot.writeStructEnd();
9335
    }
9336
 
9337
    @Override
9338
    public String toString() {
483 rajveer 9339
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 9340
      boolean first = true;
9341
 
9342
      sb.append("success:");
9343
      sb.append(this.success);
9344
      first = false;
9345
      if (!first) sb.append(", ");
9346
      sb.append("ex:");
9347
      if (this.ex == null) {
9348
        sb.append("null");
9349
      } else {
9350
        sb.append(this.ex);
9351
      }
9352
      first = false;
9353
      sb.append(")");
9354
      return sb.toString();
9355
    }
9356
 
9357
    public void validate() throws TException {
9358
      // check for required fields
9359
    }
9360
 
9361
  }
9362
 
495 rajveer 9363
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
9364
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
9365
 
9366
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9367
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 9368
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 9369
 
9370
    private long orderId;
9371
    private String invoice_number;
9372
    private String billed_by;
9373
 
9374
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9375
    public enum _Fields implements TFieldIdEnum {
9376
      ORDER_ID((short)1, "orderId"),
9377
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 9378
      BILLED_BY((short)3, "billed_by");
495 rajveer 9379
 
9380
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9381
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9382
 
9383
      static {
9384
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9385
          byId.put((int)field._thriftId, field);
9386
          byName.put(field.getFieldName(), field);
9387
        }
9388
      }
9389
 
9390
      /**
9391
       * Find the _Fields constant that matches fieldId, or null if its not found.
9392
       */
9393
      public static _Fields findByThriftId(int fieldId) {
9394
        return byId.get(fieldId);
9395
      }
9396
 
9397
      /**
9398
       * Find the _Fields constant that matches fieldId, throwing an exception
9399
       * if it is not found.
9400
       */
9401
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9402
        _Fields fields = findByThriftId(fieldId);
9403
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9404
        return fields;
9405
      }
9406
 
9407
      /**
9408
       * Find the _Fields constant that matches name, or null if its not found.
9409
       */
9410
      public static _Fields findByName(String name) {
9411
        return byName.get(name);
9412
      }
9413
 
9414
      private final short _thriftId;
9415
      private final String _fieldName;
9416
 
9417
      _Fields(short thriftId, String fieldName) {
9418
        _thriftId = thriftId;
9419
        _fieldName = fieldName;
9420
      }
9421
 
9422
      public short getThriftFieldId() {
9423
        return _thriftId;
9424
      }
9425
 
9426
      public String getFieldName() {
9427
        return _fieldName;
9428
      }
9429
    }
9430
 
9431
    // isset id assignments
9432
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 9433
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 9434
 
9435
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9436
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9437
          new FieldValueMetaData(TType.I64)));
9438
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
9439
          new FieldValueMetaData(TType.STRING)));
9440
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
9441
          new FieldValueMetaData(TType.STRING)));
9442
    }});
9443
 
9444
    static {
9445
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
9446
    }
9447
 
9448
    public addBillingDetails_args() {
9449
    }
9450
 
9451
    public addBillingDetails_args(
9452
      long orderId,
9453
      String invoice_number,
9454
      String billed_by)
9455
    {
9456
      this();
9457
      this.orderId = orderId;
9458
      setOrderIdIsSet(true);
9459
      this.invoice_number = invoice_number;
9460
      this.billed_by = billed_by;
9461
    }
9462
 
9463
    /**
9464
     * Performs a deep copy on <i>other</i>.
9465
     */
9466
    public addBillingDetails_args(addBillingDetails_args other) {
9467
      __isset_bit_vector.clear();
9468
      __isset_bit_vector.or(other.__isset_bit_vector);
9469
      this.orderId = other.orderId;
9470
      if (other.isSetInvoice_number()) {
9471
        this.invoice_number = other.invoice_number;
9472
      }
9473
      if (other.isSetBilled_by()) {
9474
        this.billed_by = other.billed_by;
9475
      }
9476
    }
9477
 
9478
    public addBillingDetails_args deepCopy() {
9479
      return new addBillingDetails_args(this);
9480
    }
9481
 
9482
    @Deprecated
9483
    public addBillingDetails_args clone() {
9484
      return new addBillingDetails_args(this);
9485
    }
9486
 
9487
    public long getOrderId() {
9488
      return this.orderId;
9489
    }
9490
 
9491
    public addBillingDetails_args setOrderId(long orderId) {
9492
      this.orderId = orderId;
9493
      setOrderIdIsSet(true);
9494
      return this;
9495
    }
9496
 
9497
    public void unsetOrderId() {
9498
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9499
    }
9500
 
9501
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9502
    public boolean isSetOrderId() {
9503
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9504
    }
9505
 
9506
    public void setOrderIdIsSet(boolean value) {
9507
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9508
    }
9509
 
9510
    public String getInvoice_number() {
9511
      return this.invoice_number;
9512
    }
9513
 
9514
    public addBillingDetails_args setInvoice_number(String invoice_number) {
9515
      this.invoice_number = invoice_number;
9516
      return this;
9517
    }
9518
 
9519
    public void unsetInvoice_number() {
9520
      this.invoice_number = null;
9521
    }
9522
 
9523
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
9524
    public boolean isSetInvoice_number() {
9525
      return this.invoice_number != null;
9526
    }
9527
 
9528
    public void setInvoice_numberIsSet(boolean value) {
9529
      if (!value) {
9530
        this.invoice_number = null;
9531
      }
9532
    }
9533
 
9534
    public String getBilled_by() {
9535
      return this.billed_by;
9536
    }
9537
 
9538
    public addBillingDetails_args setBilled_by(String billed_by) {
9539
      this.billed_by = billed_by;
9540
      return this;
9541
    }
9542
 
9543
    public void unsetBilled_by() {
9544
      this.billed_by = null;
9545
    }
9546
 
9547
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
9548
    public boolean isSetBilled_by() {
9549
      return this.billed_by != null;
9550
    }
9551
 
9552
    public void setBilled_byIsSet(boolean value) {
9553
      if (!value) {
9554
        this.billed_by = null;
9555
      }
9556
    }
9557
 
9558
    public void setFieldValue(_Fields field, Object value) {
9559
      switch (field) {
9560
      case ORDER_ID:
9561
        if (value == null) {
9562
          unsetOrderId();
9563
        } else {
9564
          setOrderId((Long)value);
9565
        }
9566
        break;
9567
 
9568
      case INVOICE_NUMBER:
9569
        if (value == null) {
9570
          unsetInvoice_number();
9571
        } else {
9572
          setInvoice_number((String)value);
9573
        }
9574
        break;
9575
 
9576
      case BILLED_BY:
9577
        if (value == null) {
9578
          unsetBilled_by();
9579
        } else {
9580
          setBilled_by((String)value);
9581
        }
9582
        break;
9583
 
9584
      }
9585
    }
9586
 
9587
    public void setFieldValue(int fieldID, Object value) {
9588
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9589
    }
9590
 
9591
    public Object getFieldValue(_Fields field) {
9592
      switch (field) {
9593
      case ORDER_ID:
9594
        return new Long(getOrderId());
9595
 
9596
      case INVOICE_NUMBER:
9597
        return getInvoice_number();
9598
 
9599
      case BILLED_BY:
9600
        return getBilled_by();
9601
 
9602
      }
9603
      throw new IllegalStateException();
9604
    }
9605
 
9606
    public Object getFieldValue(int fieldId) {
9607
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9608
    }
9609
 
9610
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9611
    public boolean isSet(_Fields field) {
9612
      switch (field) {
9613
      case ORDER_ID:
9614
        return isSetOrderId();
9615
      case INVOICE_NUMBER:
9616
        return isSetInvoice_number();
9617
      case BILLED_BY:
9618
        return isSetBilled_by();
9619
      }
9620
      throw new IllegalStateException();
9621
    }
9622
 
9623
    public boolean isSet(int fieldID) {
9624
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9625
    }
9626
 
9627
    @Override
9628
    public boolean equals(Object that) {
9629
      if (that == null)
9630
        return false;
9631
      if (that instanceof addBillingDetails_args)
9632
        return this.equals((addBillingDetails_args)that);
9633
      return false;
9634
    }
9635
 
9636
    public boolean equals(addBillingDetails_args that) {
9637
      if (that == null)
9638
        return false;
9639
 
9640
      boolean this_present_orderId = true;
9641
      boolean that_present_orderId = true;
9642
      if (this_present_orderId || that_present_orderId) {
9643
        if (!(this_present_orderId && that_present_orderId))
9644
          return false;
9645
        if (this.orderId != that.orderId)
9646
          return false;
9647
      }
9648
 
9649
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
9650
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
9651
      if (this_present_invoice_number || that_present_invoice_number) {
9652
        if (!(this_present_invoice_number && that_present_invoice_number))
9653
          return false;
9654
        if (!this.invoice_number.equals(that.invoice_number))
9655
          return false;
9656
      }
9657
 
9658
      boolean this_present_billed_by = true && this.isSetBilled_by();
9659
      boolean that_present_billed_by = true && that.isSetBilled_by();
9660
      if (this_present_billed_by || that_present_billed_by) {
9661
        if (!(this_present_billed_by && that_present_billed_by))
9662
          return false;
9663
        if (!this.billed_by.equals(that.billed_by))
9664
          return false;
9665
      }
9666
 
9667
      return true;
9668
    }
9669
 
9670
    @Override
9671
    public int hashCode() {
9672
      return 0;
9673
    }
9674
 
9675
    public int compareTo(addBillingDetails_args other) {
9676
      if (!getClass().equals(other.getClass())) {
9677
        return getClass().getName().compareTo(other.getClass().getName());
9678
      }
9679
 
9680
      int lastComparison = 0;
9681
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
9682
 
9683
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9684
      if (lastComparison != 0) {
9685
        return lastComparison;
9686
      }
9687
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9688
      if (lastComparison != 0) {
9689
        return lastComparison;
9690
      }
9691
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
9692
      if (lastComparison != 0) {
9693
        return lastComparison;
9694
      }
9695
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
9696
      if (lastComparison != 0) {
9697
        return lastComparison;
9698
      }
9699
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
9700
      if (lastComparison != 0) {
9701
        return lastComparison;
9702
      }
9703
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
9704
      if (lastComparison != 0) {
9705
        return lastComparison;
9706
      }
9707
      return 0;
9708
    }
9709
 
9710
    public void read(TProtocol iprot) throws TException {
9711
      TField field;
9712
      iprot.readStructBegin();
9713
      while (true)
9714
      {
9715
        field = iprot.readFieldBegin();
9716
        if (field.type == TType.STOP) { 
9717
          break;
9718
        }
9719
        _Fields fieldId = _Fields.findByThriftId(field.id);
9720
        if (fieldId == null) {
9721
          TProtocolUtil.skip(iprot, field.type);
9722
        } else {
9723
          switch (fieldId) {
9724
            case ORDER_ID:
9725
              if (field.type == TType.I64) {
9726
                this.orderId = iprot.readI64();
9727
                setOrderIdIsSet(true);
9728
              } else { 
9729
                TProtocolUtil.skip(iprot, field.type);
9730
              }
9731
              break;
9732
            case INVOICE_NUMBER:
9733
              if (field.type == TType.STRING) {
9734
                this.invoice_number = iprot.readString();
9735
              } else { 
9736
                TProtocolUtil.skip(iprot, field.type);
9737
              }
9738
              break;
9739
            case BILLED_BY:
9740
              if (field.type == TType.STRING) {
9741
                this.billed_by = iprot.readString();
9742
              } else { 
9743
                TProtocolUtil.skip(iprot, field.type);
9744
              }
9745
              break;
9746
          }
9747
          iprot.readFieldEnd();
9748
        }
9749
      }
9750
      iprot.readStructEnd();
9751
      validate();
9752
    }
9753
 
9754
    public void write(TProtocol oprot) throws TException {
9755
      validate();
9756
 
9757
      oprot.writeStructBegin(STRUCT_DESC);
9758
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9759
      oprot.writeI64(this.orderId);
9760
      oprot.writeFieldEnd();
9761
      if (this.invoice_number != null) {
9762
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
9763
        oprot.writeString(this.invoice_number);
9764
        oprot.writeFieldEnd();
9765
      }
9766
      if (this.billed_by != null) {
9767
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
9768
        oprot.writeString(this.billed_by);
9769
        oprot.writeFieldEnd();
9770
      }
9771
      oprot.writeFieldStop();
9772
      oprot.writeStructEnd();
9773
    }
9774
 
9775
    @Override
9776
    public String toString() {
9777
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
9778
      boolean first = true;
9779
 
9780
      sb.append("orderId:");
9781
      sb.append(this.orderId);
9782
      first = false;
9783
      if (!first) sb.append(", ");
9784
      sb.append("invoice_number:");
9785
      if (this.invoice_number == null) {
9786
        sb.append("null");
9787
      } else {
9788
        sb.append(this.invoice_number);
9789
      }
9790
      first = false;
9791
      if (!first) sb.append(", ");
9792
      sb.append("billed_by:");
9793
      if (this.billed_by == null) {
9794
        sb.append("null");
9795
      } else {
9796
        sb.append(this.billed_by);
9797
      }
9798
      first = false;
9799
      sb.append(")");
9800
      return sb.toString();
9801
    }
9802
 
9803
    public void validate() throws TException {
9804
      // check for required fields
9805
    }
9806
 
9807
  }
9808
 
9809
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
9810
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
9811
 
9812
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9813
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9814
 
9815
    private boolean success;
9816
    private TransactionServiceException ex;
9817
 
9818
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9819
    public enum _Fields implements TFieldIdEnum {
9820
      SUCCESS((short)0, "success"),
9821
      EX((short)1, "ex");
9822
 
9823
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9824
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9825
 
9826
      static {
9827
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9828
          byId.put((int)field._thriftId, field);
9829
          byName.put(field.getFieldName(), field);
9830
        }
9831
      }
9832
 
9833
      /**
9834
       * Find the _Fields constant that matches fieldId, or null if its not found.
9835
       */
9836
      public static _Fields findByThriftId(int fieldId) {
9837
        return byId.get(fieldId);
9838
      }
9839
 
9840
      /**
9841
       * Find the _Fields constant that matches fieldId, throwing an exception
9842
       * if it is not found.
9843
       */
9844
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9845
        _Fields fields = findByThriftId(fieldId);
9846
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9847
        return fields;
9848
      }
9849
 
9850
      /**
9851
       * Find the _Fields constant that matches name, or null if its not found.
9852
       */
9853
      public static _Fields findByName(String name) {
9854
        return byName.get(name);
9855
      }
9856
 
9857
      private final short _thriftId;
9858
      private final String _fieldName;
9859
 
9860
      _Fields(short thriftId, String fieldName) {
9861
        _thriftId = thriftId;
9862
        _fieldName = fieldName;
9863
      }
9864
 
9865
      public short getThriftFieldId() {
9866
        return _thriftId;
9867
      }
9868
 
9869
      public String getFieldName() {
9870
        return _fieldName;
9871
      }
9872
    }
9873
 
9874
    // isset id assignments
9875
    private static final int __SUCCESS_ISSET_ID = 0;
9876
    private BitSet __isset_bit_vector = new BitSet(1);
9877
 
9878
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9879
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9880
          new FieldValueMetaData(TType.BOOL)));
9881
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9882
          new FieldValueMetaData(TType.STRUCT)));
9883
    }});
9884
 
9885
    static {
9886
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
9887
    }
9888
 
9889
    public addBillingDetails_result() {
9890
    }
9891
 
9892
    public addBillingDetails_result(
9893
      boolean success,
9894
      TransactionServiceException ex)
9895
    {
9896
      this();
9897
      this.success = success;
9898
      setSuccessIsSet(true);
9899
      this.ex = ex;
9900
    }
9901
 
9902
    /**
9903
     * Performs a deep copy on <i>other</i>.
9904
     */
9905
    public addBillingDetails_result(addBillingDetails_result other) {
9906
      __isset_bit_vector.clear();
9907
      __isset_bit_vector.or(other.__isset_bit_vector);
9908
      this.success = other.success;
9909
      if (other.isSetEx()) {
9910
        this.ex = new TransactionServiceException(other.ex);
9911
      }
9912
    }
9913
 
9914
    public addBillingDetails_result deepCopy() {
9915
      return new addBillingDetails_result(this);
9916
    }
9917
 
9918
    @Deprecated
9919
    public addBillingDetails_result clone() {
9920
      return new addBillingDetails_result(this);
9921
    }
9922
 
9923
    public boolean isSuccess() {
9924
      return this.success;
9925
    }
9926
 
9927
    public addBillingDetails_result setSuccess(boolean success) {
9928
      this.success = success;
9929
      setSuccessIsSet(true);
9930
      return this;
9931
    }
9932
 
9933
    public void unsetSuccess() {
9934
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9935
    }
9936
 
9937
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9938
    public boolean isSetSuccess() {
9939
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9940
    }
9941
 
9942
    public void setSuccessIsSet(boolean value) {
9943
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9944
    }
9945
 
9946
    public TransactionServiceException getEx() {
9947
      return this.ex;
9948
    }
9949
 
9950
    public addBillingDetails_result setEx(TransactionServiceException ex) {
9951
      this.ex = ex;
9952
      return this;
9953
    }
9954
 
9955
    public void unsetEx() {
9956
      this.ex = null;
9957
    }
9958
 
9959
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9960
    public boolean isSetEx() {
9961
      return this.ex != null;
9962
    }
9963
 
9964
    public void setExIsSet(boolean value) {
9965
      if (!value) {
9966
        this.ex = null;
9967
      }
9968
    }
9969
 
9970
    public void setFieldValue(_Fields field, Object value) {
9971
      switch (field) {
9972
      case SUCCESS:
9973
        if (value == null) {
9974
          unsetSuccess();
9975
        } else {
9976
          setSuccess((Boolean)value);
9977
        }
9978
        break;
9979
 
9980
      case EX:
9981
        if (value == null) {
9982
          unsetEx();
9983
        } else {
9984
          setEx((TransactionServiceException)value);
9985
        }
9986
        break;
9987
 
9988
      }
9989
    }
9990
 
9991
    public void setFieldValue(int fieldID, Object value) {
9992
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9993
    }
9994
 
9995
    public Object getFieldValue(_Fields field) {
9996
      switch (field) {
9997
      case SUCCESS:
9998
        return new Boolean(isSuccess());
9999
 
10000
      case EX:
10001
        return getEx();
10002
 
10003
      }
10004
      throw new IllegalStateException();
10005
    }
10006
 
10007
    public Object getFieldValue(int fieldId) {
10008
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10009
    }
10010
 
10011
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10012
    public boolean isSet(_Fields field) {
10013
      switch (field) {
10014
      case SUCCESS:
10015
        return isSetSuccess();
10016
      case EX:
10017
        return isSetEx();
10018
      }
10019
      throw new IllegalStateException();
10020
    }
10021
 
10022
    public boolean isSet(int fieldID) {
10023
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10024
    }
10025
 
10026
    @Override
10027
    public boolean equals(Object that) {
10028
      if (that == null)
10029
        return false;
10030
      if (that instanceof addBillingDetails_result)
10031
        return this.equals((addBillingDetails_result)that);
10032
      return false;
10033
    }
10034
 
10035
    public boolean equals(addBillingDetails_result that) {
10036
      if (that == null)
10037
        return false;
10038
 
10039
      boolean this_present_success = true;
10040
      boolean that_present_success = true;
10041
      if (this_present_success || that_present_success) {
10042
        if (!(this_present_success && that_present_success))
10043
          return false;
10044
        if (this.success != that.success)
10045
          return false;
10046
      }
10047
 
10048
      boolean this_present_ex = true && this.isSetEx();
10049
      boolean that_present_ex = true && that.isSetEx();
10050
      if (this_present_ex || that_present_ex) {
10051
        if (!(this_present_ex && that_present_ex))
10052
          return false;
10053
        if (!this.ex.equals(that.ex))
10054
          return false;
10055
      }
10056
 
10057
      return true;
10058
    }
10059
 
10060
    @Override
10061
    public int hashCode() {
10062
      return 0;
10063
    }
10064
 
10065
    public int compareTo(addBillingDetails_result other) {
10066
      if (!getClass().equals(other.getClass())) {
10067
        return getClass().getName().compareTo(other.getClass().getName());
10068
      }
10069
 
10070
      int lastComparison = 0;
10071
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
10072
 
10073
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10074
      if (lastComparison != 0) {
10075
        return lastComparison;
10076
      }
10077
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10078
      if (lastComparison != 0) {
10079
        return lastComparison;
10080
      }
10081
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10082
      if (lastComparison != 0) {
10083
        return lastComparison;
10084
      }
10085
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10086
      if (lastComparison != 0) {
10087
        return lastComparison;
10088
      }
10089
      return 0;
10090
    }
10091
 
10092
    public void read(TProtocol iprot) throws TException {
10093
      TField field;
10094
      iprot.readStructBegin();
10095
      while (true)
10096
      {
10097
        field = iprot.readFieldBegin();
10098
        if (field.type == TType.STOP) { 
10099
          break;
10100
        }
10101
        _Fields fieldId = _Fields.findByThriftId(field.id);
10102
        if (fieldId == null) {
10103
          TProtocolUtil.skip(iprot, field.type);
10104
        } else {
10105
          switch (fieldId) {
10106
            case SUCCESS:
10107
              if (field.type == TType.BOOL) {
10108
                this.success = iprot.readBool();
10109
                setSuccessIsSet(true);
10110
              } else { 
10111
                TProtocolUtil.skip(iprot, field.type);
10112
              }
10113
              break;
10114
            case EX:
10115
              if (field.type == TType.STRUCT) {
10116
                this.ex = new TransactionServiceException();
10117
                this.ex.read(iprot);
10118
              } else { 
10119
                TProtocolUtil.skip(iprot, field.type);
10120
              }
10121
              break;
10122
          }
10123
          iprot.readFieldEnd();
10124
        }
10125
      }
10126
      iprot.readStructEnd();
10127
      validate();
10128
    }
10129
 
10130
    public void write(TProtocol oprot) throws TException {
10131
      oprot.writeStructBegin(STRUCT_DESC);
10132
 
10133
      if (this.isSetSuccess()) {
10134
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10135
        oprot.writeBool(this.success);
10136
        oprot.writeFieldEnd();
10137
      } else if (this.isSetEx()) {
10138
        oprot.writeFieldBegin(EX_FIELD_DESC);
10139
        this.ex.write(oprot);
10140
        oprot.writeFieldEnd();
10141
      }
10142
      oprot.writeFieldStop();
10143
      oprot.writeStructEnd();
10144
    }
10145
 
10146
    @Override
10147
    public String toString() {
10148
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
10149
      boolean first = true;
10150
 
10151
      sb.append("success:");
10152
      sb.append(this.success);
10153
      first = false;
10154
      if (!first) sb.append(", ");
10155
      sb.append("ex:");
10156
      if (this.ex == null) {
10157
        sb.append("null");
10158
      } else {
10159
        sb.append(this.ex);
10160
      }
10161
      first = false;
10162
      sb.append(")");
10163
      return sb.toString();
10164
    }
10165
 
10166
    public void validate() throws TException {
10167
      // check for required fields
10168
    }
10169
 
10170
  }
10171
 
1148 chandransh 10172
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
10173
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
10174
 
10175
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10176
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
10177
 
10178
    private long orderId;
10179
    private long jacketNumber;
10180
 
10181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10182
    public enum _Fields implements TFieldIdEnum {
10183
      ORDER_ID((short)1, "orderId"),
10184
      JACKET_NUMBER((short)2, "jacketNumber");
10185
 
10186
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10188
 
10189
      static {
10190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10191
          byId.put((int)field._thriftId, field);
10192
          byName.put(field.getFieldName(), field);
10193
        }
10194
      }
10195
 
10196
      /**
10197
       * Find the _Fields constant that matches fieldId, or null if its not found.
10198
       */
10199
      public static _Fields findByThriftId(int fieldId) {
10200
        return byId.get(fieldId);
10201
      }
10202
 
10203
      /**
10204
       * Find the _Fields constant that matches fieldId, throwing an exception
10205
       * if it is not found.
10206
       */
10207
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10208
        _Fields fields = findByThriftId(fieldId);
10209
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10210
        return fields;
10211
      }
10212
 
10213
      /**
10214
       * Find the _Fields constant that matches name, or null if its not found.
10215
       */
10216
      public static _Fields findByName(String name) {
10217
        return byName.get(name);
10218
      }
10219
 
10220
      private final short _thriftId;
10221
      private final String _fieldName;
10222
 
10223
      _Fields(short thriftId, String fieldName) {
10224
        _thriftId = thriftId;
10225
        _fieldName = fieldName;
10226
      }
10227
 
10228
      public short getThriftFieldId() {
10229
        return _thriftId;
10230
      }
10231
 
10232
      public String getFieldName() {
10233
        return _fieldName;
10234
      }
10235
    }
10236
 
10237
    // isset id assignments
10238
    private static final int __ORDERID_ISSET_ID = 0;
10239
    private static final int __JACKETNUMBER_ISSET_ID = 1;
10240
    private BitSet __isset_bit_vector = new BitSet(2);
10241
 
10242
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10243
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10244
          new FieldValueMetaData(TType.I64)));
10245
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
10246
          new FieldValueMetaData(TType.I64)));
10247
    }});
10248
 
10249
    static {
10250
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
10251
    }
10252
 
10253
    public addJacketNumber_args() {
10254
    }
10255
 
10256
    public addJacketNumber_args(
10257
      long orderId,
10258
      long jacketNumber)
10259
    {
10260
      this();
10261
      this.orderId = orderId;
10262
      setOrderIdIsSet(true);
10263
      this.jacketNumber = jacketNumber;
10264
      setJacketNumberIsSet(true);
10265
    }
10266
 
10267
    /**
10268
     * Performs a deep copy on <i>other</i>.
10269
     */
10270
    public addJacketNumber_args(addJacketNumber_args other) {
10271
      __isset_bit_vector.clear();
10272
      __isset_bit_vector.or(other.__isset_bit_vector);
10273
      this.orderId = other.orderId;
10274
      this.jacketNumber = other.jacketNumber;
10275
    }
10276
 
10277
    public addJacketNumber_args deepCopy() {
10278
      return new addJacketNumber_args(this);
10279
    }
10280
 
10281
    @Deprecated
10282
    public addJacketNumber_args clone() {
10283
      return new addJacketNumber_args(this);
10284
    }
10285
 
10286
    public long getOrderId() {
10287
      return this.orderId;
10288
    }
10289
 
10290
    public addJacketNumber_args setOrderId(long orderId) {
10291
      this.orderId = orderId;
10292
      setOrderIdIsSet(true);
10293
      return this;
10294
    }
10295
 
10296
    public void unsetOrderId() {
10297
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10298
    }
10299
 
10300
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10301
    public boolean isSetOrderId() {
10302
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10303
    }
10304
 
10305
    public void setOrderIdIsSet(boolean value) {
10306
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10307
    }
10308
 
10309
    public long getJacketNumber() {
10310
      return this.jacketNumber;
10311
    }
10312
 
10313
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
10314
      this.jacketNumber = jacketNumber;
10315
      setJacketNumberIsSet(true);
10316
      return this;
10317
    }
10318
 
10319
    public void unsetJacketNumber() {
10320
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
10321
    }
10322
 
10323
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
10324
    public boolean isSetJacketNumber() {
10325
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
10326
    }
10327
 
10328
    public void setJacketNumberIsSet(boolean value) {
10329
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
10330
    }
10331
 
10332
    public void setFieldValue(_Fields field, Object value) {
10333
      switch (field) {
10334
      case ORDER_ID:
10335
        if (value == null) {
10336
          unsetOrderId();
10337
        } else {
10338
          setOrderId((Long)value);
10339
        }
10340
        break;
10341
 
10342
      case JACKET_NUMBER:
10343
        if (value == null) {
10344
          unsetJacketNumber();
10345
        } else {
10346
          setJacketNumber((Long)value);
10347
        }
10348
        break;
10349
 
10350
      }
10351
    }
10352
 
10353
    public void setFieldValue(int fieldID, Object value) {
10354
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10355
    }
10356
 
10357
    public Object getFieldValue(_Fields field) {
10358
      switch (field) {
10359
      case ORDER_ID:
10360
        return new Long(getOrderId());
10361
 
10362
      case JACKET_NUMBER:
10363
        return new Long(getJacketNumber());
10364
 
10365
      }
10366
      throw new IllegalStateException();
10367
    }
10368
 
10369
    public Object getFieldValue(int fieldId) {
10370
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10371
    }
10372
 
10373
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10374
    public boolean isSet(_Fields field) {
10375
      switch (field) {
10376
      case ORDER_ID:
10377
        return isSetOrderId();
10378
      case JACKET_NUMBER:
10379
        return isSetJacketNumber();
10380
      }
10381
      throw new IllegalStateException();
10382
    }
10383
 
10384
    public boolean isSet(int fieldID) {
10385
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10386
    }
10387
 
10388
    @Override
10389
    public boolean equals(Object that) {
10390
      if (that == null)
10391
        return false;
10392
      if (that instanceof addJacketNumber_args)
10393
        return this.equals((addJacketNumber_args)that);
10394
      return false;
10395
    }
10396
 
10397
    public boolean equals(addJacketNumber_args that) {
10398
      if (that == null)
10399
        return false;
10400
 
10401
      boolean this_present_orderId = true;
10402
      boolean that_present_orderId = true;
10403
      if (this_present_orderId || that_present_orderId) {
10404
        if (!(this_present_orderId && that_present_orderId))
10405
          return false;
10406
        if (this.orderId != that.orderId)
10407
          return false;
10408
      }
10409
 
10410
      boolean this_present_jacketNumber = true;
10411
      boolean that_present_jacketNumber = true;
10412
      if (this_present_jacketNumber || that_present_jacketNumber) {
10413
        if (!(this_present_jacketNumber && that_present_jacketNumber))
10414
          return false;
10415
        if (this.jacketNumber != that.jacketNumber)
10416
          return false;
10417
      }
10418
 
10419
      return true;
10420
    }
10421
 
10422
    @Override
10423
    public int hashCode() {
10424
      return 0;
10425
    }
10426
 
10427
    public int compareTo(addJacketNumber_args other) {
10428
      if (!getClass().equals(other.getClass())) {
10429
        return getClass().getName().compareTo(other.getClass().getName());
10430
      }
10431
 
10432
      int lastComparison = 0;
10433
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
10434
 
10435
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10436
      if (lastComparison != 0) {
10437
        return lastComparison;
10438
      }
10439
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10440
      if (lastComparison != 0) {
10441
        return lastComparison;
10442
      }
10443
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
10444
      if (lastComparison != 0) {
10445
        return lastComparison;
10446
      }
10447
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
10448
      if (lastComparison != 0) {
10449
        return lastComparison;
10450
      }
10451
      return 0;
10452
    }
10453
 
10454
    public void read(TProtocol iprot) throws TException {
10455
      TField field;
10456
      iprot.readStructBegin();
10457
      while (true)
10458
      {
10459
        field = iprot.readFieldBegin();
10460
        if (field.type == TType.STOP) { 
10461
          break;
10462
        }
10463
        _Fields fieldId = _Fields.findByThriftId(field.id);
10464
        if (fieldId == null) {
10465
          TProtocolUtil.skip(iprot, field.type);
10466
        } else {
10467
          switch (fieldId) {
10468
            case ORDER_ID:
10469
              if (field.type == TType.I64) {
10470
                this.orderId = iprot.readI64();
10471
                setOrderIdIsSet(true);
10472
              } else { 
10473
                TProtocolUtil.skip(iprot, field.type);
10474
              }
10475
              break;
10476
            case JACKET_NUMBER:
10477
              if (field.type == TType.I64) {
10478
                this.jacketNumber = iprot.readI64();
10479
                setJacketNumberIsSet(true);
10480
              } else { 
10481
                TProtocolUtil.skip(iprot, field.type);
10482
              }
10483
              break;
10484
          }
10485
          iprot.readFieldEnd();
10486
        }
10487
      }
10488
      iprot.readStructEnd();
10489
      validate();
10490
    }
10491
 
10492
    public void write(TProtocol oprot) throws TException {
10493
      validate();
10494
 
10495
      oprot.writeStructBegin(STRUCT_DESC);
10496
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10497
      oprot.writeI64(this.orderId);
10498
      oprot.writeFieldEnd();
10499
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
10500
      oprot.writeI64(this.jacketNumber);
10501
      oprot.writeFieldEnd();
10502
      oprot.writeFieldStop();
10503
      oprot.writeStructEnd();
10504
    }
10505
 
10506
    @Override
10507
    public String toString() {
10508
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
10509
      boolean first = true;
10510
 
10511
      sb.append("orderId:");
10512
      sb.append(this.orderId);
10513
      first = false;
10514
      if (!first) sb.append(", ");
10515
      sb.append("jacketNumber:");
10516
      sb.append(this.jacketNumber);
10517
      first = false;
10518
      sb.append(")");
10519
      return sb.toString();
10520
    }
10521
 
10522
    public void validate() throws TException {
10523
      // check for required fields
10524
    }
10525
 
10526
  }
10527
 
10528
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
10529
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
10530
 
10531
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10532
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10533
 
10534
    private boolean success;
10535
    private TransactionServiceException ex;
10536
 
10537
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10538
    public enum _Fields implements TFieldIdEnum {
10539
      SUCCESS((short)0, "success"),
10540
      EX((short)1, "ex");
10541
 
10542
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10543
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10544
 
10545
      static {
10546
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10547
          byId.put((int)field._thriftId, field);
10548
          byName.put(field.getFieldName(), field);
10549
        }
10550
      }
10551
 
10552
      /**
10553
       * Find the _Fields constant that matches fieldId, or null if its not found.
10554
       */
10555
      public static _Fields findByThriftId(int fieldId) {
10556
        return byId.get(fieldId);
10557
      }
10558
 
10559
      /**
10560
       * Find the _Fields constant that matches fieldId, throwing an exception
10561
       * if it is not found.
10562
       */
10563
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10564
        _Fields fields = findByThriftId(fieldId);
10565
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10566
        return fields;
10567
      }
10568
 
10569
      /**
10570
       * Find the _Fields constant that matches name, or null if its not found.
10571
       */
10572
      public static _Fields findByName(String name) {
10573
        return byName.get(name);
10574
      }
10575
 
10576
      private final short _thriftId;
10577
      private final String _fieldName;
10578
 
10579
      _Fields(short thriftId, String fieldName) {
10580
        _thriftId = thriftId;
10581
        _fieldName = fieldName;
10582
      }
10583
 
10584
      public short getThriftFieldId() {
10585
        return _thriftId;
10586
      }
10587
 
10588
      public String getFieldName() {
10589
        return _fieldName;
10590
      }
10591
    }
10592
 
10593
    // isset id assignments
10594
    private static final int __SUCCESS_ISSET_ID = 0;
10595
    private BitSet __isset_bit_vector = new BitSet(1);
10596
 
10597
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10598
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10599
          new FieldValueMetaData(TType.BOOL)));
10600
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10601
          new FieldValueMetaData(TType.STRUCT)));
10602
    }});
10603
 
10604
    static {
10605
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
10606
    }
10607
 
10608
    public addJacketNumber_result() {
10609
    }
10610
 
10611
    public addJacketNumber_result(
10612
      boolean success,
10613
      TransactionServiceException ex)
10614
    {
10615
      this();
10616
      this.success = success;
10617
      setSuccessIsSet(true);
10618
      this.ex = ex;
10619
    }
10620
 
10621
    /**
10622
     * Performs a deep copy on <i>other</i>.
10623
     */
10624
    public addJacketNumber_result(addJacketNumber_result other) {
10625
      __isset_bit_vector.clear();
10626
      __isset_bit_vector.or(other.__isset_bit_vector);
10627
      this.success = other.success;
10628
      if (other.isSetEx()) {
10629
        this.ex = new TransactionServiceException(other.ex);
10630
      }
10631
    }
10632
 
10633
    public addJacketNumber_result deepCopy() {
10634
      return new addJacketNumber_result(this);
10635
    }
10636
 
10637
    @Deprecated
10638
    public addJacketNumber_result clone() {
10639
      return new addJacketNumber_result(this);
10640
    }
10641
 
10642
    public boolean isSuccess() {
10643
      return this.success;
10644
    }
10645
 
10646
    public addJacketNumber_result setSuccess(boolean success) {
10647
      this.success = success;
10648
      setSuccessIsSet(true);
10649
      return this;
10650
    }
10651
 
10652
    public void unsetSuccess() {
10653
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10654
    }
10655
 
10656
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10657
    public boolean isSetSuccess() {
10658
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10659
    }
10660
 
10661
    public void setSuccessIsSet(boolean value) {
10662
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10663
    }
10664
 
10665
    public TransactionServiceException getEx() {
10666
      return this.ex;
10667
    }
10668
 
10669
    public addJacketNumber_result setEx(TransactionServiceException ex) {
10670
      this.ex = ex;
10671
      return this;
10672
    }
10673
 
10674
    public void unsetEx() {
10675
      this.ex = null;
10676
    }
10677
 
10678
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10679
    public boolean isSetEx() {
10680
      return this.ex != null;
10681
    }
10682
 
10683
    public void setExIsSet(boolean value) {
10684
      if (!value) {
10685
        this.ex = null;
10686
      }
10687
    }
10688
 
10689
    public void setFieldValue(_Fields field, Object value) {
10690
      switch (field) {
10691
      case SUCCESS:
10692
        if (value == null) {
10693
          unsetSuccess();
10694
        } else {
10695
          setSuccess((Boolean)value);
10696
        }
10697
        break;
10698
 
10699
      case EX:
10700
        if (value == null) {
10701
          unsetEx();
10702
        } else {
10703
          setEx((TransactionServiceException)value);
10704
        }
10705
        break;
10706
 
10707
      }
10708
    }
10709
 
10710
    public void setFieldValue(int fieldID, Object value) {
10711
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10712
    }
10713
 
10714
    public Object getFieldValue(_Fields field) {
10715
      switch (field) {
10716
      case SUCCESS:
10717
        return new Boolean(isSuccess());
10718
 
10719
      case EX:
10720
        return getEx();
10721
 
10722
      }
10723
      throw new IllegalStateException();
10724
    }
10725
 
10726
    public Object getFieldValue(int fieldId) {
10727
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10728
    }
10729
 
10730
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10731
    public boolean isSet(_Fields field) {
10732
      switch (field) {
10733
      case SUCCESS:
10734
        return isSetSuccess();
10735
      case EX:
10736
        return isSetEx();
10737
      }
10738
      throw new IllegalStateException();
10739
    }
10740
 
10741
    public boolean isSet(int fieldID) {
10742
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10743
    }
10744
 
10745
    @Override
10746
    public boolean equals(Object that) {
10747
      if (that == null)
10748
        return false;
10749
      if (that instanceof addJacketNumber_result)
10750
        return this.equals((addJacketNumber_result)that);
10751
      return false;
10752
    }
10753
 
10754
    public boolean equals(addJacketNumber_result that) {
10755
      if (that == null)
10756
        return false;
10757
 
10758
      boolean this_present_success = true;
10759
      boolean that_present_success = true;
10760
      if (this_present_success || that_present_success) {
10761
        if (!(this_present_success && that_present_success))
10762
          return false;
10763
        if (this.success != that.success)
10764
          return false;
10765
      }
10766
 
10767
      boolean this_present_ex = true && this.isSetEx();
10768
      boolean that_present_ex = true && that.isSetEx();
10769
      if (this_present_ex || that_present_ex) {
10770
        if (!(this_present_ex && that_present_ex))
10771
          return false;
10772
        if (!this.ex.equals(that.ex))
10773
          return false;
10774
      }
10775
 
10776
      return true;
10777
    }
10778
 
10779
    @Override
10780
    public int hashCode() {
10781
      return 0;
10782
    }
10783
 
10784
    public int compareTo(addJacketNumber_result other) {
10785
      if (!getClass().equals(other.getClass())) {
10786
        return getClass().getName().compareTo(other.getClass().getName());
10787
      }
10788
 
10789
      int lastComparison = 0;
10790
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
10791
 
10792
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10793
      if (lastComparison != 0) {
10794
        return lastComparison;
10795
      }
10796
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10797
      if (lastComparison != 0) {
10798
        return lastComparison;
10799
      }
10800
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10801
      if (lastComparison != 0) {
10802
        return lastComparison;
10803
      }
10804
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10805
      if (lastComparison != 0) {
10806
        return lastComparison;
10807
      }
10808
      return 0;
10809
    }
10810
 
10811
    public void read(TProtocol iprot) throws TException {
10812
      TField field;
10813
      iprot.readStructBegin();
10814
      while (true)
10815
      {
10816
        field = iprot.readFieldBegin();
10817
        if (field.type == TType.STOP) { 
10818
          break;
10819
        }
10820
        _Fields fieldId = _Fields.findByThriftId(field.id);
10821
        if (fieldId == null) {
10822
          TProtocolUtil.skip(iprot, field.type);
10823
        } else {
10824
          switch (fieldId) {
10825
            case SUCCESS:
10826
              if (field.type == TType.BOOL) {
10827
                this.success = iprot.readBool();
10828
                setSuccessIsSet(true);
10829
              } else { 
10830
                TProtocolUtil.skip(iprot, field.type);
10831
              }
10832
              break;
10833
            case EX:
10834
              if (field.type == TType.STRUCT) {
10835
                this.ex = new TransactionServiceException();
10836
                this.ex.read(iprot);
10837
              } else { 
10838
                TProtocolUtil.skip(iprot, field.type);
10839
              }
10840
              break;
10841
          }
10842
          iprot.readFieldEnd();
10843
        }
10844
      }
10845
      iprot.readStructEnd();
10846
      validate();
10847
    }
10848
 
10849
    public void write(TProtocol oprot) throws TException {
10850
      oprot.writeStructBegin(STRUCT_DESC);
10851
 
10852
      if (this.isSetSuccess()) {
10853
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10854
        oprot.writeBool(this.success);
10855
        oprot.writeFieldEnd();
10856
      } else if (this.isSetEx()) {
10857
        oprot.writeFieldBegin(EX_FIELD_DESC);
10858
        this.ex.write(oprot);
10859
        oprot.writeFieldEnd();
10860
      }
10861
      oprot.writeFieldStop();
10862
      oprot.writeStructEnd();
10863
    }
10864
 
10865
    @Override
10866
    public String toString() {
10867
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
10868
      boolean first = true;
10869
 
10870
      sb.append("success:");
10871
      sb.append(this.success);
10872
      first = false;
10873
      if (!first) sb.append(", ");
10874
      sb.append("ex:");
10875
      if (this.ex == null) {
10876
        sb.append("null");
10877
      } else {
10878
        sb.append(this.ex);
10879
      }
10880
      first = false;
10881
      sb.append(")");
10882
      return sb.toString();
10883
    }
10884
 
10885
    public void validate() throws TException {
10886
      // check for required fields
10887
    }
10888
 
10889
  }
10890
 
923 rajveer 10891
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
10892
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
10893
 
10894
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10895
 
10896
    private long orderId;
10897
 
10898
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10899
    public enum _Fields implements TFieldIdEnum {
10900
      ORDER_ID((short)1, "orderId");
10901
 
10902
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10903
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10904
 
10905
      static {
10906
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10907
          byId.put((int)field._thriftId, field);
10908
          byName.put(field.getFieldName(), field);
10909
        }
10910
      }
10911
 
10912
      /**
10913
       * Find the _Fields constant that matches fieldId, or null if its not found.
10914
       */
10915
      public static _Fields findByThriftId(int fieldId) {
10916
        return byId.get(fieldId);
10917
      }
10918
 
10919
      /**
10920
       * Find the _Fields constant that matches fieldId, throwing an exception
10921
       * if it is not found.
10922
       */
10923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10924
        _Fields fields = findByThriftId(fieldId);
10925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10926
        return fields;
10927
      }
10928
 
10929
      /**
10930
       * Find the _Fields constant that matches name, or null if its not found.
10931
       */
10932
      public static _Fields findByName(String name) {
10933
        return byName.get(name);
10934
      }
10935
 
10936
      private final short _thriftId;
10937
      private final String _fieldName;
10938
 
10939
      _Fields(short thriftId, String fieldName) {
10940
        _thriftId = thriftId;
10941
        _fieldName = fieldName;
10942
      }
10943
 
10944
      public short getThriftFieldId() {
10945
        return _thriftId;
10946
      }
10947
 
10948
      public String getFieldName() {
10949
        return _fieldName;
10950
      }
10951
    }
10952
 
10953
    // isset id assignments
10954
    private static final int __ORDERID_ISSET_ID = 0;
10955
    private BitSet __isset_bit_vector = new BitSet(1);
10956
 
10957
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10958
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10959
          new FieldValueMetaData(TType.I64)));
10960
    }});
10961
 
10962
    static {
10963
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
10964
    }
10965
 
10966
    public acceptOrder_args() {
10967
    }
10968
 
10969
    public acceptOrder_args(
10970
      long orderId)
10971
    {
10972
      this();
10973
      this.orderId = orderId;
10974
      setOrderIdIsSet(true);
10975
    }
10976
 
10977
    /**
10978
     * Performs a deep copy on <i>other</i>.
10979
     */
10980
    public acceptOrder_args(acceptOrder_args other) {
10981
      __isset_bit_vector.clear();
10982
      __isset_bit_vector.or(other.__isset_bit_vector);
10983
      this.orderId = other.orderId;
10984
    }
10985
 
10986
    public acceptOrder_args deepCopy() {
10987
      return new acceptOrder_args(this);
10988
    }
10989
 
10990
    @Deprecated
10991
    public acceptOrder_args clone() {
10992
      return new acceptOrder_args(this);
10993
    }
10994
 
10995
    public long getOrderId() {
10996
      return this.orderId;
10997
    }
10998
 
10999
    public acceptOrder_args setOrderId(long orderId) {
11000
      this.orderId = orderId;
11001
      setOrderIdIsSet(true);
11002
      return this;
11003
    }
11004
 
11005
    public void unsetOrderId() {
11006
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11007
    }
11008
 
11009
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11010
    public boolean isSetOrderId() {
11011
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11012
    }
11013
 
11014
    public void setOrderIdIsSet(boolean value) {
11015
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11016
    }
11017
 
11018
    public void setFieldValue(_Fields field, Object value) {
11019
      switch (field) {
11020
      case ORDER_ID:
11021
        if (value == null) {
11022
          unsetOrderId();
11023
        } else {
11024
          setOrderId((Long)value);
11025
        }
11026
        break;
11027
 
11028
      }
11029
    }
11030
 
11031
    public void setFieldValue(int fieldID, Object value) {
11032
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11033
    }
11034
 
11035
    public Object getFieldValue(_Fields field) {
11036
      switch (field) {
11037
      case ORDER_ID:
11038
        return new Long(getOrderId());
11039
 
11040
      }
11041
      throw new IllegalStateException();
11042
    }
11043
 
11044
    public Object getFieldValue(int fieldId) {
11045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11046
    }
11047
 
11048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11049
    public boolean isSet(_Fields field) {
11050
      switch (field) {
11051
      case ORDER_ID:
11052
        return isSetOrderId();
11053
      }
11054
      throw new IllegalStateException();
11055
    }
11056
 
11057
    public boolean isSet(int fieldID) {
11058
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11059
    }
11060
 
11061
    @Override
11062
    public boolean equals(Object that) {
11063
      if (that == null)
11064
        return false;
11065
      if (that instanceof acceptOrder_args)
11066
        return this.equals((acceptOrder_args)that);
11067
      return false;
11068
    }
11069
 
11070
    public boolean equals(acceptOrder_args that) {
11071
      if (that == null)
11072
        return false;
11073
 
11074
      boolean this_present_orderId = true;
11075
      boolean that_present_orderId = true;
11076
      if (this_present_orderId || that_present_orderId) {
11077
        if (!(this_present_orderId && that_present_orderId))
11078
          return false;
11079
        if (this.orderId != that.orderId)
11080
          return false;
11081
      }
11082
 
11083
      return true;
11084
    }
11085
 
11086
    @Override
11087
    public int hashCode() {
11088
      return 0;
11089
    }
11090
 
11091
    public int compareTo(acceptOrder_args other) {
11092
      if (!getClass().equals(other.getClass())) {
11093
        return getClass().getName().compareTo(other.getClass().getName());
11094
      }
11095
 
11096
      int lastComparison = 0;
11097
      acceptOrder_args typedOther = (acceptOrder_args)other;
11098
 
11099
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11100
      if (lastComparison != 0) {
11101
        return lastComparison;
11102
      }
11103
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11104
      if (lastComparison != 0) {
11105
        return lastComparison;
11106
      }
11107
      return 0;
11108
    }
11109
 
11110
    public void read(TProtocol iprot) throws TException {
11111
      TField field;
11112
      iprot.readStructBegin();
11113
      while (true)
11114
      {
11115
        field = iprot.readFieldBegin();
11116
        if (field.type == TType.STOP) { 
11117
          break;
11118
        }
11119
        _Fields fieldId = _Fields.findByThriftId(field.id);
11120
        if (fieldId == null) {
11121
          TProtocolUtil.skip(iprot, field.type);
11122
        } else {
11123
          switch (fieldId) {
11124
            case ORDER_ID:
11125
              if (field.type == TType.I64) {
11126
                this.orderId = iprot.readI64();
11127
                setOrderIdIsSet(true);
11128
              } else { 
11129
                TProtocolUtil.skip(iprot, field.type);
11130
              }
11131
              break;
11132
          }
11133
          iprot.readFieldEnd();
11134
        }
11135
      }
11136
      iprot.readStructEnd();
11137
      validate();
11138
    }
11139
 
11140
    public void write(TProtocol oprot) throws TException {
11141
      validate();
11142
 
11143
      oprot.writeStructBegin(STRUCT_DESC);
11144
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11145
      oprot.writeI64(this.orderId);
11146
      oprot.writeFieldEnd();
11147
      oprot.writeFieldStop();
11148
      oprot.writeStructEnd();
11149
    }
11150
 
11151
    @Override
11152
    public String toString() {
11153
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
11154
      boolean first = true;
11155
 
11156
      sb.append("orderId:");
11157
      sb.append(this.orderId);
11158
      first = false;
11159
      sb.append(")");
11160
      return sb.toString();
11161
    }
11162
 
11163
    public void validate() throws TException {
11164
      // check for required fields
11165
    }
11166
 
11167
  }
11168
 
11169
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
11170
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
11171
 
11172
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11173
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11174
 
11175
    private boolean success;
11176
    private TransactionServiceException ex;
11177
 
11178
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11179
    public enum _Fields implements TFieldIdEnum {
11180
      SUCCESS((short)0, "success"),
11181
      EX((short)1, "ex");
11182
 
11183
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11184
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11185
 
11186
      static {
11187
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11188
          byId.put((int)field._thriftId, field);
11189
          byName.put(field.getFieldName(), field);
11190
        }
11191
      }
11192
 
11193
      /**
11194
       * Find the _Fields constant that matches fieldId, or null if its not found.
11195
       */
11196
      public static _Fields findByThriftId(int fieldId) {
11197
        return byId.get(fieldId);
11198
      }
11199
 
11200
      /**
11201
       * Find the _Fields constant that matches fieldId, throwing an exception
11202
       * if it is not found.
11203
       */
11204
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11205
        _Fields fields = findByThriftId(fieldId);
11206
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11207
        return fields;
11208
      }
11209
 
11210
      /**
11211
       * Find the _Fields constant that matches name, or null if its not found.
11212
       */
11213
      public static _Fields findByName(String name) {
11214
        return byName.get(name);
11215
      }
11216
 
11217
      private final short _thriftId;
11218
      private final String _fieldName;
11219
 
11220
      _Fields(short thriftId, String fieldName) {
11221
        _thriftId = thriftId;
11222
        _fieldName = fieldName;
11223
      }
11224
 
11225
      public short getThriftFieldId() {
11226
        return _thriftId;
11227
      }
11228
 
11229
      public String getFieldName() {
11230
        return _fieldName;
11231
      }
11232
    }
11233
 
11234
    // isset id assignments
11235
    private static final int __SUCCESS_ISSET_ID = 0;
11236
    private BitSet __isset_bit_vector = new BitSet(1);
11237
 
11238
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11239
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11240
          new FieldValueMetaData(TType.BOOL)));
11241
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11242
          new FieldValueMetaData(TType.STRUCT)));
11243
    }});
11244
 
11245
    static {
11246
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
11247
    }
11248
 
11249
    public acceptOrder_result() {
11250
    }
11251
 
11252
    public acceptOrder_result(
11253
      boolean success,
11254
      TransactionServiceException ex)
11255
    {
11256
      this();
11257
      this.success = success;
11258
      setSuccessIsSet(true);
11259
      this.ex = ex;
11260
    }
11261
 
11262
    /**
11263
     * Performs a deep copy on <i>other</i>.
11264
     */
11265
    public acceptOrder_result(acceptOrder_result other) {
11266
      __isset_bit_vector.clear();
11267
      __isset_bit_vector.or(other.__isset_bit_vector);
11268
      this.success = other.success;
11269
      if (other.isSetEx()) {
11270
        this.ex = new TransactionServiceException(other.ex);
11271
      }
11272
    }
11273
 
11274
    public acceptOrder_result deepCopy() {
11275
      return new acceptOrder_result(this);
11276
    }
11277
 
11278
    @Deprecated
11279
    public acceptOrder_result clone() {
11280
      return new acceptOrder_result(this);
11281
    }
11282
 
11283
    public boolean isSuccess() {
11284
      return this.success;
11285
    }
11286
 
11287
    public acceptOrder_result setSuccess(boolean success) {
11288
      this.success = success;
11289
      setSuccessIsSet(true);
11290
      return this;
11291
    }
11292
 
11293
    public void unsetSuccess() {
11294
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11295
    }
11296
 
11297
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11298
    public boolean isSetSuccess() {
11299
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11300
    }
11301
 
11302
    public void setSuccessIsSet(boolean value) {
11303
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11304
    }
11305
 
11306
    public TransactionServiceException getEx() {
11307
      return this.ex;
11308
    }
11309
 
11310
    public acceptOrder_result setEx(TransactionServiceException ex) {
11311
      this.ex = ex;
11312
      return this;
11313
    }
11314
 
11315
    public void unsetEx() {
11316
      this.ex = null;
11317
    }
11318
 
11319
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11320
    public boolean isSetEx() {
11321
      return this.ex != null;
11322
    }
11323
 
11324
    public void setExIsSet(boolean value) {
11325
      if (!value) {
11326
        this.ex = null;
11327
      }
11328
    }
11329
 
11330
    public void setFieldValue(_Fields field, Object value) {
11331
      switch (field) {
11332
      case SUCCESS:
11333
        if (value == null) {
11334
          unsetSuccess();
11335
        } else {
11336
          setSuccess((Boolean)value);
11337
        }
11338
        break;
11339
 
11340
      case EX:
11341
        if (value == null) {
11342
          unsetEx();
11343
        } else {
11344
          setEx((TransactionServiceException)value);
11345
        }
11346
        break;
11347
 
11348
      }
11349
    }
11350
 
11351
    public void setFieldValue(int fieldID, Object value) {
11352
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11353
    }
11354
 
11355
    public Object getFieldValue(_Fields field) {
11356
      switch (field) {
11357
      case SUCCESS:
11358
        return new Boolean(isSuccess());
11359
 
11360
      case EX:
11361
        return getEx();
11362
 
11363
      }
11364
      throw new IllegalStateException();
11365
    }
11366
 
11367
    public Object getFieldValue(int fieldId) {
11368
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11369
    }
11370
 
11371
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11372
    public boolean isSet(_Fields field) {
11373
      switch (field) {
11374
      case SUCCESS:
11375
        return isSetSuccess();
11376
      case EX:
11377
        return isSetEx();
11378
      }
11379
      throw new IllegalStateException();
11380
    }
11381
 
11382
    public boolean isSet(int fieldID) {
11383
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11384
    }
11385
 
11386
    @Override
11387
    public boolean equals(Object that) {
11388
      if (that == null)
11389
        return false;
11390
      if (that instanceof acceptOrder_result)
11391
        return this.equals((acceptOrder_result)that);
11392
      return false;
11393
    }
11394
 
11395
    public boolean equals(acceptOrder_result that) {
11396
      if (that == null)
11397
        return false;
11398
 
11399
      boolean this_present_success = true;
11400
      boolean that_present_success = true;
11401
      if (this_present_success || that_present_success) {
11402
        if (!(this_present_success && that_present_success))
11403
          return false;
11404
        if (this.success != that.success)
11405
          return false;
11406
      }
11407
 
11408
      boolean this_present_ex = true && this.isSetEx();
11409
      boolean that_present_ex = true && that.isSetEx();
11410
      if (this_present_ex || that_present_ex) {
11411
        if (!(this_present_ex && that_present_ex))
11412
          return false;
11413
        if (!this.ex.equals(that.ex))
11414
          return false;
11415
      }
11416
 
11417
      return true;
11418
    }
11419
 
11420
    @Override
11421
    public int hashCode() {
11422
      return 0;
11423
    }
11424
 
11425
    public int compareTo(acceptOrder_result other) {
11426
      if (!getClass().equals(other.getClass())) {
11427
        return getClass().getName().compareTo(other.getClass().getName());
11428
      }
11429
 
11430
      int lastComparison = 0;
11431
      acceptOrder_result typedOther = (acceptOrder_result)other;
11432
 
11433
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11434
      if (lastComparison != 0) {
11435
        return lastComparison;
11436
      }
11437
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11438
      if (lastComparison != 0) {
11439
        return lastComparison;
11440
      }
11441
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11442
      if (lastComparison != 0) {
11443
        return lastComparison;
11444
      }
11445
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11446
      if (lastComparison != 0) {
11447
        return lastComparison;
11448
      }
11449
      return 0;
11450
    }
11451
 
11452
    public void read(TProtocol iprot) throws TException {
11453
      TField field;
11454
      iprot.readStructBegin();
11455
      while (true)
11456
      {
11457
        field = iprot.readFieldBegin();
11458
        if (field.type == TType.STOP) { 
11459
          break;
11460
        }
11461
        _Fields fieldId = _Fields.findByThriftId(field.id);
11462
        if (fieldId == null) {
11463
          TProtocolUtil.skip(iprot, field.type);
11464
        } else {
11465
          switch (fieldId) {
11466
            case SUCCESS:
11467
              if (field.type == TType.BOOL) {
11468
                this.success = iprot.readBool();
11469
                setSuccessIsSet(true);
11470
              } else { 
11471
                TProtocolUtil.skip(iprot, field.type);
11472
              }
11473
              break;
11474
            case EX:
11475
              if (field.type == TType.STRUCT) {
11476
                this.ex = new TransactionServiceException();
11477
                this.ex.read(iprot);
11478
              } else { 
11479
                TProtocolUtil.skip(iprot, field.type);
11480
              }
11481
              break;
11482
          }
11483
          iprot.readFieldEnd();
11484
        }
11485
      }
11486
      iprot.readStructEnd();
11487
      validate();
11488
    }
11489
 
11490
    public void write(TProtocol oprot) throws TException {
11491
      oprot.writeStructBegin(STRUCT_DESC);
11492
 
11493
      if (this.isSetSuccess()) {
11494
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11495
        oprot.writeBool(this.success);
11496
        oprot.writeFieldEnd();
11497
      } else if (this.isSetEx()) {
11498
        oprot.writeFieldBegin(EX_FIELD_DESC);
11499
        this.ex.write(oprot);
11500
        oprot.writeFieldEnd();
11501
      }
11502
      oprot.writeFieldStop();
11503
      oprot.writeStructEnd();
11504
    }
11505
 
11506
    @Override
11507
    public String toString() {
11508
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
11509
      boolean first = true;
11510
 
11511
      sb.append("success:");
11512
      sb.append(this.success);
11513
      first = false;
11514
      if (!first) sb.append(", ");
11515
      sb.append("ex:");
11516
      if (this.ex == null) {
11517
        sb.append("null");
11518
      } else {
11519
        sb.append(this.ex);
11520
      }
11521
      first = false;
11522
      sb.append(")");
11523
      return sb.toString();
11524
    }
11525
 
11526
    public void validate() throws TException {
11527
      // check for required fields
11528
    }
11529
 
11530
  }
11531
 
11532
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
11533
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
11534
 
11535
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11536
 
11537
    private long orderId;
11538
 
11539
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11540
    public enum _Fields implements TFieldIdEnum {
11541
      ORDER_ID((short)1, "orderId");
11542
 
11543
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11544
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11545
 
11546
      static {
11547
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11548
          byId.put((int)field._thriftId, field);
11549
          byName.put(field.getFieldName(), field);
11550
        }
11551
      }
11552
 
11553
      /**
11554
       * Find the _Fields constant that matches fieldId, or null if its not found.
11555
       */
11556
      public static _Fields findByThriftId(int fieldId) {
11557
        return byId.get(fieldId);
11558
      }
11559
 
11560
      /**
11561
       * Find the _Fields constant that matches fieldId, throwing an exception
11562
       * if it is not found.
11563
       */
11564
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11565
        _Fields fields = findByThriftId(fieldId);
11566
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11567
        return fields;
11568
      }
11569
 
11570
      /**
11571
       * Find the _Fields constant that matches name, or null if its not found.
11572
       */
11573
      public static _Fields findByName(String name) {
11574
        return byName.get(name);
11575
      }
11576
 
11577
      private final short _thriftId;
11578
      private final String _fieldName;
11579
 
11580
      _Fields(short thriftId, String fieldName) {
11581
        _thriftId = thriftId;
11582
        _fieldName = fieldName;
11583
      }
11584
 
11585
      public short getThriftFieldId() {
11586
        return _thriftId;
11587
      }
11588
 
11589
      public String getFieldName() {
11590
        return _fieldName;
11591
      }
11592
    }
11593
 
11594
    // isset id assignments
11595
    private static final int __ORDERID_ISSET_ID = 0;
11596
    private BitSet __isset_bit_vector = new BitSet(1);
11597
 
11598
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11599
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
11600
          new FieldValueMetaData(TType.I64)));
11601
    }});
11602
 
11603
    static {
11604
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
11605
    }
11606
 
11607
    public billOrder_args() {
11608
    }
11609
 
11610
    public billOrder_args(
11611
      long orderId)
11612
    {
11613
      this();
11614
      this.orderId = orderId;
11615
      setOrderIdIsSet(true);
11616
    }
11617
 
11618
    /**
11619
     * Performs a deep copy on <i>other</i>.
11620
     */
11621
    public billOrder_args(billOrder_args other) {
11622
      __isset_bit_vector.clear();
11623
      __isset_bit_vector.or(other.__isset_bit_vector);
11624
      this.orderId = other.orderId;
11625
    }
11626
 
11627
    public billOrder_args deepCopy() {
11628
      return new billOrder_args(this);
11629
    }
11630
 
11631
    @Deprecated
11632
    public billOrder_args clone() {
11633
      return new billOrder_args(this);
11634
    }
11635
 
11636
    public long getOrderId() {
11637
      return this.orderId;
11638
    }
11639
 
11640
    public billOrder_args setOrderId(long orderId) {
11641
      this.orderId = orderId;
11642
      setOrderIdIsSet(true);
11643
      return this;
11644
    }
11645
 
11646
    public void unsetOrderId() {
11647
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11648
    }
11649
 
11650
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11651
    public boolean isSetOrderId() {
11652
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11653
    }
11654
 
11655
    public void setOrderIdIsSet(boolean value) {
11656
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11657
    }
11658
 
11659
    public void setFieldValue(_Fields field, Object value) {
11660
      switch (field) {
11661
      case ORDER_ID:
11662
        if (value == null) {
11663
          unsetOrderId();
11664
        } else {
11665
          setOrderId((Long)value);
11666
        }
11667
        break;
11668
 
11669
      }
11670
    }
11671
 
11672
    public void setFieldValue(int fieldID, Object value) {
11673
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11674
    }
11675
 
11676
    public Object getFieldValue(_Fields field) {
11677
      switch (field) {
11678
      case ORDER_ID:
11679
        return new Long(getOrderId());
11680
 
11681
      }
11682
      throw new IllegalStateException();
11683
    }
11684
 
11685
    public Object getFieldValue(int fieldId) {
11686
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11687
    }
11688
 
11689
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11690
    public boolean isSet(_Fields field) {
11691
      switch (field) {
11692
      case ORDER_ID:
11693
        return isSetOrderId();
11694
      }
11695
      throw new IllegalStateException();
11696
    }
11697
 
11698
    public boolean isSet(int fieldID) {
11699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11700
    }
11701
 
11702
    @Override
11703
    public boolean equals(Object that) {
11704
      if (that == null)
11705
        return false;
11706
      if (that instanceof billOrder_args)
11707
        return this.equals((billOrder_args)that);
11708
      return false;
11709
    }
11710
 
11711
    public boolean equals(billOrder_args that) {
11712
      if (that == null)
11713
        return false;
11714
 
11715
      boolean this_present_orderId = true;
11716
      boolean that_present_orderId = true;
11717
      if (this_present_orderId || that_present_orderId) {
11718
        if (!(this_present_orderId && that_present_orderId))
11719
          return false;
11720
        if (this.orderId != that.orderId)
11721
          return false;
11722
      }
11723
 
11724
      return true;
11725
    }
11726
 
11727
    @Override
11728
    public int hashCode() {
11729
      return 0;
11730
    }
11731
 
11732
    public int compareTo(billOrder_args other) {
11733
      if (!getClass().equals(other.getClass())) {
11734
        return getClass().getName().compareTo(other.getClass().getName());
11735
      }
11736
 
11737
      int lastComparison = 0;
11738
      billOrder_args typedOther = (billOrder_args)other;
11739
 
11740
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11741
      if (lastComparison != 0) {
11742
        return lastComparison;
11743
      }
11744
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11745
      if (lastComparison != 0) {
11746
        return lastComparison;
11747
      }
11748
      return 0;
11749
    }
11750
 
11751
    public void read(TProtocol iprot) throws TException {
11752
      TField field;
11753
      iprot.readStructBegin();
11754
      while (true)
11755
      {
11756
        field = iprot.readFieldBegin();
11757
        if (field.type == TType.STOP) { 
11758
          break;
11759
        }
11760
        _Fields fieldId = _Fields.findByThriftId(field.id);
11761
        if (fieldId == null) {
11762
          TProtocolUtil.skip(iprot, field.type);
11763
        } else {
11764
          switch (fieldId) {
11765
            case ORDER_ID:
11766
              if (field.type == TType.I64) {
11767
                this.orderId = iprot.readI64();
11768
                setOrderIdIsSet(true);
11769
              } else { 
11770
                TProtocolUtil.skip(iprot, field.type);
11771
              }
11772
              break;
11773
          }
11774
          iprot.readFieldEnd();
11775
        }
11776
      }
11777
      iprot.readStructEnd();
11778
      validate();
11779
    }
11780
 
11781
    public void write(TProtocol oprot) throws TException {
11782
      validate();
11783
 
11784
      oprot.writeStructBegin(STRUCT_DESC);
11785
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11786
      oprot.writeI64(this.orderId);
11787
      oprot.writeFieldEnd();
11788
      oprot.writeFieldStop();
11789
      oprot.writeStructEnd();
11790
    }
11791
 
11792
    @Override
11793
    public String toString() {
11794
      StringBuilder sb = new StringBuilder("billOrder_args(");
11795
      boolean first = true;
11796
 
11797
      sb.append("orderId:");
11798
      sb.append(this.orderId);
11799
      first = false;
11800
      sb.append(")");
11801
      return sb.toString();
11802
    }
11803
 
11804
    public void validate() throws TException {
11805
      // check for required fields
11806
    }
11807
 
11808
  }
11809
 
11810
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
11811
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
11812
 
11813
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11814
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11815
 
11816
    private boolean success;
11817
    private TransactionServiceException ex;
11818
 
11819
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11820
    public enum _Fields implements TFieldIdEnum {
11821
      SUCCESS((short)0, "success"),
11822
      EX((short)1, "ex");
11823
 
11824
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11825
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11826
 
11827
      static {
11828
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11829
          byId.put((int)field._thriftId, field);
11830
          byName.put(field.getFieldName(), field);
11831
        }
11832
      }
11833
 
11834
      /**
11835
       * Find the _Fields constant that matches fieldId, or null if its not found.
11836
       */
11837
      public static _Fields findByThriftId(int fieldId) {
11838
        return byId.get(fieldId);
11839
      }
11840
 
11841
      /**
11842
       * Find the _Fields constant that matches fieldId, throwing an exception
11843
       * if it is not found.
11844
       */
11845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11846
        _Fields fields = findByThriftId(fieldId);
11847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11848
        return fields;
11849
      }
11850
 
11851
      /**
11852
       * Find the _Fields constant that matches name, or null if its not found.
11853
       */
11854
      public static _Fields findByName(String name) {
11855
        return byName.get(name);
11856
      }
11857
 
11858
      private final short _thriftId;
11859
      private final String _fieldName;
11860
 
11861
      _Fields(short thriftId, String fieldName) {
11862
        _thriftId = thriftId;
11863
        _fieldName = fieldName;
11864
      }
11865
 
11866
      public short getThriftFieldId() {
11867
        return _thriftId;
11868
      }
11869
 
11870
      public String getFieldName() {
11871
        return _fieldName;
11872
      }
11873
    }
11874
 
11875
    // isset id assignments
11876
    private static final int __SUCCESS_ISSET_ID = 0;
11877
    private BitSet __isset_bit_vector = new BitSet(1);
11878
 
11879
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11880
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11881
          new FieldValueMetaData(TType.BOOL)));
11882
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11883
          new FieldValueMetaData(TType.STRUCT)));
11884
    }});
11885
 
11886
    static {
11887
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
11888
    }
11889
 
11890
    public billOrder_result() {
11891
    }
11892
 
11893
    public billOrder_result(
11894
      boolean success,
11895
      TransactionServiceException ex)
11896
    {
11897
      this();
11898
      this.success = success;
11899
      setSuccessIsSet(true);
11900
      this.ex = ex;
11901
    }
11902
 
11903
    /**
11904
     * Performs a deep copy on <i>other</i>.
11905
     */
11906
    public billOrder_result(billOrder_result other) {
11907
      __isset_bit_vector.clear();
11908
      __isset_bit_vector.or(other.__isset_bit_vector);
11909
      this.success = other.success;
11910
      if (other.isSetEx()) {
11911
        this.ex = new TransactionServiceException(other.ex);
11912
      }
11913
    }
11914
 
11915
    public billOrder_result deepCopy() {
11916
      return new billOrder_result(this);
11917
    }
11918
 
11919
    @Deprecated
11920
    public billOrder_result clone() {
11921
      return new billOrder_result(this);
11922
    }
11923
 
11924
    public boolean isSuccess() {
11925
      return this.success;
11926
    }
11927
 
11928
    public billOrder_result setSuccess(boolean success) {
11929
      this.success = success;
11930
      setSuccessIsSet(true);
11931
      return this;
11932
    }
11933
 
11934
    public void unsetSuccess() {
11935
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11936
    }
11937
 
11938
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11939
    public boolean isSetSuccess() {
11940
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11941
    }
11942
 
11943
    public void setSuccessIsSet(boolean value) {
11944
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11945
    }
11946
 
11947
    public TransactionServiceException getEx() {
11948
      return this.ex;
11949
    }
11950
 
11951
    public billOrder_result setEx(TransactionServiceException ex) {
11952
      this.ex = ex;
11953
      return this;
11954
    }
11955
 
11956
    public void unsetEx() {
11957
      this.ex = null;
11958
    }
11959
 
11960
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11961
    public boolean isSetEx() {
11962
      return this.ex != null;
11963
    }
11964
 
11965
    public void setExIsSet(boolean value) {
11966
      if (!value) {
11967
        this.ex = null;
11968
      }
11969
    }
11970
 
11971
    public void setFieldValue(_Fields field, Object value) {
11972
      switch (field) {
11973
      case SUCCESS:
11974
        if (value == null) {
11975
          unsetSuccess();
11976
        } else {
11977
          setSuccess((Boolean)value);
11978
        }
11979
        break;
11980
 
11981
      case EX:
11982
        if (value == null) {
11983
          unsetEx();
11984
        } else {
11985
          setEx((TransactionServiceException)value);
11986
        }
11987
        break;
11988
 
11989
      }
11990
    }
11991
 
11992
    public void setFieldValue(int fieldID, Object value) {
11993
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11994
    }
11995
 
11996
    public Object getFieldValue(_Fields field) {
11997
      switch (field) {
11998
      case SUCCESS:
11999
        return new Boolean(isSuccess());
12000
 
12001
      case EX:
12002
        return getEx();
12003
 
12004
      }
12005
      throw new IllegalStateException();
12006
    }
12007
 
12008
    public Object getFieldValue(int fieldId) {
12009
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12010
    }
12011
 
12012
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12013
    public boolean isSet(_Fields field) {
12014
      switch (field) {
12015
      case SUCCESS:
12016
        return isSetSuccess();
12017
      case EX:
12018
        return isSetEx();
12019
      }
12020
      throw new IllegalStateException();
12021
    }
12022
 
12023
    public boolean isSet(int fieldID) {
12024
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12025
    }
12026
 
12027
    @Override
12028
    public boolean equals(Object that) {
12029
      if (that == null)
12030
        return false;
12031
      if (that instanceof billOrder_result)
12032
        return this.equals((billOrder_result)that);
12033
      return false;
12034
    }
12035
 
12036
    public boolean equals(billOrder_result that) {
12037
      if (that == null)
12038
        return false;
12039
 
12040
      boolean this_present_success = true;
12041
      boolean that_present_success = true;
12042
      if (this_present_success || that_present_success) {
12043
        if (!(this_present_success && that_present_success))
12044
          return false;
12045
        if (this.success != that.success)
12046
          return false;
12047
      }
12048
 
12049
      boolean this_present_ex = true && this.isSetEx();
12050
      boolean that_present_ex = true && that.isSetEx();
12051
      if (this_present_ex || that_present_ex) {
12052
        if (!(this_present_ex && that_present_ex))
12053
          return false;
12054
        if (!this.ex.equals(that.ex))
12055
          return false;
12056
      }
12057
 
12058
      return true;
12059
    }
12060
 
12061
    @Override
12062
    public int hashCode() {
12063
      return 0;
12064
    }
12065
 
12066
    public int compareTo(billOrder_result other) {
12067
      if (!getClass().equals(other.getClass())) {
12068
        return getClass().getName().compareTo(other.getClass().getName());
12069
      }
12070
 
12071
      int lastComparison = 0;
12072
      billOrder_result typedOther = (billOrder_result)other;
12073
 
12074
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12075
      if (lastComparison != 0) {
12076
        return lastComparison;
12077
      }
12078
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12079
      if (lastComparison != 0) {
12080
        return lastComparison;
12081
      }
12082
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12083
      if (lastComparison != 0) {
12084
        return lastComparison;
12085
      }
12086
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12087
      if (lastComparison != 0) {
12088
        return lastComparison;
12089
      }
12090
      return 0;
12091
    }
12092
 
12093
    public void read(TProtocol iprot) throws TException {
12094
      TField field;
12095
      iprot.readStructBegin();
12096
      while (true)
12097
      {
12098
        field = iprot.readFieldBegin();
12099
        if (field.type == TType.STOP) { 
12100
          break;
12101
        }
12102
        _Fields fieldId = _Fields.findByThriftId(field.id);
12103
        if (fieldId == null) {
12104
          TProtocolUtil.skip(iprot, field.type);
12105
        } else {
12106
          switch (fieldId) {
12107
            case SUCCESS:
12108
              if (field.type == TType.BOOL) {
12109
                this.success = iprot.readBool();
12110
                setSuccessIsSet(true);
12111
              } else { 
12112
                TProtocolUtil.skip(iprot, field.type);
12113
              }
12114
              break;
12115
            case EX:
12116
              if (field.type == TType.STRUCT) {
12117
                this.ex = new TransactionServiceException();
12118
                this.ex.read(iprot);
12119
              } else { 
12120
                TProtocolUtil.skip(iprot, field.type);
12121
              }
12122
              break;
12123
          }
12124
          iprot.readFieldEnd();
12125
        }
12126
      }
12127
      iprot.readStructEnd();
12128
      validate();
12129
    }
12130
 
12131
    public void write(TProtocol oprot) throws TException {
12132
      oprot.writeStructBegin(STRUCT_DESC);
12133
 
12134
      if (this.isSetSuccess()) {
12135
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12136
        oprot.writeBool(this.success);
12137
        oprot.writeFieldEnd();
12138
      } else if (this.isSetEx()) {
12139
        oprot.writeFieldBegin(EX_FIELD_DESC);
12140
        this.ex.write(oprot);
12141
        oprot.writeFieldEnd();
12142
      }
12143
      oprot.writeFieldStop();
12144
      oprot.writeStructEnd();
12145
    }
12146
 
12147
    @Override
12148
    public String toString() {
12149
      StringBuilder sb = new StringBuilder("billOrder_result(");
12150
      boolean first = true;
12151
 
12152
      sb.append("success:");
12153
      sb.append(this.success);
12154
      first = false;
12155
      if (!first) sb.append(", ");
12156
      sb.append("ex:");
12157
      if (this.ex == null) {
12158
        sb.append("null");
12159
      } else {
12160
        sb.append(this.ex);
12161
      }
12162
      first = false;
12163
      sb.append(")");
12164
      return sb.toString();
12165
    }
12166
 
12167
    public void validate() throws TException {
12168
      // check for required fields
12169
    }
12170
 
12171
  }
12172
 
483 rajveer 12173
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
12174
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 12175
 
12176
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
12177
 
12178
    private long transactionId;
12179
 
12180
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12181
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12182
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 12183
 
12184
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12185
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12186
 
12187
      static {
12188
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12189
          byId.put((int)field._thriftId, field);
12190
          byName.put(field.getFieldName(), field);
12191
        }
12192
      }
12193
 
12194
      /**
12195
       * Find the _Fields constant that matches fieldId, or null if its not found.
12196
       */
12197
      public static _Fields findByThriftId(int fieldId) {
12198
        return byId.get(fieldId);
12199
      }
12200
 
12201
      /**
12202
       * Find the _Fields constant that matches fieldId, throwing an exception
12203
       * if it is not found.
12204
       */
12205
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12206
        _Fields fields = findByThriftId(fieldId);
12207
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12208
        return fields;
12209
      }
12210
 
12211
      /**
12212
       * Find the _Fields constant that matches name, or null if its not found.
12213
       */
12214
      public static _Fields findByName(String name) {
12215
        return byName.get(name);
12216
      }
12217
 
12218
      private final short _thriftId;
12219
      private final String _fieldName;
12220
 
12221
      _Fields(short thriftId, String fieldName) {
12222
        _thriftId = thriftId;
12223
        _fieldName = fieldName;
12224
      }
12225
 
12226
      public short getThriftFieldId() {
12227
        return _thriftId;
12228
      }
12229
 
12230
      public String getFieldName() {
12231
        return _fieldName;
12232
      }
12233
    }
12234
 
12235
    // isset id assignments
12236
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 12237
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 12238
 
12239
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12240
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12241
          new FieldValueMetaData(TType.I64)));
12242
    }});
12243
 
12244
    static {
483 rajveer 12245
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 12246
    }
12247
 
483 rajveer 12248
    public getOrdersForTransaction_args() {
68 ashish 12249
    }
12250
 
483 rajveer 12251
    public getOrdersForTransaction_args(
12252
      long transactionId)
68 ashish 12253
    {
12254
      this();
12255
      this.transactionId = transactionId;
12256
      setTransactionIdIsSet(true);
12257
    }
12258
 
12259
    /**
12260
     * Performs a deep copy on <i>other</i>.
12261
     */
483 rajveer 12262
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 12263
      __isset_bit_vector.clear();
12264
      __isset_bit_vector.or(other.__isset_bit_vector);
12265
      this.transactionId = other.transactionId;
12266
    }
12267
 
483 rajveer 12268
    public getOrdersForTransaction_args deepCopy() {
12269
      return new getOrdersForTransaction_args(this);
68 ashish 12270
    }
12271
 
12272
    @Deprecated
483 rajveer 12273
    public getOrdersForTransaction_args clone() {
12274
      return new getOrdersForTransaction_args(this);
68 ashish 12275
    }
12276
 
12277
    public long getTransactionId() {
12278
      return this.transactionId;
12279
    }
12280
 
483 rajveer 12281
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 12282
      this.transactionId = transactionId;
12283
      setTransactionIdIsSet(true);
12284
      return this;
12285
    }
12286
 
12287
    public void unsetTransactionId() {
12288
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12289
    }
12290
 
12291
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12292
    public boolean isSetTransactionId() {
12293
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12294
    }
12295
 
12296
    public void setTransactionIdIsSet(boolean value) {
12297
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12298
    }
12299
 
12300
    public void setFieldValue(_Fields field, Object value) {
12301
      switch (field) {
12302
      case TRANSACTION_ID:
12303
        if (value == null) {
12304
          unsetTransactionId();
12305
        } else {
12306
          setTransactionId((Long)value);
12307
        }
12308
        break;
12309
 
12310
      }
12311
    }
12312
 
12313
    public void setFieldValue(int fieldID, Object value) {
12314
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12315
    }
12316
 
12317
    public Object getFieldValue(_Fields field) {
12318
      switch (field) {
12319
      case TRANSACTION_ID:
12320
        return new Long(getTransactionId());
12321
 
12322
      }
12323
      throw new IllegalStateException();
12324
    }
12325
 
12326
    public Object getFieldValue(int fieldId) {
12327
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12328
    }
12329
 
12330
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12331
    public boolean isSet(_Fields field) {
12332
      switch (field) {
12333
      case TRANSACTION_ID:
12334
        return isSetTransactionId();
12335
      }
12336
      throw new IllegalStateException();
12337
    }
12338
 
12339
    public boolean isSet(int fieldID) {
12340
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12341
    }
12342
 
12343
    @Override
12344
    public boolean equals(Object that) {
12345
      if (that == null)
12346
        return false;
483 rajveer 12347
      if (that instanceof getOrdersForTransaction_args)
12348
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 12349
      return false;
12350
    }
12351
 
483 rajveer 12352
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 12353
      if (that == null)
12354
        return false;
12355
 
12356
      boolean this_present_transactionId = true;
12357
      boolean that_present_transactionId = true;
12358
      if (this_present_transactionId || that_present_transactionId) {
12359
        if (!(this_present_transactionId && that_present_transactionId))
12360
          return false;
12361
        if (this.transactionId != that.transactionId)
12362
          return false;
12363
      }
12364
 
12365
      return true;
12366
    }
12367
 
12368
    @Override
12369
    public int hashCode() {
12370
      return 0;
12371
    }
12372
 
483 rajveer 12373
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 12374
      if (!getClass().equals(other.getClass())) {
12375
        return getClass().getName().compareTo(other.getClass().getName());
12376
      }
12377
 
12378
      int lastComparison = 0;
483 rajveer 12379
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 12380
 
12381
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
12382
      if (lastComparison != 0) {
12383
        return lastComparison;
12384
      }
12385
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
12386
      if (lastComparison != 0) {
12387
        return lastComparison;
12388
      }
12389
      return 0;
12390
    }
12391
 
12392
    public void read(TProtocol iprot) throws TException {
12393
      TField field;
12394
      iprot.readStructBegin();
12395
      while (true)
12396
      {
12397
        field = iprot.readFieldBegin();
12398
        if (field.type == TType.STOP) { 
12399
          break;
12400
        }
12401
        _Fields fieldId = _Fields.findByThriftId(field.id);
12402
        if (fieldId == null) {
12403
          TProtocolUtil.skip(iprot, field.type);
12404
        } else {
12405
          switch (fieldId) {
12406
            case TRANSACTION_ID:
12407
              if (field.type == TType.I64) {
12408
                this.transactionId = iprot.readI64();
12409
                setTransactionIdIsSet(true);
12410
              } else { 
12411
                TProtocolUtil.skip(iprot, field.type);
12412
              }
12413
              break;
12414
          }
12415
          iprot.readFieldEnd();
12416
        }
12417
      }
12418
      iprot.readStructEnd();
12419
      validate();
12420
    }
12421
 
12422
    public void write(TProtocol oprot) throws TException {
12423
      validate();
12424
 
12425
      oprot.writeStructBegin(STRUCT_DESC);
12426
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
12427
      oprot.writeI64(this.transactionId);
12428
      oprot.writeFieldEnd();
12429
      oprot.writeFieldStop();
12430
      oprot.writeStructEnd();
12431
    }
12432
 
12433
    @Override
12434
    public String toString() {
483 rajveer 12435
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 12436
      boolean first = true;
12437
 
12438
      sb.append("transactionId:");
12439
      sb.append(this.transactionId);
12440
      first = false;
12441
      sb.append(")");
12442
      return sb.toString();
12443
    }
12444
 
12445
    public void validate() throws TException {
12446
      // check for required fields
12447
    }
12448
 
12449
  }
12450
 
483 rajveer 12451
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
12452
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 12453
 
483 rajveer 12454
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 12455
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12456
 
483 rajveer 12457
    private List<Order> success;
68 ashish 12458
    private TransactionServiceException ex;
12459
 
12460
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12461
    public enum _Fields implements TFieldIdEnum {
12462
      SUCCESS((short)0, "success"),
12463
      EX((short)1, "ex");
12464
 
12465
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12466
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12467
 
12468
      static {
12469
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12470
          byId.put((int)field._thriftId, field);
12471
          byName.put(field.getFieldName(), field);
12472
        }
12473
      }
12474
 
12475
      /**
12476
       * Find the _Fields constant that matches fieldId, or null if its not found.
12477
       */
12478
      public static _Fields findByThriftId(int fieldId) {
12479
        return byId.get(fieldId);
12480
      }
12481
 
12482
      /**
12483
       * Find the _Fields constant that matches fieldId, throwing an exception
12484
       * if it is not found.
12485
       */
12486
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12487
        _Fields fields = findByThriftId(fieldId);
12488
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12489
        return fields;
12490
      }
12491
 
12492
      /**
12493
       * Find the _Fields constant that matches name, or null if its not found.
12494
       */
12495
      public static _Fields findByName(String name) {
12496
        return byName.get(name);
12497
      }
12498
 
12499
      private final short _thriftId;
12500
      private final String _fieldName;
12501
 
12502
      _Fields(short thriftId, String fieldName) {
12503
        _thriftId = thriftId;
12504
        _fieldName = fieldName;
12505
      }
12506
 
12507
      public short getThriftFieldId() {
12508
        return _thriftId;
12509
      }
12510
 
12511
      public String getFieldName() {
12512
        return _fieldName;
12513
      }
12514
    }
12515
 
12516
    // isset id assignments
12517
 
12518
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12519
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12520
          new ListMetaData(TType.LIST, 
12521
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 12522
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12523
          new FieldValueMetaData(TType.STRUCT)));
12524
    }});
12525
 
12526
    static {
483 rajveer 12527
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 12528
    }
12529
 
483 rajveer 12530
    public getOrdersForTransaction_result() {
68 ashish 12531
    }
12532
 
483 rajveer 12533
    public getOrdersForTransaction_result(
12534
      List<Order> success,
68 ashish 12535
      TransactionServiceException ex)
12536
    {
12537
      this();
12538
      this.success = success;
12539
      this.ex = ex;
12540
    }
12541
 
12542
    /**
12543
     * Performs a deep copy on <i>other</i>.
12544
     */
483 rajveer 12545
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
12546
      if (other.isSetSuccess()) {
12547
        List<Order> __this__success = new ArrayList<Order>();
12548
        for (Order other_element : other.success) {
12549
          __this__success.add(new Order(other_element));
12550
        }
12551
        this.success = __this__success;
12552
      }
68 ashish 12553
      if (other.isSetEx()) {
12554
        this.ex = new TransactionServiceException(other.ex);
12555
      }
12556
    }
12557
 
483 rajveer 12558
    public getOrdersForTransaction_result deepCopy() {
12559
      return new getOrdersForTransaction_result(this);
68 ashish 12560
    }
12561
 
12562
    @Deprecated
483 rajveer 12563
    public getOrdersForTransaction_result clone() {
12564
      return new getOrdersForTransaction_result(this);
68 ashish 12565
    }
12566
 
483 rajveer 12567
    public int getSuccessSize() {
12568
      return (this.success == null) ? 0 : this.success.size();
12569
    }
12570
 
12571
    public java.util.Iterator<Order> getSuccessIterator() {
12572
      return (this.success == null) ? null : this.success.iterator();
12573
    }
12574
 
12575
    public void addToSuccess(Order elem) {
12576
      if (this.success == null) {
12577
        this.success = new ArrayList<Order>();
12578
      }
12579
      this.success.add(elem);
12580
    }
12581
 
12582
    public List<Order> getSuccess() {
68 ashish 12583
      return this.success;
12584
    }
12585
 
483 rajveer 12586
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 12587
      this.success = success;
12588
      return this;
12589
    }
12590
 
12591
    public void unsetSuccess() {
483 rajveer 12592
      this.success = null;
68 ashish 12593
    }
12594
 
12595
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12596
    public boolean isSetSuccess() {
483 rajveer 12597
      return this.success != null;
68 ashish 12598
    }
12599
 
12600
    public void setSuccessIsSet(boolean value) {
483 rajveer 12601
      if (!value) {
12602
        this.success = null;
12603
      }
68 ashish 12604
    }
12605
 
12606
    public TransactionServiceException getEx() {
12607
      return this.ex;
12608
    }
12609
 
483 rajveer 12610
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 12611
      this.ex = ex;
12612
      return this;
12613
    }
12614
 
12615
    public void unsetEx() {
12616
      this.ex = null;
12617
    }
12618
 
12619
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12620
    public boolean isSetEx() {
12621
      return this.ex != null;
12622
    }
12623
 
12624
    public void setExIsSet(boolean value) {
12625
      if (!value) {
12626
        this.ex = null;
12627
      }
12628
    }
12629
 
12630
    public void setFieldValue(_Fields field, Object value) {
12631
      switch (field) {
12632
      case SUCCESS:
12633
        if (value == null) {
12634
          unsetSuccess();
12635
        } else {
483 rajveer 12636
          setSuccess((List<Order>)value);
68 ashish 12637
        }
12638
        break;
12639
 
12640
      case EX:
12641
        if (value == null) {
12642
          unsetEx();
12643
        } else {
12644
          setEx((TransactionServiceException)value);
12645
        }
12646
        break;
12647
 
12648
      }
12649
    }
12650
 
12651
    public void setFieldValue(int fieldID, Object value) {
12652
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12653
    }
12654
 
12655
    public Object getFieldValue(_Fields field) {
12656
      switch (field) {
12657
      case SUCCESS:
483 rajveer 12658
        return getSuccess();
68 ashish 12659
 
12660
      case EX:
12661
        return getEx();
12662
 
12663
      }
12664
      throw new IllegalStateException();
12665
    }
12666
 
12667
    public Object getFieldValue(int fieldId) {
12668
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12669
    }
12670
 
12671
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12672
    public boolean isSet(_Fields field) {
12673
      switch (field) {
12674
      case SUCCESS:
12675
        return isSetSuccess();
12676
      case EX:
12677
        return isSetEx();
12678
      }
12679
      throw new IllegalStateException();
12680
    }
12681
 
12682
    public boolean isSet(int fieldID) {
12683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12684
    }
12685
 
12686
    @Override
12687
    public boolean equals(Object that) {
12688
      if (that == null)
12689
        return false;
483 rajveer 12690
      if (that instanceof getOrdersForTransaction_result)
12691
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 12692
      return false;
12693
    }
12694
 
483 rajveer 12695
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 12696
      if (that == null)
12697
        return false;
12698
 
483 rajveer 12699
      boolean this_present_success = true && this.isSetSuccess();
12700
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12701
      if (this_present_success || that_present_success) {
12702
        if (!(this_present_success && that_present_success))
12703
          return false;
483 rajveer 12704
        if (!this.success.equals(that.success))
68 ashish 12705
          return false;
12706
      }
12707
 
12708
      boolean this_present_ex = true && this.isSetEx();
12709
      boolean that_present_ex = true && that.isSetEx();
12710
      if (this_present_ex || that_present_ex) {
12711
        if (!(this_present_ex && that_present_ex))
12712
          return false;
12713
        if (!this.ex.equals(that.ex))
12714
          return false;
12715
      }
12716
 
12717
      return true;
12718
    }
12719
 
12720
    @Override
12721
    public int hashCode() {
12722
      return 0;
12723
    }
12724
 
483 rajveer 12725
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 12726
      if (!getClass().equals(other.getClass())) {
12727
        return getClass().getName().compareTo(other.getClass().getName());
12728
      }
12729
 
12730
      int lastComparison = 0;
483 rajveer 12731
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 12732
 
12733
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12734
      if (lastComparison != 0) {
12735
        return lastComparison;
12736
      }
12737
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12738
      if (lastComparison != 0) {
12739
        return lastComparison;
12740
      }
12741
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12742
      if (lastComparison != 0) {
12743
        return lastComparison;
12744
      }
12745
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12746
      if (lastComparison != 0) {
12747
        return lastComparison;
12748
      }
12749
      return 0;
12750
    }
12751
 
12752
    public void read(TProtocol iprot) throws TException {
12753
      TField field;
12754
      iprot.readStructBegin();
12755
      while (true)
12756
      {
12757
        field = iprot.readFieldBegin();
12758
        if (field.type == TType.STOP) { 
12759
          break;
12760
        }
12761
        _Fields fieldId = _Fields.findByThriftId(field.id);
12762
        if (fieldId == null) {
12763
          TProtocolUtil.skip(iprot, field.type);
12764
        } else {
12765
          switch (fieldId) {
12766
            case SUCCESS:
483 rajveer 12767
              if (field.type == TType.LIST) {
12768
                {
1022 varun.gupt 12769
                  TList _list24 = iprot.readListBegin();
12770
                  this.success = new ArrayList<Order>(_list24.size);
12771
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 12772
                  {
1022 varun.gupt 12773
                    Order _elem26;
12774
                    _elem26 = new Order();
12775
                    _elem26.read(iprot);
12776
                    this.success.add(_elem26);
483 rajveer 12777
                  }
12778
                  iprot.readListEnd();
12779
                }
68 ashish 12780
              } else { 
12781
                TProtocolUtil.skip(iprot, field.type);
12782
              }
12783
              break;
12784
            case EX:
12785
              if (field.type == TType.STRUCT) {
12786
                this.ex = new TransactionServiceException();
12787
                this.ex.read(iprot);
12788
              } else { 
12789
                TProtocolUtil.skip(iprot, field.type);
12790
              }
12791
              break;
12792
          }
12793
          iprot.readFieldEnd();
12794
        }
12795
      }
12796
      iprot.readStructEnd();
12797
      validate();
12798
    }
12799
 
12800
    public void write(TProtocol oprot) throws TException {
12801
      oprot.writeStructBegin(STRUCT_DESC);
12802
 
12803
      if (this.isSetSuccess()) {
12804
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12805
        {
12806
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12807
          for (Order _iter27 : this.success)
483 rajveer 12808
          {
1022 varun.gupt 12809
            _iter27.write(oprot);
483 rajveer 12810
          }
12811
          oprot.writeListEnd();
12812
        }
68 ashish 12813
        oprot.writeFieldEnd();
12814
      } else if (this.isSetEx()) {
12815
        oprot.writeFieldBegin(EX_FIELD_DESC);
12816
        this.ex.write(oprot);
12817
        oprot.writeFieldEnd();
12818
      }
12819
      oprot.writeFieldStop();
12820
      oprot.writeStructEnd();
12821
    }
12822
 
12823
    @Override
12824
    public String toString() {
483 rajveer 12825
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 12826
      boolean first = true;
12827
 
12828
      sb.append("success:");
483 rajveer 12829
      if (this.success == null) {
12830
        sb.append("null");
12831
      } else {
12832
        sb.append(this.success);
12833
      }
68 ashish 12834
      first = false;
12835
      if (!first) sb.append(", ");
12836
      sb.append("ex:");
12837
      if (this.ex == null) {
12838
        sb.append("null");
12839
      } else {
12840
        sb.append(this.ex);
12841
      }
12842
      first = false;
12843
      sb.append(")");
12844
      return sb.toString();
12845
    }
12846
 
12847
    public void validate() throws TException {
12848
      // check for required fields
12849
    }
12850
 
12851
  }
12852
 
483 rajveer 12853
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
12854
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 12855
 
483 rajveer 12856
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
12857
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
12858
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
12859
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 12860
 
483 rajveer 12861
    private long customerId;
12862
    private long from_date;
12863
    private long to_date;
12864
    private OrderStatus status;
68 ashish 12865
 
12866
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12867
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12868
      CUSTOMER_ID((short)1, "customerId"),
12869
      FROM_DATE((short)2, "from_date"),
12870
      TO_DATE((short)3, "to_date"),
12871
      /**
12872
       * 
12873
       * @see OrderStatus
12874
       */
12875
      STATUS((short)4, "status");
68 ashish 12876
 
12877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12879
 
12880
      static {
12881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12882
          byId.put((int)field._thriftId, field);
12883
          byName.put(field.getFieldName(), field);
12884
        }
12885
      }
12886
 
12887
      /**
12888
       * Find the _Fields constant that matches fieldId, or null if its not found.
12889
       */
12890
      public static _Fields findByThriftId(int fieldId) {
12891
        return byId.get(fieldId);
12892
      }
12893
 
12894
      /**
12895
       * Find the _Fields constant that matches fieldId, throwing an exception
12896
       * if it is not found.
12897
       */
12898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12899
        _Fields fields = findByThriftId(fieldId);
12900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12901
        return fields;
12902
      }
12903
 
12904
      /**
12905
       * Find the _Fields constant that matches name, or null if its not found.
12906
       */
12907
      public static _Fields findByName(String name) {
12908
        return byName.get(name);
12909
      }
12910
 
12911
      private final short _thriftId;
12912
      private final String _fieldName;
12913
 
12914
      _Fields(short thriftId, String fieldName) {
12915
        _thriftId = thriftId;
12916
        _fieldName = fieldName;
12917
      }
12918
 
12919
      public short getThriftFieldId() {
12920
        return _thriftId;
12921
      }
12922
 
12923
      public String getFieldName() {
12924
        return _fieldName;
12925
      }
12926
    }
12927
 
12928
    // isset id assignments
483 rajveer 12929
    private static final int __CUSTOMERID_ISSET_ID = 0;
12930
    private static final int __FROM_DATE_ISSET_ID = 1;
12931
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 12932
    private BitSet __isset_bit_vector = new BitSet(3);
12933
 
12934
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12935
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 12936
          new FieldValueMetaData(TType.I64)));
483 rajveer 12937
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 12938
          new FieldValueMetaData(TType.I64)));
483 rajveer 12939
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 12940
          new FieldValueMetaData(TType.I64)));
483 rajveer 12941
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
12942
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 12943
    }});
12944
 
12945
    static {
483 rajveer 12946
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 12947
    }
12948
 
483 rajveer 12949
    public getOrdersForCustomer_args() {
68 ashish 12950
    }
12951
 
483 rajveer 12952
    public getOrdersForCustomer_args(
12953
      long customerId,
12954
      long from_date,
12955
      long to_date,
12956
      OrderStatus status)
68 ashish 12957
    {
12958
      this();
483 rajveer 12959
      this.customerId = customerId;
12960
      setCustomerIdIsSet(true);
12961
      this.from_date = from_date;
12962
      setFrom_dateIsSet(true);
12963
      this.to_date = to_date;
12964
      setTo_dateIsSet(true);
12965
      this.status = status;
68 ashish 12966
    }
12967
 
12968
    /**
12969
     * Performs a deep copy on <i>other</i>.
12970
     */
483 rajveer 12971
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 12972
      __isset_bit_vector.clear();
12973
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12974
      this.customerId = other.customerId;
12975
      this.from_date = other.from_date;
12976
      this.to_date = other.to_date;
12977
      if (other.isSetStatus()) {
12978
        this.status = other.status;
12979
      }
68 ashish 12980
    }
12981
 
483 rajveer 12982
    public getOrdersForCustomer_args deepCopy() {
12983
      return new getOrdersForCustomer_args(this);
68 ashish 12984
    }
12985
 
12986
    @Deprecated
483 rajveer 12987
    public getOrdersForCustomer_args clone() {
12988
      return new getOrdersForCustomer_args(this);
68 ashish 12989
    }
12990
 
483 rajveer 12991
    public long getCustomerId() {
12992
      return this.customerId;
68 ashish 12993
    }
12994
 
483 rajveer 12995
    public getOrdersForCustomer_args setCustomerId(long customerId) {
12996
      this.customerId = customerId;
12997
      setCustomerIdIsSet(true);
68 ashish 12998
      return this;
12999
    }
13000
 
483 rajveer 13001
    public void unsetCustomerId() {
13002
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 13003
    }
13004
 
483 rajveer 13005
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
13006
    public boolean isSetCustomerId() {
13007
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 13008
    }
13009
 
483 rajveer 13010
    public void setCustomerIdIsSet(boolean value) {
13011
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 13012
    }
13013
 
483 rajveer 13014
    public long getFrom_date() {
13015
      return this.from_date;
68 ashish 13016
    }
13017
 
483 rajveer 13018
    public getOrdersForCustomer_args setFrom_date(long from_date) {
13019
      this.from_date = from_date;
13020
      setFrom_dateIsSet(true);
68 ashish 13021
      return this;
13022
    }
13023
 
483 rajveer 13024
    public void unsetFrom_date() {
13025
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 13026
    }
13027
 
483 rajveer 13028
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
13029
    public boolean isSetFrom_date() {
13030
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 13031
    }
13032
 
483 rajveer 13033
    public void setFrom_dateIsSet(boolean value) {
13034
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 13035
    }
13036
 
483 rajveer 13037
    public long getTo_date() {
13038
      return this.to_date;
68 ashish 13039
    }
13040
 
483 rajveer 13041
    public getOrdersForCustomer_args setTo_date(long to_date) {
13042
      this.to_date = to_date;
13043
      setTo_dateIsSet(true);
68 ashish 13044
      return this;
13045
    }
13046
 
483 rajveer 13047
    public void unsetTo_date() {
13048
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 13049
    }
13050
 
483 rajveer 13051
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
13052
    public boolean isSetTo_date() {
13053
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 13054
    }
13055
 
483 rajveer 13056
    public void setTo_dateIsSet(boolean value) {
13057
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 13058
    }
13059
 
483 rajveer 13060
    /**
13061
     * 
13062
     * @see OrderStatus
13063
     */
13064
    public OrderStatus getStatus() {
13065
      return this.status;
13066
    }
13067
 
13068
    /**
13069
     * 
13070
     * @see OrderStatus
13071
     */
13072
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
13073
      this.status = status;
13074
      return this;
13075
    }
13076
 
13077
    public void unsetStatus() {
13078
      this.status = null;
13079
    }
13080
 
13081
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
13082
    public boolean isSetStatus() {
13083
      return this.status != null;
13084
    }
13085
 
13086
    public void setStatusIsSet(boolean value) {
13087
      if (!value) {
13088
        this.status = null;
13089
      }
13090
    }
13091
 
68 ashish 13092
    public void setFieldValue(_Fields field, Object value) {
13093
      switch (field) {
483 rajveer 13094
      case CUSTOMER_ID:
68 ashish 13095
        if (value == null) {
483 rajveer 13096
          unsetCustomerId();
68 ashish 13097
        } else {
483 rajveer 13098
          setCustomerId((Long)value);
68 ashish 13099
        }
13100
        break;
13101
 
483 rajveer 13102
      case FROM_DATE:
68 ashish 13103
        if (value == null) {
483 rajveer 13104
          unsetFrom_date();
68 ashish 13105
        } else {
483 rajveer 13106
          setFrom_date((Long)value);
68 ashish 13107
        }
13108
        break;
13109
 
483 rajveer 13110
      case TO_DATE:
68 ashish 13111
        if (value == null) {
483 rajveer 13112
          unsetTo_date();
68 ashish 13113
        } else {
483 rajveer 13114
          setTo_date((Long)value);
68 ashish 13115
        }
13116
        break;
13117
 
483 rajveer 13118
      case STATUS:
13119
        if (value == null) {
13120
          unsetStatus();
13121
        } else {
13122
          setStatus((OrderStatus)value);
13123
        }
13124
        break;
13125
 
68 ashish 13126
      }
13127
    }
13128
 
13129
    public void setFieldValue(int fieldID, Object value) {
13130
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13131
    }
13132
 
13133
    public Object getFieldValue(_Fields field) {
13134
      switch (field) {
483 rajveer 13135
      case CUSTOMER_ID:
13136
        return new Long(getCustomerId());
68 ashish 13137
 
483 rajveer 13138
      case FROM_DATE:
13139
        return new Long(getFrom_date());
68 ashish 13140
 
483 rajveer 13141
      case TO_DATE:
13142
        return new Long(getTo_date());
68 ashish 13143
 
483 rajveer 13144
      case STATUS:
13145
        return getStatus();
13146
 
68 ashish 13147
      }
13148
      throw new IllegalStateException();
13149
    }
13150
 
13151
    public Object getFieldValue(int fieldId) {
13152
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13153
    }
13154
 
13155
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13156
    public boolean isSet(_Fields field) {
13157
      switch (field) {
483 rajveer 13158
      case CUSTOMER_ID:
13159
        return isSetCustomerId();
13160
      case FROM_DATE:
13161
        return isSetFrom_date();
13162
      case TO_DATE:
13163
        return isSetTo_date();
13164
      case STATUS:
13165
        return isSetStatus();
68 ashish 13166
      }
13167
      throw new IllegalStateException();
13168
    }
13169
 
13170
    public boolean isSet(int fieldID) {
13171
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13172
    }
13173
 
13174
    @Override
13175
    public boolean equals(Object that) {
13176
      if (that == null)
13177
        return false;
483 rajveer 13178
      if (that instanceof getOrdersForCustomer_args)
13179
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 13180
      return false;
13181
    }
13182
 
483 rajveer 13183
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 13184
      if (that == null)
13185
        return false;
13186
 
483 rajveer 13187
      boolean this_present_customerId = true;
13188
      boolean that_present_customerId = true;
13189
      if (this_present_customerId || that_present_customerId) {
13190
        if (!(this_present_customerId && that_present_customerId))
68 ashish 13191
          return false;
483 rajveer 13192
        if (this.customerId != that.customerId)
68 ashish 13193
          return false;
13194
      }
13195
 
483 rajveer 13196
      boolean this_present_from_date = true;
13197
      boolean that_present_from_date = true;
13198
      if (this_present_from_date || that_present_from_date) {
13199
        if (!(this_present_from_date && that_present_from_date))
68 ashish 13200
          return false;
483 rajveer 13201
        if (this.from_date != that.from_date)
68 ashish 13202
          return false;
13203
      }
13204
 
483 rajveer 13205
      boolean this_present_to_date = true;
13206
      boolean that_present_to_date = true;
13207
      if (this_present_to_date || that_present_to_date) {
13208
        if (!(this_present_to_date && that_present_to_date))
68 ashish 13209
          return false;
483 rajveer 13210
        if (this.to_date != that.to_date)
68 ashish 13211
          return false;
13212
      }
13213
 
483 rajveer 13214
      boolean this_present_status = true && this.isSetStatus();
13215
      boolean that_present_status = true && that.isSetStatus();
13216
      if (this_present_status || that_present_status) {
13217
        if (!(this_present_status && that_present_status))
13218
          return false;
13219
        if (!this.status.equals(that.status))
13220
          return false;
13221
      }
13222
 
68 ashish 13223
      return true;
13224
    }
13225
 
13226
    @Override
13227
    public int hashCode() {
13228
      return 0;
13229
    }
13230
 
483 rajveer 13231
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 13232
      if (!getClass().equals(other.getClass())) {
13233
        return getClass().getName().compareTo(other.getClass().getName());
13234
      }
13235
 
13236
      int lastComparison = 0;
483 rajveer 13237
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 13238
 
483 rajveer 13239
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 13240
      if (lastComparison != 0) {
13241
        return lastComparison;
13242
      }
483 rajveer 13243
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 13244
      if (lastComparison != 0) {
13245
        return lastComparison;
13246
      }
483 rajveer 13247
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 13248
      if (lastComparison != 0) {
13249
        return lastComparison;
13250
      }
483 rajveer 13251
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 13252
      if (lastComparison != 0) {
13253
        return lastComparison;
13254
      }
483 rajveer 13255
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 13256
      if (lastComparison != 0) {
13257
        return lastComparison;
13258
      }
483 rajveer 13259
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 13260
      if (lastComparison != 0) {
13261
        return lastComparison;
13262
      }
483 rajveer 13263
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
13264
      if (lastComparison != 0) {
13265
        return lastComparison;
13266
      }
13267
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
13268
      if (lastComparison != 0) {
13269
        return lastComparison;
13270
      }
68 ashish 13271
      return 0;
13272
    }
13273
 
13274
    public void read(TProtocol iprot) throws TException {
13275
      TField field;
13276
      iprot.readStructBegin();
13277
      while (true)
13278
      {
13279
        field = iprot.readFieldBegin();
13280
        if (field.type == TType.STOP) { 
13281
          break;
13282
        }
13283
        _Fields fieldId = _Fields.findByThriftId(field.id);
13284
        if (fieldId == null) {
13285
          TProtocolUtil.skip(iprot, field.type);
13286
        } else {
13287
          switch (fieldId) {
483 rajveer 13288
            case CUSTOMER_ID:
68 ashish 13289
              if (field.type == TType.I64) {
483 rajveer 13290
                this.customerId = iprot.readI64();
13291
                setCustomerIdIsSet(true);
68 ashish 13292
              } else { 
13293
                TProtocolUtil.skip(iprot, field.type);
13294
              }
13295
              break;
483 rajveer 13296
            case FROM_DATE:
68 ashish 13297
              if (field.type == TType.I64) {
483 rajveer 13298
                this.from_date = iprot.readI64();
13299
                setFrom_dateIsSet(true);
68 ashish 13300
              } else { 
13301
                TProtocolUtil.skip(iprot, field.type);
13302
              }
13303
              break;
483 rajveer 13304
            case TO_DATE:
68 ashish 13305
              if (field.type == TType.I64) {
483 rajveer 13306
                this.to_date = iprot.readI64();
13307
                setTo_dateIsSet(true);
68 ashish 13308
              } else { 
13309
                TProtocolUtil.skip(iprot, field.type);
13310
              }
13311
              break;
483 rajveer 13312
            case STATUS:
13313
              if (field.type == TType.I32) {
13314
                this.status = OrderStatus.findByValue(iprot.readI32());
13315
              } else { 
13316
                TProtocolUtil.skip(iprot, field.type);
13317
              }
13318
              break;
68 ashish 13319
          }
13320
          iprot.readFieldEnd();
13321
        }
13322
      }
13323
      iprot.readStructEnd();
13324
      validate();
13325
    }
13326
 
13327
    public void write(TProtocol oprot) throws TException {
13328
      validate();
13329
 
13330
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13331
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
13332
      oprot.writeI64(this.customerId);
68 ashish 13333
      oprot.writeFieldEnd();
483 rajveer 13334
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
13335
      oprot.writeI64(this.from_date);
68 ashish 13336
      oprot.writeFieldEnd();
483 rajveer 13337
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
13338
      oprot.writeI64(this.to_date);
68 ashish 13339
      oprot.writeFieldEnd();
483 rajveer 13340
      if (this.status != null) {
13341
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
13342
        oprot.writeI32(this.status.getValue());
13343
        oprot.writeFieldEnd();
13344
      }
68 ashish 13345
      oprot.writeFieldStop();
13346
      oprot.writeStructEnd();
13347
    }
13348
 
13349
    @Override
13350
    public String toString() {
483 rajveer 13351
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 13352
      boolean first = true;
13353
 
483 rajveer 13354
      sb.append("customerId:");
13355
      sb.append(this.customerId);
68 ashish 13356
      first = false;
13357
      if (!first) sb.append(", ");
483 rajveer 13358
      sb.append("from_date:");
13359
      sb.append(this.from_date);
68 ashish 13360
      first = false;
13361
      if (!first) sb.append(", ");
483 rajveer 13362
      sb.append("to_date:");
13363
      sb.append(this.to_date);
68 ashish 13364
      first = false;
483 rajveer 13365
      if (!first) sb.append(", ");
13366
      sb.append("status:");
13367
      if (this.status == null) {
13368
        sb.append("null");
13369
      } else {
13370
        String status_name = status.name();
13371
        if (status_name != null) {
13372
          sb.append(status_name);
13373
          sb.append(" (");
13374
        }
13375
        sb.append(this.status);
13376
        if (status_name != null) {
13377
          sb.append(")");
13378
        }
13379
      }
13380
      first = false;
68 ashish 13381
      sb.append(")");
13382
      return sb.toString();
13383
    }
13384
 
13385
    public void validate() throws TException {
13386
      // check for required fields
13387
    }
13388
 
13389
  }
13390
 
483 rajveer 13391
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
13392
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 13393
 
483 rajveer 13394
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 13395
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13396
 
483 rajveer 13397
    private List<Order> success;
68 ashish 13398
    private TransactionServiceException ex;
13399
 
13400
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13401
    public enum _Fields implements TFieldIdEnum {
13402
      SUCCESS((short)0, "success"),
13403
      EX((short)1, "ex");
13404
 
13405
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13406
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13407
 
13408
      static {
13409
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13410
          byId.put((int)field._thriftId, field);
13411
          byName.put(field.getFieldName(), field);
13412
        }
13413
      }
13414
 
13415
      /**
13416
       * Find the _Fields constant that matches fieldId, or null if its not found.
13417
       */
13418
      public static _Fields findByThriftId(int fieldId) {
13419
        return byId.get(fieldId);
13420
      }
13421
 
13422
      /**
13423
       * Find the _Fields constant that matches fieldId, throwing an exception
13424
       * if it is not found.
13425
       */
13426
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13427
        _Fields fields = findByThriftId(fieldId);
13428
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13429
        return fields;
13430
      }
13431
 
13432
      /**
13433
       * Find the _Fields constant that matches name, or null if its not found.
13434
       */
13435
      public static _Fields findByName(String name) {
13436
        return byName.get(name);
13437
      }
13438
 
13439
      private final short _thriftId;
13440
      private final String _fieldName;
13441
 
13442
      _Fields(short thriftId, String fieldName) {
13443
        _thriftId = thriftId;
13444
        _fieldName = fieldName;
13445
      }
13446
 
13447
      public short getThriftFieldId() {
13448
        return _thriftId;
13449
      }
13450
 
13451
      public String getFieldName() {
13452
        return _fieldName;
13453
      }
13454
    }
13455
 
13456
    // isset id assignments
13457
 
13458
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13459
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13460
          new ListMetaData(TType.LIST, 
13461
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 13462
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13463
          new FieldValueMetaData(TType.STRUCT)));
13464
    }});
13465
 
13466
    static {
483 rajveer 13467
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 13468
    }
13469
 
483 rajveer 13470
    public getOrdersForCustomer_result() {
68 ashish 13471
    }
13472
 
483 rajveer 13473
    public getOrdersForCustomer_result(
13474
      List<Order> success,
68 ashish 13475
      TransactionServiceException ex)
13476
    {
13477
      this();
13478
      this.success = success;
13479
      this.ex = ex;
13480
    }
13481
 
13482
    /**
13483
     * Performs a deep copy on <i>other</i>.
13484
     */
483 rajveer 13485
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
13486
      if (other.isSetSuccess()) {
13487
        List<Order> __this__success = new ArrayList<Order>();
13488
        for (Order other_element : other.success) {
13489
          __this__success.add(new Order(other_element));
13490
        }
13491
        this.success = __this__success;
13492
      }
68 ashish 13493
      if (other.isSetEx()) {
13494
        this.ex = new TransactionServiceException(other.ex);
13495
      }
13496
    }
13497
 
483 rajveer 13498
    public getOrdersForCustomer_result deepCopy() {
13499
      return new getOrdersForCustomer_result(this);
68 ashish 13500
    }
13501
 
13502
    @Deprecated
483 rajveer 13503
    public getOrdersForCustomer_result clone() {
13504
      return new getOrdersForCustomer_result(this);
68 ashish 13505
    }
13506
 
483 rajveer 13507
    public int getSuccessSize() {
13508
      return (this.success == null) ? 0 : this.success.size();
13509
    }
13510
 
13511
    public java.util.Iterator<Order> getSuccessIterator() {
13512
      return (this.success == null) ? null : this.success.iterator();
13513
    }
13514
 
13515
    public void addToSuccess(Order elem) {
13516
      if (this.success == null) {
13517
        this.success = new ArrayList<Order>();
13518
      }
13519
      this.success.add(elem);
13520
    }
13521
 
13522
    public List<Order> getSuccess() {
68 ashish 13523
      return this.success;
13524
    }
13525
 
483 rajveer 13526
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 13527
      this.success = success;
13528
      return this;
13529
    }
13530
 
13531
    public void unsetSuccess() {
483 rajveer 13532
      this.success = null;
68 ashish 13533
    }
13534
 
13535
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13536
    public boolean isSetSuccess() {
483 rajveer 13537
      return this.success != null;
68 ashish 13538
    }
13539
 
13540
    public void setSuccessIsSet(boolean value) {
483 rajveer 13541
      if (!value) {
13542
        this.success = null;
13543
      }
68 ashish 13544
    }
13545
 
13546
    public TransactionServiceException getEx() {
13547
      return this.ex;
13548
    }
13549
 
483 rajveer 13550
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 13551
      this.ex = ex;
13552
      return this;
13553
    }
13554
 
13555
    public void unsetEx() {
13556
      this.ex = null;
13557
    }
13558
 
13559
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13560
    public boolean isSetEx() {
13561
      return this.ex != null;
13562
    }
13563
 
13564
    public void setExIsSet(boolean value) {
13565
      if (!value) {
13566
        this.ex = null;
13567
      }
13568
    }
13569
 
13570
    public void setFieldValue(_Fields field, Object value) {
13571
      switch (field) {
13572
      case SUCCESS:
13573
        if (value == null) {
13574
          unsetSuccess();
13575
        } else {
483 rajveer 13576
          setSuccess((List<Order>)value);
68 ashish 13577
        }
13578
        break;
13579
 
13580
      case EX:
13581
        if (value == null) {
13582
          unsetEx();
13583
        } else {
13584
          setEx((TransactionServiceException)value);
13585
        }
13586
        break;
13587
 
13588
      }
13589
    }
13590
 
13591
    public void setFieldValue(int fieldID, Object value) {
13592
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13593
    }
13594
 
13595
    public Object getFieldValue(_Fields field) {
13596
      switch (field) {
13597
      case SUCCESS:
483 rajveer 13598
        return getSuccess();
68 ashish 13599
 
13600
      case EX:
13601
        return getEx();
13602
 
13603
      }
13604
      throw new IllegalStateException();
13605
    }
13606
 
13607
    public Object getFieldValue(int fieldId) {
13608
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13609
    }
13610
 
13611
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13612
    public boolean isSet(_Fields field) {
13613
      switch (field) {
13614
      case SUCCESS:
13615
        return isSetSuccess();
13616
      case EX:
13617
        return isSetEx();
13618
      }
13619
      throw new IllegalStateException();
13620
    }
13621
 
13622
    public boolean isSet(int fieldID) {
13623
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13624
    }
13625
 
13626
    @Override
13627
    public boolean equals(Object that) {
13628
      if (that == null)
13629
        return false;
483 rajveer 13630
      if (that instanceof getOrdersForCustomer_result)
13631
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 13632
      return false;
13633
    }
13634
 
483 rajveer 13635
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 13636
      if (that == null)
13637
        return false;
13638
 
483 rajveer 13639
      boolean this_present_success = true && this.isSetSuccess();
13640
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 13641
      if (this_present_success || that_present_success) {
13642
        if (!(this_present_success && that_present_success))
13643
          return false;
483 rajveer 13644
        if (!this.success.equals(that.success))
68 ashish 13645
          return false;
13646
      }
13647
 
13648
      boolean this_present_ex = true && this.isSetEx();
13649
      boolean that_present_ex = true && that.isSetEx();
13650
      if (this_present_ex || that_present_ex) {
13651
        if (!(this_present_ex && that_present_ex))
13652
          return false;
13653
        if (!this.ex.equals(that.ex))
13654
          return false;
13655
      }
13656
 
13657
      return true;
13658
    }
13659
 
13660
    @Override
13661
    public int hashCode() {
13662
      return 0;
13663
    }
13664
 
483 rajveer 13665
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 13666
      if (!getClass().equals(other.getClass())) {
13667
        return getClass().getName().compareTo(other.getClass().getName());
13668
      }
13669
 
13670
      int lastComparison = 0;
483 rajveer 13671
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 13672
 
13673
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13674
      if (lastComparison != 0) {
13675
        return lastComparison;
13676
      }
13677
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13678
      if (lastComparison != 0) {
13679
        return lastComparison;
13680
      }
13681
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13682
      if (lastComparison != 0) {
13683
        return lastComparison;
13684
      }
13685
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13686
      if (lastComparison != 0) {
13687
        return lastComparison;
13688
      }
13689
      return 0;
13690
    }
13691
 
13692
    public void read(TProtocol iprot) throws TException {
13693
      TField field;
13694
      iprot.readStructBegin();
13695
      while (true)
13696
      {
13697
        field = iprot.readFieldBegin();
13698
        if (field.type == TType.STOP) { 
13699
          break;
13700
        }
13701
        _Fields fieldId = _Fields.findByThriftId(field.id);
13702
        if (fieldId == null) {
13703
          TProtocolUtil.skip(iprot, field.type);
13704
        } else {
13705
          switch (fieldId) {
13706
            case SUCCESS:
483 rajveer 13707
              if (field.type == TType.LIST) {
13708
                {
1022 varun.gupt 13709
                  TList _list28 = iprot.readListBegin();
13710
                  this.success = new ArrayList<Order>(_list28.size);
13711
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 13712
                  {
1022 varun.gupt 13713
                    Order _elem30;
13714
                    _elem30 = new Order();
13715
                    _elem30.read(iprot);
13716
                    this.success.add(_elem30);
483 rajveer 13717
                  }
13718
                  iprot.readListEnd();
13719
                }
68 ashish 13720
              } else { 
13721
                TProtocolUtil.skip(iprot, field.type);
13722
              }
13723
              break;
13724
            case EX:
13725
              if (field.type == TType.STRUCT) {
13726
                this.ex = new TransactionServiceException();
13727
                this.ex.read(iprot);
13728
              } else { 
13729
                TProtocolUtil.skip(iprot, field.type);
13730
              }
13731
              break;
13732
          }
13733
          iprot.readFieldEnd();
13734
        }
13735
      }
13736
      iprot.readStructEnd();
13737
      validate();
13738
    }
13739
 
13740
    public void write(TProtocol oprot) throws TException {
13741
      oprot.writeStructBegin(STRUCT_DESC);
13742
 
13743
      if (this.isSetSuccess()) {
13744
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13745
        {
13746
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 13747
          for (Order _iter31 : this.success)
483 rajveer 13748
          {
1022 varun.gupt 13749
            _iter31.write(oprot);
483 rajveer 13750
          }
13751
          oprot.writeListEnd();
13752
        }
68 ashish 13753
        oprot.writeFieldEnd();
13754
      } else if (this.isSetEx()) {
13755
        oprot.writeFieldBegin(EX_FIELD_DESC);
13756
        this.ex.write(oprot);
13757
        oprot.writeFieldEnd();
13758
      }
13759
      oprot.writeFieldStop();
13760
      oprot.writeStructEnd();
13761
    }
13762
 
13763
    @Override
13764
    public String toString() {
483 rajveer 13765
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 13766
      boolean first = true;
13767
 
13768
      sb.append("success:");
483 rajveer 13769
      if (this.success == null) {
13770
        sb.append("null");
13771
      } else {
13772
        sb.append(this.success);
13773
      }
68 ashish 13774
      first = false;
13775
      if (!first) sb.append(", ");
13776
      sb.append("ex:");
13777
      if (this.ex == null) {
13778
        sb.append("null");
13779
      } else {
13780
        sb.append(this.ex);
13781
      }
13782
      first = false;
13783
      sb.append(")");
13784
      return sb.toString();
13785
    }
13786
 
13787
    public void validate() throws TException {
13788
      // check for required fields
13789
    }
13790
 
13791
  }
13792
 
483 rajveer 13793
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
13794
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 13795
 
483 rajveer 13796
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 13797
 
483 rajveer 13798
    private Order order;
68 ashish 13799
 
13800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13801
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13802
      ORDER((short)1, "order");
68 ashish 13803
 
13804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13806
 
13807
      static {
13808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13809
          byId.put((int)field._thriftId, field);
13810
          byName.put(field.getFieldName(), field);
13811
        }
13812
      }
13813
 
13814
      /**
13815
       * Find the _Fields constant that matches fieldId, or null if its not found.
13816
       */
13817
      public static _Fields findByThriftId(int fieldId) {
13818
        return byId.get(fieldId);
13819
      }
13820
 
13821
      /**
13822
       * Find the _Fields constant that matches fieldId, throwing an exception
13823
       * if it is not found.
13824
       */
13825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13826
        _Fields fields = findByThriftId(fieldId);
13827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13828
        return fields;
13829
      }
13830
 
13831
      /**
13832
       * Find the _Fields constant that matches name, or null if its not found.
13833
       */
13834
      public static _Fields findByName(String name) {
13835
        return byName.get(name);
13836
      }
13837
 
13838
      private final short _thriftId;
13839
      private final String _fieldName;
13840
 
13841
      _Fields(short thriftId, String fieldName) {
13842
        _thriftId = thriftId;
13843
        _fieldName = fieldName;
13844
      }
13845
 
13846
      public short getThriftFieldId() {
13847
        return _thriftId;
13848
      }
13849
 
13850
      public String getFieldName() {
13851
        return _fieldName;
13852
      }
13853
    }
13854
 
13855
    // isset id assignments
13856
 
13857
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13858
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
13859
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 13860
    }});
13861
 
13862
    static {
483 rajveer 13863
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 13864
    }
13865
 
483 rajveer 13866
    public createOrder_args() {
68 ashish 13867
    }
13868
 
483 rajveer 13869
    public createOrder_args(
13870
      Order order)
68 ashish 13871
    {
13872
      this();
483 rajveer 13873
      this.order = order;
68 ashish 13874
    }
13875
 
13876
    /**
13877
     * Performs a deep copy on <i>other</i>.
13878
     */
483 rajveer 13879
    public createOrder_args(createOrder_args other) {
13880
      if (other.isSetOrder()) {
13881
        this.order = new Order(other.order);
13882
      }
68 ashish 13883
    }
13884
 
483 rajveer 13885
    public createOrder_args deepCopy() {
13886
      return new createOrder_args(this);
68 ashish 13887
    }
13888
 
13889
    @Deprecated
483 rajveer 13890
    public createOrder_args clone() {
13891
      return new createOrder_args(this);
68 ashish 13892
    }
13893
 
483 rajveer 13894
    public Order getOrder() {
13895
      return this.order;
68 ashish 13896
    }
13897
 
483 rajveer 13898
    public createOrder_args setOrder(Order order) {
13899
      this.order = order;
68 ashish 13900
      return this;
13901
    }
13902
 
483 rajveer 13903
    public void unsetOrder() {
13904
      this.order = null;
68 ashish 13905
    }
13906
 
483 rajveer 13907
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
13908
    public boolean isSetOrder() {
13909
      return this.order != null;
68 ashish 13910
    }
13911
 
483 rajveer 13912
    public void setOrderIsSet(boolean value) {
13913
      if (!value) {
13914
        this.order = null;
13915
      }
68 ashish 13916
    }
13917
 
13918
    public void setFieldValue(_Fields field, Object value) {
13919
      switch (field) {
483 rajveer 13920
      case ORDER:
68 ashish 13921
        if (value == null) {
483 rajveer 13922
          unsetOrder();
68 ashish 13923
        } else {
483 rajveer 13924
          setOrder((Order)value);
68 ashish 13925
        }
13926
        break;
13927
 
13928
      }
13929
    }
13930
 
13931
    public void setFieldValue(int fieldID, Object value) {
13932
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13933
    }
13934
 
13935
    public Object getFieldValue(_Fields field) {
13936
      switch (field) {
483 rajveer 13937
      case ORDER:
13938
        return getOrder();
68 ashish 13939
 
13940
      }
13941
      throw new IllegalStateException();
13942
    }
13943
 
13944
    public Object getFieldValue(int fieldId) {
13945
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13946
    }
13947
 
13948
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13949
    public boolean isSet(_Fields field) {
13950
      switch (field) {
483 rajveer 13951
      case ORDER:
13952
        return isSetOrder();
68 ashish 13953
      }
13954
      throw new IllegalStateException();
13955
    }
13956
 
13957
    public boolean isSet(int fieldID) {
13958
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13959
    }
13960
 
13961
    @Override
13962
    public boolean equals(Object that) {
13963
      if (that == null)
13964
        return false;
483 rajveer 13965
      if (that instanceof createOrder_args)
13966
        return this.equals((createOrder_args)that);
68 ashish 13967
      return false;
13968
    }
13969
 
483 rajveer 13970
    public boolean equals(createOrder_args that) {
68 ashish 13971
      if (that == null)
13972
        return false;
13973
 
483 rajveer 13974
      boolean this_present_order = true && this.isSetOrder();
13975
      boolean that_present_order = true && that.isSetOrder();
13976
      if (this_present_order || that_present_order) {
13977
        if (!(this_present_order && that_present_order))
68 ashish 13978
          return false;
483 rajveer 13979
        if (!this.order.equals(that.order))
68 ashish 13980
          return false;
13981
      }
13982
 
13983
      return true;
13984
    }
13985
 
13986
    @Override
13987
    public int hashCode() {
13988
      return 0;
13989
    }
13990
 
483 rajveer 13991
    public int compareTo(createOrder_args other) {
68 ashish 13992
      if (!getClass().equals(other.getClass())) {
13993
        return getClass().getName().compareTo(other.getClass().getName());
13994
      }
13995
 
13996
      int lastComparison = 0;
483 rajveer 13997
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 13998
 
483 rajveer 13999
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 14000
      if (lastComparison != 0) {
14001
        return lastComparison;
14002
      }
483 rajveer 14003
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 14004
      if (lastComparison != 0) {
14005
        return lastComparison;
14006
      }
14007
      return 0;
14008
    }
14009
 
14010
    public void read(TProtocol iprot) throws TException {
14011
      TField field;
14012
      iprot.readStructBegin();
14013
      while (true)
14014
      {
14015
        field = iprot.readFieldBegin();
14016
        if (field.type == TType.STOP) { 
14017
          break;
14018
        }
14019
        _Fields fieldId = _Fields.findByThriftId(field.id);
14020
        if (fieldId == null) {
14021
          TProtocolUtil.skip(iprot, field.type);
14022
        } else {
14023
          switch (fieldId) {
483 rajveer 14024
            case ORDER:
14025
              if (field.type == TType.STRUCT) {
14026
                this.order = new Order();
14027
                this.order.read(iprot);
68 ashish 14028
              } else { 
14029
                TProtocolUtil.skip(iprot, field.type);
14030
              }
14031
              break;
14032
          }
14033
          iprot.readFieldEnd();
14034
        }
14035
      }
14036
      iprot.readStructEnd();
14037
      validate();
14038
    }
14039
 
14040
    public void write(TProtocol oprot) throws TException {
14041
      validate();
14042
 
14043
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14044
      if (this.order != null) {
14045
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
14046
        this.order.write(oprot);
14047
        oprot.writeFieldEnd();
14048
      }
68 ashish 14049
      oprot.writeFieldStop();
14050
      oprot.writeStructEnd();
14051
    }
14052
 
14053
    @Override
14054
    public String toString() {
483 rajveer 14055
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 14056
      boolean first = true;
14057
 
483 rajveer 14058
      sb.append("order:");
14059
      if (this.order == null) {
14060
        sb.append("null");
14061
      } else {
14062
        sb.append(this.order);
14063
      }
68 ashish 14064
      first = false;
14065
      sb.append(")");
14066
      return sb.toString();
14067
    }
14068
 
14069
    public void validate() throws TException {
14070
      // check for required fields
14071
    }
14072
 
14073
  }
14074
 
483 rajveer 14075
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
14076
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 14077
 
483 rajveer 14078
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 14079
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14080
 
483 rajveer 14081
    private long success;
68 ashish 14082
    private TransactionServiceException ex;
14083
 
14084
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14085
    public enum _Fields implements TFieldIdEnum {
14086
      SUCCESS((short)0, "success"),
14087
      EX((short)1, "ex");
14088
 
14089
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14090
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14091
 
14092
      static {
14093
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14094
          byId.put((int)field._thriftId, field);
14095
          byName.put(field.getFieldName(), field);
14096
        }
14097
      }
14098
 
14099
      /**
14100
       * Find the _Fields constant that matches fieldId, or null if its not found.
14101
       */
14102
      public static _Fields findByThriftId(int fieldId) {
14103
        return byId.get(fieldId);
14104
      }
14105
 
14106
      /**
14107
       * Find the _Fields constant that matches fieldId, throwing an exception
14108
       * if it is not found.
14109
       */
14110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14111
        _Fields fields = findByThriftId(fieldId);
14112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14113
        return fields;
14114
      }
14115
 
14116
      /**
14117
       * Find the _Fields constant that matches name, or null if its not found.
14118
       */
14119
      public static _Fields findByName(String name) {
14120
        return byName.get(name);
14121
      }
14122
 
14123
      private final short _thriftId;
14124
      private final String _fieldName;
14125
 
14126
      _Fields(short thriftId, String fieldName) {
14127
        _thriftId = thriftId;
14128
        _fieldName = fieldName;
14129
      }
14130
 
14131
      public short getThriftFieldId() {
14132
        return _thriftId;
14133
      }
14134
 
14135
      public String getFieldName() {
14136
        return _fieldName;
14137
      }
14138
    }
14139
 
14140
    // isset id assignments
14141
    private static final int __SUCCESS_ISSET_ID = 0;
14142
    private BitSet __isset_bit_vector = new BitSet(1);
14143
 
14144
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14145
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14146
          new FieldValueMetaData(TType.I64)));
68 ashish 14147
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14148
          new FieldValueMetaData(TType.STRUCT)));
14149
    }});
14150
 
14151
    static {
483 rajveer 14152
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 14153
    }
14154
 
483 rajveer 14155
    public createOrder_result() {
68 ashish 14156
    }
14157
 
483 rajveer 14158
    public createOrder_result(
14159
      long success,
68 ashish 14160
      TransactionServiceException ex)
14161
    {
14162
      this();
14163
      this.success = success;
14164
      setSuccessIsSet(true);
14165
      this.ex = ex;
14166
    }
14167
 
14168
    /**
14169
     * Performs a deep copy on <i>other</i>.
14170
     */
483 rajveer 14171
    public createOrder_result(createOrder_result other) {
68 ashish 14172
      __isset_bit_vector.clear();
14173
      __isset_bit_vector.or(other.__isset_bit_vector);
14174
      this.success = other.success;
14175
      if (other.isSetEx()) {
14176
        this.ex = new TransactionServiceException(other.ex);
14177
      }
14178
    }
14179
 
483 rajveer 14180
    public createOrder_result deepCopy() {
14181
      return new createOrder_result(this);
68 ashish 14182
    }
14183
 
14184
    @Deprecated
483 rajveer 14185
    public createOrder_result clone() {
14186
      return new createOrder_result(this);
68 ashish 14187
    }
14188
 
483 rajveer 14189
    public long getSuccess() {
68 ashish 14190
      return this.success;
14191
    }
14192
 
483 rajveer 14193
    public createOrder_result setSuccess(long success) {
68 ashish 14194
      this.success = success;
14195
      setSuccessIsSet(true);
14196
      return this;
14197
    }
14198
 
14199
    public void unsetSuccess() {
14200
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14201
    }
14202
 
14203
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14204
    public boolean isSetSuccess() {
14205
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14206
    }
14207
 
14208
    public void setSuccessIsSet(boolean value) {
14209
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14210
    }
14211
 
14212
    public TransactionServiceException getEx() {
14213
      return this.ex;
14214
    }
14215
 
483 rajveer 14216
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 14217
      this.ex = ex;
14218
      return this;
14219
    }
14220
 
14221
    public void unsetEx() {
14222
      this.ex = null;
14223
    }
14224
 
14225
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14226
    public boolean isSetEx() {
14227
      return this.ex != null;
14228
    }
14229
 
14230
    public void setExIsSet(boolean value) {
14231
      if (!value) {
14232
        this.ex = null;
14233
      }
14234
    }
14235
 
14236
    public void setFieldValue(_Fields field, Object value) {
14237
      switch (field) {
14238
      case SUCCESS:
14239
        if (value == null) {
14240
          unsetSuccess();
14241
        } else {
483 rajveer 14242
          setSuccess((Long)value);
68 ashish 14243
        }
14244
        break;
14245
 
14246
      case EX:
14247
        if (value == null) {
14248
          unsetEx();
14249
        } else {
14250
          setEx((TransactionServiceException)value);
14251
        }
14252
        break;
14253
 
14254
      }
14255
    }
14256
 
14257
    public void setFieldValue(int fieldID, Object value) {
14258
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14259
    }
14260
 
14261
    public Object getFieldValue(_Fields field) {
14262
      switch (field) {
14263
      case SUCCESS:
483 rajveer 14264
        return new Long(getSuccess());
68 ashish 14265
 
14266
      case EX:
14267
        return getEx();
14268
 
14269
      }
14270
      throw new IllegalStateException();
14271
    }
14272
 
14273
    public Object getFieldValue(int fieldId) {
14274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14275
    }
14276
 
14277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14278
    public boolean isSet(_Fields field) {
14279
      switch (field) {
14280
      case SUCCESS:
14281
        return isSetSuccess();
14282
      case EX:
14283
        return isSetEx();
14284
      }
14285
      throw new IllegalStateException();
14286
    }
14287
 
14288
    public boolean isSet(int fieldID) {
14289
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14290
    }
14291
 
14292
    @Override
14293
    public boolean equals(Object that) {
14294
      if (that == null)
14295
        return false;
483 rajveer 14296
      if (that instanceof createOrder_result)
14297
        return this.equals((createOrder_result)that);
68 ashish 14298
      return false;
14299
    }
14300
 
483 rajveer 14301
    public boolean equals(createOrder_result that) {
68 ashish 14302
      if (that == null)
14303
        return false;
14304
 
14305
      boolean this_present_success = true;
14306
      boolean that_present_success = true;
14307
      if (this_present_success || that_present_success) {
14308
        if (!(this_present_success && that_present_success))
14309
          return false;
14310
        if (this.success != that.success)
14311
          return false;
14312
      }
14313
 
14314
      boolean this_present_ex = true && this.isSetEx();
14315
      boolean that_present_ex = true && that.isSetEx();
14316
      if (this_present_ex || that_present_ex) {
14317
        if (!(this_present_ex && that_present_ex))
14318
          return false;
14319
        if (!this.ex.equals(that.ex))
14320
          return false;
14321
      }
14322
 
14323
      return true;
14324
    }
14325
 
14326
    @Override
14327
    public int hashCode() {
14328
      return 0;
14329
    }
14330
 
483 rajveer 14331
    public int compareTo(createOrder_result other) {
68 ashish 14332
      if (!getClass().equals(other.getClass())) {
14333
        return getClass().getName().compareTo(other.getClass().getName());
14334
      }
14335
 
14336
      int lastComparison = 0;
483 rajveer 14337
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 14338
 
14339
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14340
      if (lastComparison != 0) {
14341
        return lastComparison;
14342
      }
14343
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14344
      if (lastComparison != 0) {
14345
        return lastComparison;
14346
      }
14347
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14348
      if (lastComparison != 0) {
14349
        return lastComparison;
14350
      }
14351
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14352
      if (lastComparison != 0) {
14353
        return lastComparison;
14354
      }
14355
      return 0;
14356
    }
14357
 
14358
    public void read(TProtocol iprot) throws TException {
14359
      TField field;
14360
      iprot.readStructBegin();
14361
      while (true)
14362
      {
14363
        field = iprot.readFieldBegin();
14364
        if (field.type == TType.STOP) { 
14365
          break;
14366
        }
14367
        _Fields fieldId = _Fields.findByThriftId(field.id);
14368
        if (fieldId == null) {
14369
          TProtocolUtil.skip(iprot, field.type);
14370
        } else {
14371
          switch (fieldId) {
14372
            case SUCCESS:
483 rajveer 14373
              if (field.type == TType.I64) {
14374
                this.success = iprot.readI64();
68 ashish 14375
                setSuccessIsSet(true);
14376
              } else { 
14377
                TProtocolUtil.skip(iprot, field.type);
14378
              }
14379
              break;
14380
            case EX:
14381
              if (field.type == TType.STRUCT) {
14382
                this.ex = new TransactionServiceException();
14383
                this.ex.read(iprot);
14384
              } else { 
14385
                TProtocolUtil.skip(iprot, field.type);
14386
              }
14387
              break;
14388
          }
14389
          iprot.readFieldEnd();
14390
        }
14391
      }
14392
      iprot.readStructEnd();
14393
      validate();
14394
    }
14395
 
14396
    public void write(TProtocol oprot) throws TException {
14397
      oprot.writeStructBegin(STRUCT_DESC);
14398
 
14399
      if (this.isSetSuccess()) {
14400
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14401
        oprot.writeI64(this.success);
68 ashish 14402
        oprot.writeFieldEnd();
14403
      } else if (this.isSetEx()) {
14404
        oprot.writeFieldBegin(EX_FIELD_DESC);
14405
        this.ex.write(oprot);
14406
        oprot.writeFieldEnd();
14407
      }
14408
      oprot.writeFieldStop();
14409
      oprot.writeStructEnd();
14410
    }
14411
 
14412
    @Override
14413
    public String toString() {
483 rajveer 14414
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 14415
      boolean first = true;
14416
 
14417
      sb.append("success:");
14418
      sb.append(this.success);
14419
      first = false;
14420
      if (!first) sb.append(", ");
14421
      sb.append("ex:");
14422
      if (this.ex == null) {
14423
        sb.append("null");
14424
      } else {
14425
        sb.append(this.ex);
14426
      }
14427
      first = false;
14428
      sb.append(")");
14429
      return sb.toString();
14430
    }
14431
 
14432
    public void validate() throws TException {
14433
      // check for required fields
14434
    }
14435
 
14436
  }
14437
 
483 rajveer 14438
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
14439
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 14440
 
483 rajveer 14441
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 14442
 
483 rajveer 14443
    private long id;
68 ashish 14444
 
14445
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14446
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14447
      ID((short)1, "id");
68 ashish 14448
 
14449
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14450
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14451
 
14452
      static {
14453
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14454
          byId.put((int)field._thriftId, field);
14455
          byName.put(field.getFieldName(), field);
14456
        }
14457
      }
14458
 
14459
      /**
14460
       * Find the _Fields constant that matches fieldId, or null if its not found.
14461
       */
14462
      public static _Fields findByThriftId(int fieldId) {
14463
        return byId.get(fieldId);
14464
      }
14465
 
14466
      /**
14467
       * Find the _Fields constant that matches fieldId, throwing an exception
14468
       * if it is not found.
14469
       */
14470
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14471
        _Fields fields = findByThriftId(fieldId);
14472
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14473
        return fields;
14474
      }
14475
 
14476
      /**
14477
       * Find the _Fields constant that matches name, or null if its not found.
14478
       */
14479
      public static _Fields findByName(String name) {
14480
        return byName.get(name);
14481
      }
14482
 
14483
      private final short _thriftId;
14484
      private final String _fieldName;
14485
 
14486
      _Fields(short thriftId, String fieldName) {
14487
        _thriftId = thriftId;
14488
        _fieldName = fieldName;
14489
      }
14490
 
14491
      public short getThriftFieldId() {
14492
        return _thriftId;
14493
      }
14494
 
14495
      public String getFieldName() {
14496
        return _fieldName;
14497
      }
14498
    }
14499
 
14500
    // isset id assignments
483 rajveer 14501
    private static final int __ID_ISSET_ID = 0;
14502
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 14503
 
14504
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14505
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 14506
          new FieldValueMetaData(TType.I64)));
14507
    }});
14508
 
14509
    static {
483 rajveer 14510
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 14511
    }
14512
 
483 rajveer 14513
    public getOrder_args() {
68 ashish 14514
    }
14515
 
483 rajveer 14516
    public getOrder_args(
14517
      long id)
68 ashish 14518
    {
14519
      this();
483 rajveer 14520
      this.id = id;
14521
      setIdIsSet(true);
68 ashish 14522
    }
14523
 
14524
    /**
14525
     * Performs a deep copy on <i>other</i>.
14526
     */
483 rajveer 14527
    public getOrder_args(getOrder_args other) {
68 ashish 14528
      __isset_bit_vector.clear();
14529
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14530
      this.id = other.id;
68 ashish 14531
    }
14532
 
483 rajveer 14533
    public getOrder_args deepCopy() {
14534
      return new getOrder_args(this);
68 ashish 14535
    }
14536
 
14537
    @Deprecated
483 rajveer 14538
    public getOrder_args clone() {
14539
      return new getOrder_args(this);
68 ashish 14540
    }
14541
 
483 rajveer 14542
    public long getId() {
14543
      return this.id;
68 ashish 14544
    }
14545
 
483 rajveer 14546
    public getOrder_args setId(long id) {
14547
      this.id = id;
14548
      setIdIsSet(true);
68 ashish 14549
      return this;
14550
    }
14551
 
483 rajveer 14552
    public void unsetId() {
14553
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 14554
    }
14555
 
483 rajveer 14556
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
14557
    public boolean isSetId() {
14558
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 14559
    }
14560
 
483 rajveer 14561
    public void setIdIsSet(boolean value) {
14562
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 14563
    }
14564
 
14565
    public void setFieldValue(_Fields field, Object value) {
14566
      switch (field) {
483 rajveer 14567
      case ID:
68 ashish 14568
        if (value == null) {
483 rajveer 14569
          unsetId();
68 ashish 14570
        } else {
483 rajveer 14571
          setId((Long)value);
68 ashish 14572
        }
14573
        break;
14574
 
14575
      }
14576
    }
14577
 
14578
    public void setFieldValue(int fieldID, Object value) {
14579
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14580
    }
14581
 
14582
    public Object getFieldValue(_Fields field) {
14583
      switch (field) {
483 rajveer 14584
      case ID:
14585
        return new Long(getId());
68 ashish 14586
 
14587
      }
14588
      throw new IllegalStateException();
14589
    }
14590
 
14591
    public Object getFieldValue(int fieldId) {
14592
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14593
    }
14594
 
14595
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14596
    public boolean isSet(_Fields field) {
14597
      switch (field) {
483 rajveer 14598
      case ID:
14599
        return isSetId();
68 ashish 14600
      }
14601
      throw new IllegalStateException();
14602
    }
14603
 
14604
    public boolean isSet(int fieldID) {
14605
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14606
    }
14607
 
14608
    @Override
14609
    public boolean equals(Object that) {
14610
      if (that == null)
14611
        return false;
483 rajveer 14612
      if (that instanceof getOrder_args)
14613
        return this.equals((getOrder_args)that);
68 ashish 14614
      return false;
14615
    }
14616
 
483 rajveer 14617
    public boolean equals(getOrder_args that) {
68 ashish 14618
      if (that == null)
14619
        return false;
14620
 
483 rajveer 14621
      boolean this_present_id = true;
14622
      boolean that_present_id = true;
14623
      if (this_present_id || that_present_id) {
14624
        if (!(this_present_id && that_present_id))
68 ashish 14625
          return false;
483 rajveer 14626
        if (this.id != that.id)
68 ashish 14627
          return false;
14628
      }
14629
 
14630
      return true;
14631
    }
14632
 
14633
    @Override
14634
    public int hashCode() {
14635
      return 0;
14636
    }
14637
 
483 rajveer 14638
    public int compareTo(getOrder_args other) {
68 ashish 14639
      if (!getClass().equals(other.getClass())) {
14640
        return getClass().getName().compareTo(other.getClass().getName());
14641
      }
14642
 
14643
      int lastComparison = 0;
483 rajveer 14644
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 14645
 
483 rajveer 14646
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 14647
      if (lastComparison != 0) {
14648
        return lastComparison;
14649
      }
483 rajveer 14650
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 14651
      if (lastComparison != 0) {
14652
        return lastComparison;
14653
      }
14654
      return 0;
14655
    }
14656
 
14657
    public void read(TProtocol iprot) throws TException {
14658
      TField field;
14659
      iprot.readStructBegin();
14660
      while (true)
14661
      {
14662
        field = iprot.readFieldBegin();
14663
        if (field.type == TType.STOP) { 
14664
          break;
14665
        }
14666
        _Fields fieldId = _Fields.findByThriftId(field.id);
14667
        if (fieldId == null) {
14668
          TProtocolUtil.skip(iprot, field.type);
14669
        } else {
14670
          switch (fieldId) {
483 rajveer 14671
            case ID:
68 ashish 14672
              if (field.type == TType.I64) {
483 rajveer 14673
                this.id = iprot.readI64();
14674
                setIdIsSet(true);
68 ashish 14675
              } else { 
14676
                TProtocolUtil.skip(iprot, field.type);
14677
              }
14678
              break;
14679
          }
14680
          iprot.readFieldEnd();
14681
        }
14682
      }
14683
      iprot.readStructEnd();
14684
      validate();
14685
    }
14686
 
14687
    public void write(TProtocol oprot) throws TException {
14688
      validate();
14689
 
14690
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14691
      oprot.writeFieldBegin(ID_FIELD_DESC);
14692
      oprot.writeI64(this.id);
68 ashish 14693
      oprot.writeFieldEnd();
14694
      oprot.writeFieldStop();
14695
      oprot.writeStructEnd();
14696
    }
14697
 
14698
    @Override
14699
    public String toString() {
483 rajveer 14700
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 14701
      boolean first = true;
14702
 
483 rajveer 14703
      sb.append("id:");
14704
      sb.append(this.id);
68 ashish 14705
      first = false;
14706
      sb.append(")");
14707
      return sb.toString();
14708
    }
14709
 
14710
    public void validate() throws TException {
14711
      // check for required fields
14712
    }
14713
 
14714
  }
14715
 
483 rajveer 14716
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
14717
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 14718
 
483 rajveer 14719
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 14720
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14721
 
483 rajveer 14722
    private Order success;
68 ashish 14723
    private TransactionServiceException ex;
14724
 
14725
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14726
    public enum _Fields implements TFieldIdEnum {
14727
      SUCCESS((short)0, "success"),
14728
      EX((short)1, "ex");
14729
 
14730
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14732
 
14733
      static {
14734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14735
          byId.put((int)field._thriftId, field);
14736
          byName.put(field.getFieldName(), field);
14737
        }
14738
      }
14739
 
14740
      /**
14741
       * Find the _Fields constant that matches fieldId, or null if its not found.
14742
       */
14743
      public static _Fields findByThriftId(int fieldId) {
14744
        return byId.get(fieldId);
14745
      }
14746
 
14747
      /**
14748
       * Find the _Fields constant that matches fieldId, throwing an exception
14749
       * if it is not found.
14750
       */
14751
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14752
        _Fields fields = findByThriftId(fieldId);
14753
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14754
        return fields;
14755
      }
14756
 
14757
      /**
14758
       * Find the _Fields constant that matches name, or null if its not found.
14759
       */
14760
      public static _Fields findByName(String name) {
14761
        return byName.get(name);
14762
      }
14763
 
14764
      private final short _thriftId;
14765
      private final String _fieldName;
14766
 
14767
      _Fields(short thriftId, String fieldName) {
14768
        _thriftId = thriftId;
14769
        _fieldName = fieldName;
14770
      }
14771
 
14772
      public short getThriftFieldId() {
14773
        return _thriftId;
14774
      }
14775
 
14776
      public String getFieldName() {
14777
        return _fieldName;
14778
      }
14779
    }
14780
 
14781
    // isset id assignments
14782
 
14783
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14784
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14785
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 14786
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14787
          new FieldValueMetaData(TType.STRUCT)));
14788
    }});
14789
 
14790
    static {
483 rajveer 14791
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 14792
    }
14793
 
483 rajveer 14794
    public getOrder_result() {
68 ashish 14795
    }
14796
 
483 rajveer 14797
    public getOrder_result(
14798
      Order success,
68 ashish 14799
      TransactionServiceException ex)
14800
    {
14801
      this();
14802
      this.success = success;
14803
      this.ex = ex;
14804
    }
14805
 
14806
    /**
14807
     * Performs a deep copy on <i>other</i>.
14808
     */
483 rajveer 14809
    public getOrder_result(getOrder_result other) {
14810
      if (other.isSetSuccess()) {
14811
        this.success = new Order(other.success);
14812
      }
68 ashish 14813
      if (other.isSetEx()) {
14814
        this.ex = new TransactionServiceException(other.ex);
14815
      }
14816
    }
14817
 
483 rajveer 14818
    public getOrder_result deepCopy() {
14819
      return new getOrder_result(this);
68 ashish 14820
    }
14821
 
14822
    @Deprecated
483 rajveer 14823
    public getOrder_result clone() {
14824
      return new getOrder_result(this);
68 ashish 14825
    }
14826
 
483 rajveer 14827
    public Order getSuccess() {
68 ashish 14828
      return this.success;
14829
    }
14830
 
483 rajveer 14831
    public getOrder_result setSuccess(Order success) {
68 ashish 14832
      this.success = success;
14833
      return this;
14834
    }
14835
 
14836
    public void unsetSuccess() {
483 rajveer 14837
      this.success = null;
68 ashish 14838
    }
14839
 
14840
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14841
    public boolean isSetSuccess() {
483 rajveer 14842
      return this.success != null;
68 ashish 14843
    }
14844
 
14845
    public void setSuccessIsSet(boolean value) {
483 rajveer 14846
      if (!value) {
14847
        this.success = null;
14848
      }
68 ashish 14849
    }
14850
 
14851
    public TransactionServiceException getEx() {
14852
      return this.ex;
14853
    }
14854
 
483 rajveer 14855
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 14856
      this.ex = ex;
14857
      return this;
14858
    }
14859
 
14860
    public void unsetEx() {
14861
      this.ex = null;
14862
    }
14863
 
14864
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14865
    public boolean isSetEx() {
14866
      return this.ex != null;
14867
    }
14868
 
14869
    public void setExIsSet(boolean value) {
14870
      if (!value) {
14871
        this.ex = null;
14872
      }
14873
    }
14874
 
14875
    public void setFieldValue(_Fields field, Object value) {
14876
      switch (field) {
14877
      case SUCCESS:
14878
        if (value == null) {
14879
          unsetSuccess();
14880
        } else {
483 rajveer 14881
          setSuccess((Order)value);
68 ashish 14882
        }
14883
        break;
14884
 
14885
      case EX:
14886
        if (value == null) {
14887
          unsetEx();
14888
        } else {
14889
          setEx((TransactionServiceException)value);
14890
        }
14891
        break;
14892
 
14893
      }
14894
    }
14895
 
14896
    public void setFieldValue(int fieldID, Object value) {
14897
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14898
    }
14899
 
14900
    public Object getFieldValue(_Fields field) {
14901
      switch (field) {
14902
      case SUCCESS:
483 rajveer 14903
        return getSuccess();
68 ashish 14904
 
14905
      case EX:
14906
        return getEx();
14907
 
14908
      }
14909
      throw new IllegalStateException();
14910
    }
14911
 
14912
    public Object getFieldValue(int fieldId) {
14913
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14914
    }
14915
 
14916
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14917
    public boolean isSet(_Fields field) {
14918
      switch (field) {
14919
      case SUCCESS:
14920
        return isSetSuccess();
14921
      case EX:
14922
        return isSetEx();
14923
      }
14924
      throw new IllegalStateException();
14925
    }
14926
 
14927
    public boolean isSet(int fieldID) {
14928
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14929
    }
14930
 
14931
    @Override
14932
    public boolean equals(Object that) {
14933
      if (that == null)
14934
        return false;
483 rajveer 14935
      if (that instanceof getOrder_result)
14936
        return this.equals((getOrder_result)that);
68 ashish 14937
      return false;
14938
    }
14939
 
483 rajveer 14940
    public boolean equals(getOrder_result that) {
68 ashish 14941
      if (that == null)
14942
        return false;
14943
 
483 rajveer 14944
      boolean this_present_success = true && this.isSetSuccess();
14945
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 14946
      if (this_present_success || that_present_success) {
14947
        if (!(this_present_success && that_present_success))
14948
          return false;
483 rajveer 14949
        if (!this.success.equals(that.success))
68 ashish 14950
          return false;
14951
      }
14952
 
14953
      boolean this_present_ex = true && this.isSetEx();
14954
      boolean that_present_ex = true && that.isSetEx();
14955
      if (this_present_ex || that_present_ex) {
14956
        if (!(this_present_ex && that_present_ex))
14957
          return false;
14958
        if (!this.ex.equals(that.ex))
14959
          return false;
14960
      }
14961
 
14962
      return true;
14963
    }
14964
 
14965
    @Override
14966
    public int hashCode() {
14967
      return 0;
14968
    }
14969
 
483 rajveer 14970
    public int compareTo(getOrder_result other) {
68 ashish 14971
      if (!getClass().equals(other.getClass())) {
14972
        return getClass().getName().compareTo(other.getClass().getName());
14973
      }
14974
 
14975
      int lastComparison = 0;
483 rajveer 14976
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 14977
 
14978
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14979
      if (lastComparison != 0) {
14980
        return lastComparison;
14981
      }
14982
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14983
      if (lastComparison != 0) {
14984
        return lastComparison;
14985
      }
14986
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14987
      if (lastComparison != 0) {
14988
        return lastComparison;
14989
      }
14990
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14991
      if (lastComparison != 0) {
14992
        return lastComparison;
14993
      }
14994
      return 0;
14995
    }
14996
 
14997
    public void read(TProtocol iprot) throws TException {
14998
      TField field;
14999
      iprot.readStructBegin();
15000
      while (true)
15001
      {
15002
        field = iprot.readFieldBegin();
15003
        if (field.type == TType.STOP) { 
15004
          break;
15005
        }
15006
        _Fields fieldId = _Fields.findByThriftId(field.id);
15007
        if (fieldId == null) {
15008
          TProtocolUtil.skip(iprot, field.type);
15009
        } else {
15010
          switch (fieldId) {
15011
            case SUCCESS:
483 rajveer 15012
              if (field.type == TType.STRUCT) {
15013
                this.success = new Order();
15014
                this.success.read(iprot);
68 ashish 15015
              } else { 
15016
                TProtocolUtil.skip(iprot, field.type);
15017
              }
15018
              break;
15019
            case EX:
15020
              if (field.type == TType.STRUCT) {
15021
                this.ex = new TransactionServiceException();
15022
                this.ex.read(iprot);
15023
              } else { 
15024
                TProtocolUtil.skip(iprot, field.type);
15025
              }
15026
              break;
15027
          }
15028
          iprot.readFieldEnd();
15029
        }
15030
      }
15031
      iprot.readStructEnd();
15032
      validate();
15033
    }
15034
 
15035
    public void write(TProtocol oprot) throws TException {
15036
      oprot.writeStructBegin(STRUCT_DESC);
15037
 
15038
      if (this.isSetSuccess()) {
15039
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15040
        this.success.write(oprot);
68 ashish 15041
        oprot.writeFieldEnd();
15042
      } else if (this.isSetEx()) {
15043
        oprot.writeFieldBegin(EX_FIELD_DESC);
15044
        this.ex.write(oprot);
15045
        oprot.writeFieldEnd();
15046
      }
15047
      oprot.writeFieldStop();
15048
      oprot.writeStructEnd();
15049
    }
15050
 
15051
    @Override
15052
    public String toString() {
483 rajveer 15053
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 15054
      boolean first = true;
15055
 
15056
      sb.append("success:");
483 rajveer 15057
      if (this.success == null) {
15058
        sb.append("null");
15059
      } else {
15060
        sb.append(this.success);
15061
      }
68 ashish 15062
      first = false;
15063
      if (!first) sb.append(", ");
15064
      sb.append("ex:");
15065
      if (this.ex == null) {
15066
        sb.append("null");
15067
      } else {
15068
        sb.append(this.ex);
15069
      }
15070
      first = false;
15071
      sb.append(")");
15072
      return sb.toString();
15073
    }
15074
 
15075
    public void validate() throws TException {
15076
      // check for required fields
15077
    }
15078
 
15079
  }
15080
 
483 rajveer 15081
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
15082
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 15083
 
483 rajveer 15084
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 15085
 
483 rajveer 15086
    private long orderId;
68 ashish 15087
 
15088
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15089
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15090
      ORDER_ID((short)1, "orderId");
68 ashish 15091
 
15092
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15093
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15094
 
15095
      static {
15096
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15097
          byId.put((int)field._thriftId, field);
15098
          byName.put(field.getFieldName(), field);
15099
        }
15100
      }
15101
 
15102
      /**
15103
       * Find the _Fields constant that matches fieldId, or null if its not found.
15104
       */
15105
      public static _Fields findByThriftId(int fieldId) {
15106
        return byId.get(fieldId);
15107
      }
15108
 
15109
      /**
15110
       * Find the _Fields constant that matches fieldId, throwing an exception
15111
       * if it is not found.
15112
       */
15113
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15114
        _Fields fields = findByThriftId(fieldId);
15115
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15116
        return fields;
15117
      }
15118
 
15119
      /**
15120
       * Find the _Fields constant that matches name, or null if its not found.
15121
       */
15122
      public static _Fields findByName(String name) {
15123
        return byName.get(name);
15124
      }
15125
 
15126
      private final short _thriftId;
15127
      private final String _fieldName;
15128
 
15129
      _Fields(short thriftId, String fieldName) {
15130
        _thriftId = thriftId;
15131
        _fieldName = fieldName;
15132
      }
15133
 
15134
      public short getThriftFieldId() {
15135
        return _thriftId;
15136
      }
15137
 
15138
      public String getFieldName() {
15139
        return _fieldName;
15140
      }
15141
    }
15142
 
15143
    // isset id assignments
483 rajveer 15144
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 15145
    private BitSet __isset_bit_vector = new BitSet(1);
15146
 
15147
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15148
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 15149
          new FieldValueMetaData(TType.I64)));
15150
    }});
15151
 
15152
    static {
483 rajveer 15153
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 15154
    }
15155
 
483 rajveer 15156
    public getLineItemsForOrder_args() {
68 ashish 15157
    }
15158
 
483 rajveer 15159
    public getLineItemsForOrder_args(
15160
      long orderId)
68 ashish 15161
    {
15162
      this();
483 rajveer 15163
      this.orderId = orderId;
15164
      setOrderIdIsSet(true);
68 ashish 15165
    }
15166
 
15167
    /**
15168
     * Performs a deep copy on <i>other</i>.
15169
     */
483 rajveer 15170
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 15171
      __isset_bit_vector.clear();
15172
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15173
      this.orderId = other.orderId;
68 ashish 15174
    }
15175
 
483 rajveer 15176
    public getLineItemsForOrder_args deepCopy() {
15177
      return new getLineItemsForOrder_args(this);
68 ashish 15178
    }
15179
 
15180
    @Deprecated
483 rajveer 15181
    public getLineItemsForOrder_args clone() {
15182
      return new getLineItemsForOrder_args(this);
68 ashish 15183
    }
15184
 
483 rajveer 15185
    public long getOrderId() {
15186
      return this.orderId;
68 ashish 15187
    }
15188
 
483 rajveer 15189
    public getLineItemsForOrder_args setOrderId(long orderId) {
15190
      this.orderId = orderId;
15191
      setOrderIdIsSet(true);
68 ashish 15192
      return this;
15193
    }
15194
 
483 rajveer 15195
    public void unsetOrderId() {
15196
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 15197
    }
15198
 
483 rajveer 15199
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15200
    public boolean isSetOrderId() {
15201
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 15202
    }
15203
 
483 rajveer 15204
    public void setOrderIdIsSet(boolean value) {
15205
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 15206
    }
15207
 
15208
    public void setFieldValue(_Fields field, Object value) {
15209
      switch (field) {
483 rajveer 15210
      case ORDER_ID:
68 ashish 15211
        if (value == null) {
483 rajveer 15212
          unsetOrderId();
68 ashish 15213
        } else {
483 rajveer 15214
          setOrderId((Long)value);
68 ashish 15215
        }
15216
        break;
15217
 
15218
      }
15219
    }
15220
 
15221
    public void setFieldValue(int fieldID, Object value) {
15222
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15223
    }
15224
 
15225
    public Object getFieldValue(_Fields field) {
15226
      switch (field) {
483 rajveer 15227
      case ORDER_ID:
15228
        return new Long(getOrderId());
68 ashish 15229
 
15230
      }
15231
      throw new IllegalStateException();
15232
    }
15233
 
15234
    public Object getFieldValue(int fieldId) {
15235
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15236
    }
15237
 
15238
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15239
    public boolean isSet(_Fields field) {
15240
      switch (field) {
483 rajveer 15241
      case ORDER_ID:
15242
        return isSetOrderId();
68 ashish 15243
      }
15244
      throw new IllegalStateException();
15245
    }
15246
 
15247
    public boolean isSet(int fieldID) {
15248
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15249
    }
15250
 
15251
    @Override
15252
    public boolean equals(Object that) {
15253
      if (that == null)
15254
        return false;
483 rajveer 15255
      if (that instanceof getLineItemsForOrder_args)
15256
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 15257
      return false;
15258
    }
15259
 
483 rajveer 15260
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 15261
      if (that == null)
15262
        return false;
15263
 
483 rajveer 15264
      boolean this_present_orderId = true;
15265
      boolean that_present_orderId = true;
15266
      if (this_present_orderId || that_present_orderId) {
15267
        if (!(this_present_orderId && that_present_orderId))
68 ashish 15268
          return false;
483 rajveer 15269
        if (this.orderId != that.orderId)
68 ashish 15270
          return false;
15271
      }
15272
 
15273
      return true;
15274
    }
15275
 
15276
    @Override
15277
    public int hashCode() {
15278
      return 0;
15279
    }
15280
 
483 rajveer 15281
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 15282
      if (!getClass().equals(other.getClass())) {
15283
        return getClass().getName().compareTo(other.getClass().getName());
15284
      }
15285
 
15286
      int lastComparison = 0;
483 rajveer 15287
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 15288
 
483 rajveer 15289
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 15290
      if (lastComparison != 0) {
15291
        return lastComparison;
15292
      }
483 rajveer 15293
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 15294
      if (lastComparison != 0) {
15295
        return lastComparison;
15296
      }
15297
      return 0;
15298
    }
15299
 
15300
    public void read(TProtocol iprot) throws TException {
15301
      TField field;
15302
      iprot.readStructBegin();
15303
      while (true)
15304
      {
15305
        field = iprot.readFieldBegin();
15306
        if (field.type == TType.STOP) { 
15307
          break;
15308
        }
15309
        _Fields fieldId = _Fields.findByThriftId(field.id);
15310
        if (fieldId == null) {
15311
          TProtocolUtil.skip(iprot, field.type);
15312
        } else {
15313
          switch (fieldId) {
483 rajveer 15314
            case ORDER_ID:
68 ashish 15315
              if (field.type == TType.I64) {
483 rajveer 15316
                this.orderId = iprot.readI64();
15317
                setOrderIdIsSet(true);
68 ashish 15318
              } else { 
15319
                TProtocolUtil.skip(iprot, field.type);
15320
              }
15321
              break;
15322
          }
15323
          iprot.readFieldEnd();
15324
        }
15325
      }
15326
      iprot.readStructEnd();
15327
      validate();
15328
    }
15329
 
15330
    public void write(TProtocol oprot) throws TException {
15331
      validate();
15332
 
15333
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15334
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15335
      oprot.writeI64(this.orderId);
68 ashish 15336
      oprot.writeFieldEnd();
15337
      oprot.writeFieldStop();
15338
      oprot.writeStructEnd();
15339
    }
15340
 
15341
    @Override
15342
    public String toString() {
483 rajveer 15343
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 15344
      boolean first = true;
15345
 
483 rajveer 15346
      sb.append("orderId:");
15347
      sb.append(this.orderId);
68 ashish 15348
      first = false;
15349
      sb.append(")");
15350
      return sb.toString();
15351
    }
15352
 
15353
    public void validate() throws TException {
15354
      // check for required fields
15355
    }
15356
 
15357
  }
15358
 
483 rajveer 15359
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
15360
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 15361
 
483 rajveer 15362
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15363
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15364
 
483 rajveer 15365
    private List<LineItem> success;
68 ashish 15366
    private TransactionServiceException ex;
15367
 
15368
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15369
    public enum _Fields implements TFieldIdEnum {
15370
      SUCCESS((short)0, "success"),
15371
      EX((short)1, "ex");
15372
 
15373
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15374
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15375
 
15376
      static {
15377
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15378
          byId.put((int)field._thriftId, field);
15379
          byName.put(field.getFieldName(), field);
15380
        }
15381
      }
15382
 
15383
      /**
15384
       * Find the _Fields constant that matches fieldId, or null if its not found.
15385
       */
15386
      public static _Fields findByThriftId(int fieldId) {
15387
        return byId.get(fieldId);
15388
      }
15389
 
15390
      /**
15391
       * Find the _Fields constant that matches fieldId, throwing an exception
15392
       * if it is not found.
15393
       */
15394
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15395
        _Fields fields = findByThriftId(fieldId);
15396
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15397
        return fields;
15398
      }
15399
 
15400
      /**
15401
       * Find the _Fields constant that matches name, or null if its not found.
15402
       */
15403
      public static _Fields findByName(String name) {
15404
        return byName.get(name);
15405
      }
15406
 
15407
      private final short _thriftId;
15408
      private final String _fieldName;
15409
 
15410
      _Fields(short thriftId, String fieldName) {
15411
        _thriftId = thriftId;
15412
        _fieldName = fieldName;
15413
      }
15414
 
15415
      public short getThriftFieldId() {
15416
        return _thriftId;
15417
      }
15418
 
15419
      public String getFieldName() {
15420
        return _fieldName;
15421
      }
15422
    }
15423
 
15424
    // isset id assignments
15425
 
15426
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15427
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15428
          new ListMetaData(TType.LIST, 
15429
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 15430
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15431
          new FieldValueMetaData(TType.STRUCT)));
15432
    }});
15433
 
15434
    static {
483 rajveer 15435
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 15436
    }
15437
 
483 rajveer 15438
    public getLineItemsForOrder_result() {
68 ashish 15439
    }
15440
 
483 rajveer 15441
    public getLineItemsForOrder_result(
15442
      List<LineItem> success,
68 ashish 15443
      TransactionServiceException ex)
15444
    {
15445
      this();
15446
      this.success = success;
15447
      this.ex = ex;
15448
    }
15449
 
15450
    /**
15451
     * Performs a deep copy on <i>other</i>.
15452
     */
483 rajveer 15453
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
15454
      if (other.isSetSuccess()) {
15455
        List<LineItem> __this__success = new ArrayList<LineItem>();
15456
        for (LineItem other_element : other.success) {
15457
          __this__success.add(new LineItem(other_element));
15458
        }
15459
        this.success = __this__success;
15460
      }
68 ashish 15461
      if (other.isSetEx()) {
15462
        this.ex = new TransactionServiceException(other.ex);
15463
      }
15464
    }
15465
 
483 rajveer 15466
    public getLineItemsForOrder_result deepCopy() {
15467
      return new getLineItemsForOrder_result(this);
68 ashish 15468
    }
15469
 
15470
    @Deprecated
483 rajveer 15471
    public getLineItemsForOrder_result clone() {
15472
      return new getLineItemsForOrder_result(this);
68 ashish 15473
    }
15474
 
483 rajveer 15475
    public int getSuccessSize() {
15476
      return (this.success == null) ? 0 : this.success.size();
15477
    }
15478
 
15479
    public java.util.Iterator<LineItem> getSuccessIterator() {
15480
      return (this.success == null) ? null : this.success.iterator();
15481
    }
15482
 
15483
    public void addToSuccess(LineItem elem) {
15484
      if (this.success == null) {
15485
        this.success = new ArrayList<LineItem>();
15486
      }
15487
      this.success.add(elem);
15488
    }
15489
 
15490
    public List<LineItem> getSuccess() {
68 ashish 15491
      return this.success;
15492
    }
15493
 
483 rajveer 15494
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 15495
      this.success = success;
15496
      return this;
15497
    }
15498
 
15499
    public void unsetSuccess() {
483 rajveer 15500
      this.success = null;
68 ashish 15501
    }
15502
 
15503
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15504
    public boolean isSetSuccess() {
483 rajveer 15505
      return this.success != null;
68 ashish 15506
    }
15507
 
15508
    public void setSuccessIsSet(boolean value) {
483 rajveer 15509
      if (!value) {
15510
        this.success = null;
15511
      }
68 ashish 15512
    }
15513
 
15514
    public TransactionServiceException getEx() {
15515
      return this.ex;
15516
    }
15517
 
483 rajveer 15518
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 15519
      this.ex = ex;
15520
      return this;
15521
    }
15522
 
15523
    public void unsetEx() {
15524
      this.ex = null;
15525
    }
15526
 
15527
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15528
    public boolean isSetEx() {
15529
      return this.ex != null;
15530
    }
15531
 
15532
    public void setExIsSet(boolean value) {
15533
      if (!value) {
15534
        this.ex = null;
15535
      }
15536
    }
15537
 
15538
    public void setFieldValue(_Fields field, Object value) {
15539
      switch (field) {
15540
      case SUCCESS:
15541
        if (value == null) {
15542
          unsetSuccess();
15543
        } else {
483 rajveer 15544
          setSuccess((List<LineItem>)value);
68 ashish 15545
        }
15546
        break;
15547
 
15548
      case EX:
15549
        if (value == null) {
15550
          unsetEx();
15551
        } else {
15552
          setEx((TransactionServiceException)value);
15553
        }
15554
        break;
15555
 
15556
      }
15557
    }
15558
 
15559
    public void setFieldValue(int fieldID, Object value) {
15560
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15561
    }
15562
 
15563
    public Object getFieldValue(_Fields field) {
15564
      switch (field) {
15565
      case SUCCESS:
483 rajveer 15566
        return getSuccess();
68 ashish 15567
 
15568
      case EX:
15569
        return getEx();
15570
 
15571
      }
15572
      throw new IllegalStateException();
15573
    }
15574
 
15575
    public Object getFieldValue(int fieldId) {
15576
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15577
    }
15578
 
15579
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15580
    public boolean isSet(_Fields field) {
15581
      switch (field) {
15582
      case SUCCESS:
15583
        return isSetSuccess();
15584
      case EX:
15585
        return isSetEx();
15586
      }
15587
      throw new IllegalStateException();
15588
    }
15589
 
15590
    public boolean isSet(int fieldID) {
15591
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15592
    }
15593
 
15594
    @Override
15595
    public boolean equals(Object that) {
15596
      if (that == null)
15597
        return false;
483 rajveer 15598
      if (that instanceof getLineItemsForOrder_result)
15599
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 15600
      return false;
15601
    }
15602
 
483 rajveer 15603
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 15604
      if (that == null)
15605
        return false;
15606
 
483 rajveer 15607
      boolean this_present_success = true && this.isSetSuccess();
15608
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15609
      if (this_present_success || that_present_success) {
15610
        if (!(this_present_success && that_present_success))
15611
          return false;
483 rajveer 15612
        if (!this.success.equals(that.success))
68 ashish 15613
          return false;
15614
      }
15615
 
15616
      boolean this_present_ex = true && this.isSetEx();
15617
      boolean that_present_ex = true && that.isSetEx();
15618
      if (this_present_ex || that_present_ex) {
15619
        if (!(this_present_ex && that_present_ex))
15620
          return false;
15621
        if (!this.ex.equals(that.ex))
15622
          return false;
15623
      }
15624
 
15625
      return true;
15626
    }
15627
 
15628
    @Override
15629
    public int hashCode() {
15630
      return 0;
15631
    }
15632
 
483 rajveer 15633
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 15634
      if (!getClass().equals(other.getClass())) {
15635
        return getClass().getName().compareTo(other.getClass().getName());
15636
      }
15637
 
15638
      int lastComparison = 0;
483 rajveer 15639
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 15640
 
15641
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15642
      if (lastComparison != 0) {
15643
        return lastComparison;
15644
      }
15645
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15646
      if (lastComparison != 0) {
15647
        return lastComparison;
15648
      }
15649
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15650
      if (lastComparison != 0) {
15651
        return lastComparison;
15652
      }
15653
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15654
      if (lastComparison != 0) {
15655
        return lastComparison;
15656
      }
15657
      return 0;
15658
    }
15659
 
15660
    public void read(TProtocol iprot) throws TException {
15661
      TField field;
15662
      iprot.readStructBegin();
15663
      while (true)
15664
      {
15665
        field = iprot.readFieldBegin();
15666
        if (field.type == TType.STOP) { 
15667
          break;
15668
        }
15669
        _Fields fieldId = _Fields.findByThriftId(field.id);
15670
        if (fieldId == null) {
15671
          TProtocolUtil.skip(iprot, field.type);
15672
        } else {
15673
          switch (fieldId) {
15674
            case SUCCESS:
483 rajveer 15675
              if (field.type == TType.LIST) {
15676
                {
1022 varun.gupt 15677
                  TList _list32 = iprot.readListBegin();
15678
                  this.success = new ArrayList<LineItem>(_list32.size);
15679
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15680
                  {
1022 varun.gupt 15681
                    LineItem _elem34;
15682
                    _elem34 = new LineItem();
15683
                    _elem34.read(iprot);
15684
                    this.success.add(_elem34);
483 rajveer 15685
                  }
15686
                  iprot.readListEnd();
15687
                }
68 ashish 15688
              } else { 
15689
                TProtocolUtil.skip(iprot, field.type);
15690
              }
15691
              break;
15692
            case EX:
15693
              if (field.type == TType.STRUCT) {
15694
                this.ex = new TransactionServiceException();
15695
                this.ex.read(iprot);
15696
              } else { 
15697
                TProtocolUtil.skip(iprot, field.type);
15698
              }
15699
              break;
15700
          }
15701
          iprot.readFieldEnd();
15702
        }
15703
      }
15704
      iprot.readStructEnd();
15705
      validate();
15706
    }
15707
 
15708
    public void write(TProtocol oprot) throws TException {
15709
      oprot.writeStructBegin(STRUCT_DESC);
15710
 
15711
      if (this.isSetSuccess()) {
15712
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15713
        {
15714
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 15715
          for (LineItem _iter35 : this.success)
483 rajveer 15716
          {
1022 varun.gupt 15717
            _iter35.write(oprot);
483 rajveer 15718
          }
15719
          oprot.writeListEnd();
15720
        }
68 ashish 15721
        oprot.writeFieldEnd();
15722
      } else if (this.isSetEx()) {
15723
        oprot.writeFieldBegin(EX_FIELD_DESC);
15724
        this.ex.write(oprot);
15725
        oprot.writeFieldEnd();
15726
      }
15727
      oprot.writeFieldStop();
15728
      oprot.writeStructEnd();
15729
    }
15730
 
15731
    @Override
15732
    public String toString() {
483 rajveer 15733
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 15734
      boolean first = true;
15735
 
15736
      sb.append("success:");
483 rajveer 15737
      if (this.success == null) {
15738
        sb.append("null");
15739
      } else {
15740
        sb.append(this.success);
15741
      }
68 ashish 15742
      first = false;
15743
      if (!first) sb.append(", ");
15744
      sb.append("ex:");
15745
      if (this.ex == null) {
15746
        sb.append("null");
15747
      } else {
15748
        sb.append(this.ex);
15749
      }
15750
      first = false;
15751
      sb.append(")");
15752
      return sb.toString();
15753
    }
15754
 
15755
    public void validate() throws TException {
15756
      // check for required fields
15757
    }
15758
 
15759
  }
15760
 
1209 chandransh 15761
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
15762
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
15763
 
15764
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
15765
 
15766
    private long orderId;
15767
 
15768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15769
    public enum _Fields implements TFieldIdEnum {
15770
      ORDER_ID((short)1, "orderId");
15771
 
15772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15774
 
15775
      static {
15776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15777
          byId.put((int)field._thriftId, field);
15778
          byName.put(field.getFieldName(), field);
15779
        }
15780
      }
15781
 
15782
      /**
15783
       * Find the _Fields constant that matches fieldId, or null if its not found.
15784
       */
15785
      public static _Fields findByThriftId(int fieldId) {
15786
        return byId.get(fieldId);
15787
      }
15788
 
15789
      /**
15790
       * Find the _Fields constant that matches fieldId, throwing an exception
15791
       * if it is not found.
15792
       */
15793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15794
        _Fields fields = findByThriftId(fieldId);
15795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15796
        return fields;
15797
      }
15798
 
15799
      /**
15800
       * Find the _Fields constant that matches name, or null if its not found.
15801
       */
15802
      public static _Fields findByName(String name) {
15803
        return byName.get(name);
15804
      }
15805
 
15806
      private final short _thriftId;
15807
      private final String _fieldName;
15808
 
15809
      _Fields(short thriftId, String fieldName) {
15810
        _thriftId = thriftId;
15811
        _fieldName = fieldName;
15812
      }
15813
 
15814
      public short getThriftFieldId() {
15815
        return _thriftId;
15816
      }
15817
 
15818
      public String getFieldName() {
15819
        return _fieldName;
15820
      }
15821
    }
15822
 
15823
    // isset id assignments
15824
    private static final int __ORDERID_ISSET_ID = 0;
15825
    private BitSet __isset_bit_vector = new BitSet(1);
15826
 
15827
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15828
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
15829
          new FieldValueMetaData(TType.I64)));
15830
    }});
15831
 
15832
    static {
15833
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
15834
    }
15835
 
15836
    public markOrderAsOutOfStock_args() {
15837
    }
15838
 
15839
    public markOrderAsOutOfStock_args(
15840
      long orderId)
15841
    {
15842
      this();
15843
      this.orderId = orderId;
15844
      setOrderIdIsSet(true);
15845
    }
15846
 
15847
    /**
15848
     * Performs a deep copy on <i>other</i>.
15849
     */
15850
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
15851
      __isset_bit_vector.clear();
15852
      __isset_bit_vector.or(other.__isset_bit_vector);
15853
      this.orderId = other.orderId;
15854
    }
15855
 
15856
    public markOrderAsOutOfStock_args deepCopy() {
15857
      return new markOrderAsOutOfStock_args(this);
15858
    }
15859
 
15860
    @Deprecated
15861
    public markOrderAsOutOfStock_args clone() {
15862
      return new markOrderAsOutOfStock_args(this);
15863
    }
15864
 
15865
    public long getOrderId() {
15866
      return this.orderId;
15867
    }
15868
 
15869
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
15870
      this.orderId = orderId;
15871
      setOrderIdIsSet(true);
15872
      return this;
15873
    }
15874
 
15875
    public void unsetOrderId() {
15876
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
15877
    }
15878
 
15879
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15880
    public boolean isSetOrderId() {
15881
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
15882
    }
15883
 
15884
    public void setOrderIdIsSet(boolean value) {
15885
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
15886
    }
15887
 
15888
    public void setFieldValue(_Fields field, Object value) {
15889
      switch (field) {
15890
      case ORDER_ID:
15891
        if (value == null) {
15892
          unsetOrderId();
15893
        } else {
15894
          setOrderId((Long)value);
15895
        }
15896
        break;
15897
 
15898
      }
15899
    }
15900
 
15901
    public void setFieldValue(int fieldID, Object value) {
15902
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15903
    }
15904
 
15905
    public Object getFieldValue(_Fields field) {
15906
      switch (field) {
15907
      case ORDER_ID:
15908
        return new Long(getOrderId());
15909
 
15910
      }
15911
      throw new IllegalStateException();
15912
    }
15913
 
15914
    public Object getFieldValue(int fieldId) {
15915
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15916
    }
15917
 
15918
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15919
    public boolean isSet(_Fields field) {
15920
      switch (field) {
15921
      case ORDER_ID:
15922
        return isSetOrderId();
15923
      }
15924
      throw new IllegalStateException();
15925
    }
15926
 
15927
    public boolean isSet(int fieldID) {
15928
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15929
    }
15930
 
15931
    @Override
15932
    public boolean equals(Object that) {
15933
      if (that == null)
15934
        return false;
15935
      if (that instanceof markOrderAsOutOfStock_args)
15936
        return this.equals((markOrderAsOutOfStock_args)that);
15937
      return false;
15938
    }
15939
 
15940
    public boolean equals(markOrderAsOutOfStock_args that) {
15941
      if (that == null)
15942
        return false;
15943
 
15944
      boolean this_present_orderId = true;
15945
      boolean that_present_orderId = true;
15946
      if (this_present_orderId || that_present_orderId) {
15947
        if (!(this_present_orderId && that_present_orderId))
15948
          return false;
15949
        if (this.orderId != that.orderId)
15950
          return false;
15951
      }
15952
 
15953
      return true;
15954
    }
15955
 
15956
    @Override
15957
    public int hashCode() {
15958
      return 0;
15959
    }
15960
 
15961
    public int compareTo(markOrderAsOutOfStock_args other) {
15962
      if (!getClass().equals(other.getClass())) {
15963
        return getClass().getName().compareTo(other.getClass().getName());
15964
      }
15965
 
15966
      int lastComparison = 0;
15967
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
15968
 
15969
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
15970
      if (lastComparison != 0) {
15971
        return lastComparison;
15972
      }
15973
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
15974
      if (lastComparison != 0) {
15975
        return lastComparison;
15976
      }
15977
      return 0;
15978
    }
15979
 
15980
    public void read(TProtocol iprot) throws TException {
15981
      TField field;
15982
      iprot.readStructBegin();
15983
      while (true)
15984
      {
15985
        field = iprot.readFieldBegin();
15986
        if (field.type == TType.STOP) { 
15987
          break;
15988
        }
15989
        _Fields fieldId = _Fields.findByThriftId(field.id);
15990
        if (fieldId == null) {
15991
          TProtocolUtil.skip(iprot, field.type);
15992
        } else {
15993
          switch (fieldId) {
15994
            case ORDER_ID:
15995
              if (field.type == TType.I64) {
15996
                this.orderId = iprot.readI64();
15997
                setOrderIdIsSet(true);
15998
              } else { 
15999
                TProtocolUtil.skip(iprot, field.type);
16000
              }
16001
              break;
16002
          }
16003
          iprot.readFieldEnd();
16004
        }
16005
      }
16006
      iprot.readStructEnd();
16007
      validate();
16008
    }
16009
 
16010
    public void write(TProtocol oprot) throws TException {
16011
      validate();
16012
 
16013
      oprot.writeStructBegin(STRUCT_DESC);
16014
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
16015
      oprot.writeI64(this.orderId);
16016
      oprot.writeFieldEnd();
16017
      oprot.writeFieldStop();
16018
      oprot.writeStructEnd();
16019
    }
16020
 
16021
    @Override
16022
    public String toString() {
16023
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
16024
      boolean first = true;
16025
 
16026
      sb.append("orderId:");
16027
      sb.append(this.orderId);
16028
      first = false;
16029
      sb.append(")");
16030
      return sb.toString();
16031
    }
16032
 
16033
    public void validate() throws TException {
16034
      // check for required fields
16035
    }
16036
 
16037
  }
16038
 
16039
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
16040
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
16041
 
16042
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16043
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16044
 
16045
    private boolean success;
16046
    private TransactionServiceException ex;
16047
 
16048
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16049
    public enum _Fields implements TFieldIdEnum {
16050
      SUCCESS((short)0, "success"),
16051
      EX((short)1, "ex");
16052
 
16053
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16054
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16055
 
16056
      static {
16057
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16058
          byId.put((int)field._thriftId, field);
16059
          byName.put(field.getFieldName(), field);
16060
        }
16061
      }
16062
 
16063
      /**
16064
       * Find the _Fields constant that matches fieldId, or null if its not found.
16065
       */
16066
      public static _Fields findByThriftId(int fieldId) {
16067
        return byId.get(fieldId);
16068
      }
16069
 
16070
      /**
16071
       * Find the _Fields constant that matches fieldId, throwing an exception
16072
       * if it is not found.
16073
       */
16074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16075
        _Fields fields = findByThriftId(fieldId);
16076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16077
        return fields;
16078
      }
16079
 
16080
      /**
16081
       * Find the _Fields constant that matches name, or null if its not found.
16082
       */
16083
      public static _Fields findByName(String name) {
16084
        return byName.get(name);
16085
      }
16086
 
16087
      private final short _thriftId;
16088
      private final String _fieldName;
16089
 
16090
      _Fields(short thriftId, String fieldName) {
16091
        _thriftId = thriftId;
16092
        _fieldName = fieldName;
16093
      }
16094
 
16095
      public short getThriftFieldId() {
16096
        return _thriftId;
16097
      }
16098
 
16099
      public String getFieldName() {
16100
        return _fieldName;
16101
      }
16102
    }
16103
 
16104
    // isset id assignments
16105
    private static final int __SUCCESS_ISSET_ID = 0;
16106
    private BitSet __isset_bit_vector = new BitSet(1);
16107
 
16108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16109
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16110
          new FieldValueMetaData(TType.BOOL)));
16111
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16112
          new FieldValueMetaData(TType.STRUCT)));
16113
    }});
16114
 
16115
    static {
16116
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
16117
    }
16118
 
16119
    public markOrderAsOutOfStock_result() {
16120
    }
16121
 
16122
    public markOrderAsOutOfStock_result(
16123
      boolean success,
16124
      TransactionServiceException ex)
16125
    {
16126
      this();
16127
      this.success = success;
16128
      setSuccessIsSet(true);
16129
      this.ex = ex;
16130
    }
16131
 
16132
    /**
16133
     * Performs a deep copy on <i>other</i>.
16134
     */
16135
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
16136
      __isset_bit_vector.clear();
16137
      __isset_bit_vector.or(other.__isset_bit_vector);
16138
      this.success = other.success;
16139
      if (other.isSetEx()) {
16140
        this.ex = new TransactionServiceException(other.ex);
16141
      }
16142
    }
16143
 
16144
    public markOrderAsOutOfStock_result deepCopy() {
16145
      return new markOrderAsOutOfStock_result(this);
16146
    }
16147
 
16148
    @Deprecated
16149
    public markOrderAsOutOfStock_result clone() {
16150
      return new markOrderAsOutOfStock_result(this);
16151
    }
16152
 
16153
    public boolean isSuccess() {
16154
      return this.success;
16155
    }
16156
 
16157
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
16158
      this.success = success;
16159
      setSuccessIsSet(true);
16160
      return this;
16161
    }
16162
 
16163
    public void unsetSuccess() {
16164
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16165
    }
16166
 
16167
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16168
    public boolean isSetSuccess() {
16169
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16170
    }
16171
 
16172
    public void setSuccessIsSet(boolean value) {
16173
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16174
    }
16175
 
16176
    public TransactionServiceException getEx() {
16177
      return this.ex;
16178
    }
16179
 
16180
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
16181
      this.ex = ex;
16182
      return this;
16183
    }
16184
 
16185
    public void unsetEx() {
16186
      this.ex = null;
16187
    }
16188
 
16189
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16190
    public boolean isSetEx() {
16191
      return this.ex != null;
16192
    }
16193
 
16194
    public void setExIsSet(boolean value) {
16195
      if (!value) {
16196
        this.ex = null;
16197
      }
16198
    }
16199
 
16200
    public void setFieldValue(_Fields field, Object value) {
16201
      switch (field) {
16202
      case SUCCESS:
16203
        if (value == null) {
16204
          unsetSuccess();
16205
        } else {
16206
          setSuccess((Boolean)value);
16207
        }
16208
        break;
16209
 
16210
      case EX:
16211
        if (value == null) {
16212
          unsetEx();
16213
        } else {
16214
          setEx((TransactionServiceException)value);
16215
        }
16216
        break;
16217
 
16218
      }
16219
    }
16220
 
16221
    public void setFieldValue(int fieldID, Object value) {
16222
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16223
    }
16224
 
16225
    public Object getFieldValue(_Fields field) {
16226
      switch (field) {
16227
      case SUCCESS:
16228
        return new Boolean(isSuccess());
16229
 
16230
      case EX:
16231
        return getEx();
16232
 
16233
      }
16234
      throw new IllegalStateException();
16235
    }
16236
 
16237
    public Object getFieldValue(int fieldId) {
16238
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16239
    }
16240
 
16241
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16242
    public boolean isSet(_Fields field) {
16243
      switch (field) {
16244
      case SUCCESS:
16245
        return isSetSuccess();
16246
      case EX:
16247
        return isSetEx();
16248
      }
16249
      throw new IllegalStateException();
16250
    }
16251
 
16252
    public boolean isSet(int fieldID) {
16253
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16254
    }
16255
 
16256
    @Override
16257
    public boolean equals(Object that) {
16258
      if (that == null)
16259
        return false;
16260
      if (that instanceof markOrderAsOutOfStock_result)
16261
        return this.equals((markOrderAsOutOfStock_result)that);
16262
      return false;
16263
    }
16264
 
16265
    public boolean equals(markOrderAsOutOfStock_result that) {
16266
      if (that == null)
16267
        return false;
16268
 
16269
      boolean this_present_success = true;
16270
      boolean that_present_success = true;
16271
      if (this_present_success || that_present_success) {
16272
        if (!(this_present_success && that_present_success))
16273
          return false;
16274
        if (this.success != that.success)
16275
          return false;
16276
      }
16277
 
16278
      boolean this_present_ex = true && this.isSetEx();
16279
      boolean that_present_ex = true && that.isSetEx();
16280
      if (this_present_ex || that_present_ex) {
16281
        if (!(this_present_ex && that_present_ex))
16282
          return false;
16283
        if (!this.ex.equals(that.ex))
16284
          return false;
16285
      }
16286
 
16287
      return true;
16288
    }
16289
 
16290
    @Override
16291
    public int hashCode() {
16292
      return 0;
16293
    }
16294
 
16295
    public int compareTo(markOrderAsOutOfStock_result other) {
16296
      if (!getClass().equals(other.getClass())) {
16297
        return getClass().getName().compareTo(other.getClass().getName());
16298
      }
16299
 
16300
      int lastComparison = 0;
16301
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
16302
 
16303
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16304
      if (lastComparison != 0) {
16305
        return lastComparison;
16306
      }
16307
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16308
      if (lastComparison != 0) {
16309
        return lastComparison;
16310
      }
16311
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16312
      if (lastComparison != 0) {
16313
        return lastComparison;
16314
      }
16315
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16316
      if (lastComparison != 0) {
16317
        return lastComparison;
16318
      }
16319
      return 0;
16320
    }
16321
 
16322
    public void read(TProtocol iprot) throws TException {
16323
      TField field;
16324
      iprot.readStructBegin();
16325
      while (true)
16326
      {
16327
        field = iprot.readFieldBegin();
16328
        if (field.type == TType.STOP) { 
16329
          break;
16330
        }
16331
        _Fields fieldId = _Fields.findByThriftId(field.id);
16332
        if (fieldId == null) {
16333
          TProtocolUtil.skip(iprot, field.type);
16334
        } else {
16335
          switch (fieldId) {
16336
            case SUCCESS:
16337
              if (field.type == TType.BOOL) {
16338
                this.success = iprot.readBool();
16339
                setSuccessIsSet(true);
16340
              } else { 
16341
                TProtocolUtil.skip(iprot, field.type);
16342
              }
16343
              break;
16344
            case EX:
16345
              if (field.type == TType.STRUCT) {
16346
                this.ex = new TransactionServiceException();
16347
                this.ex.read(iprot);
16348
              } else { 
16349
                TProtocolUtil.skip(iprot, field.type);
16350
              }
16351
              break;
16352
          }
16353
          iprot.readFieldEnd();
16354
        }
16355
      }
16356
      iprot.readStructEnd();
16357
      validate();
16358
    }
16359
 
16360
    public void write(TProtocol oprot) throws TException {
16361
      oprot.writeStructBegin(STRUCT_DESC);
16362
 
16363
      if (this.isSetSuccess()) {
16364
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16365
        oprot.writeBool(this.success);
16366
        oprot.writeFieldEnd();
16367
      } else if (this.isSetEx()) {
16368
        oprot.writeFieldBegin(EX_FIELD_DESC);
16369
        this.ex.write(oprot);
16370
        oprot.writeFieldEnd();
16371
      }
16372
      oprot.writeFieldStop();
16373
      oprot.writeStructEnd();
16374
    }
16375
 
16376
    @Override
16377
    public String toString() {
16378
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
16379
      boolean first = true;
16380
 
16381
      sb.append("success:");
16382
      sb.append(this.success);
16383
      first = false;
16384
      if (!first) sb.append(", ");
16385
      sb.append("ex:");
16386
      if (this.ex == null) {
16387
        sb.append("null");
16388
      } else {
16389
        sb.append(this.ex);
16390
      }
16391
      first = false;
16392
      sb.append(")");
16393
      return sb.toString();
16394
    }
16395
 
16396
    public void validate() throws TException {
16397
      // check for required fields
16398
    }
16399
 
16400
  }
16401
 
758 chandransh 16402
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
16403
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
16404
 
16405
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
16406
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
16407
 
16408
    private long warehouseId;
16409
    private long providerId;
16410
 
16411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16412
    public enum _Fields implements TFieldIdEnum {
16413
      WAREHOUSE_ID((short)1, "warehouseId"),
16414
      PROVIDER_ID((short)2, "providerId");
16415
 
16416
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16417
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16418
 
16419
      static {
16420
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16421
          byId.put((int)field._thriftId, field);
16422
          byName.put(field.getFieldName(), field);
16423
        }
16424
      }
16425
 
16426
      /**
16427
       * Find the _Fields constant that matches fieldId, or null if its not found.
16428
       */
16429
      public static _Fields findByThriftId(int fieldId) {
16430
        return byId.get(fieldId);
16431
      }
16432
 
16433
      /**
16434
       * Find the _Fields constant that matches fieldId, throwing an exception
16435
       * if it is not found.
16436
       */
16437
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16438
        _Fields fields = findByThriftId(fieldId);
16439
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16440
        return fields;
16441
      }
16442
 
16443
      /**
16444
       * Find the _Fields constant that matches name, or null if its not found.
16445
       */
16446
      public static _Fields findByName(String name) {
16447
        return byName.get(name);
16448
      }
16449
 
16450
      private final short _thriftId;
16451
      private final String _fieldName;
16452
 
16453
      _Fields(short thriftId, String fieldName) {
16454
        _thriftId = thriftId;
16455
        _fieldName = fieldName;
16456
      }
16457
 
16458
      public short getThriftFieldId() {
16459
        return _thriftId;
16460
      }
16461
 
16462
      public String getFieldName() {
16463
        return _fieldName;
16464
      }
16465
    }
16466
 
16467
    // isset id assignments
16468
    private static final int __WAREHOUSEID_ISSET_ID = 0;
16469
    private static final int __PROVIDERID_ISSET_ID = 1;
16470
    private BitSet __isset_bit_vector = new BitSet(2);
16471
 
16472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16473
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
16474
          new FieldValueMetaData(TType.I64)));
16475
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
16476
          new FieldValueMetaData(TType.I64)));
16477
    }});
16478
 
16479
    static {
16480
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
16481
    }
16482
 
16483
    public markOrdersAsManifested_args() {
16484
    }
16485
 
16486
    public markOrdersAsManifested_args(
16487
      long warehouseId,
16488
      long providerId)
16489
    {
16490
      this();
16491
      this.warehouseId = warehouseId;
16492
      setWarehouseIdIsSet(true);
16493
      this.providerId = providerId;
16494
      setProviderIdIsSet(true);
16495
    }
16496
 
16497
    /**
16498
     * Performs a deep copy on <i>other</i>.
16499
     */
16500
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
16501
      __isset_bit_vector.clear();
16502
      __isset_bit_vector.or(other.__isset_bit_vector);
16503
      this.warehouseId = other.warehouseId;
16504
      this.providerId = other.providerId;
16505
    }
16506
 
16507
    public markOrdersAsManifested_args deepCopy() {
16508
      return new markOrdersAsManifested_args(this);
16509
    }
16510
 
16511
    @Deprecated
16512
    public markOrdersAsManifested_args clone() {
16513
      return new markOrdersAsManifested_args(this);
16514
    }
16515
 
16516
    public long getWarehouseId() {
16517
      return this.warehouseId;
16518
    }
16519
 
16520
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
16521
      this.warehouseId = warehouseId;
16522
      setWarehouseIdIsSet(true);
16523
      return this;
16524
    }
16525
 
16526
    public void unsetWarehouseId() {
16527
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
16528
    }
16529
 
16530
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
16531
    public boolean isSetWarehouseId() {
16532
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
16533
    }
16534
 
16535
    public void setWarehouseIdIsSet(boolean value) {
16536
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
16537
    }
16538
 
16539
    public long getProviderId() {
16540
      return this.providerId;
16541
    }
16542
 
16543
    public markOrdersAsManifested_args setProviderId(long providerId) {
16544
      this.providerId = providerId;
16545
      setProviderIdIsSet(true);
16546
      return this;
16547
    }
16548
 
16549
    public void unsetProviderId() {
16550
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
16551
    }
16552
 
16553
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
16554
    public boolean isSetProviderId() {
16555
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
16556
    }
16557
 
16558
    public void setProviderIdIsSet(boolean value) {
16559
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
16560
    }
16561
 
16562
    public void setFieldValue(_Fields field, Object value) {
16563
      switch (field) {
16564
      case WAREHOUSE_ID:
16565
        if (value == null) {
16566
          unsetWarehouseId();
16567
        } else {
16568
          setWarehouseId((Long)value);
16569
        }
16570
        break;
16571
 
16572
      case PROVIDER_ID:
16573
        if (value == null) {
16574
          unsetProviderId();
16575
        } else {
16576
          setProviderId((Long)value);
16577
        }
16578
        break;
16579
 
16580
      }
16581
    }
16582
 
16583
    public void setFieldValue(int fieldID, Object value) {
16584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16585
    }
16586
 
16587
    public Object getFieldValue(_Fields field) {
16588
      switch (field) {
16589
      case WAREHOUSE_ID:
16590
        return new Long(getWarehouseId());
16591
 
16592
      case PROVIDER_ID:
16593
        return new Long(getProviderId());
16594
 
16595
      }
16596
      throw new IllegalStateException();
16597
    }
16598
 
16599
    public Object getFieldValue(int fieldId) {
16600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16601
    }
16602
 
16603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16604
    public boolean isSet(_Fields field) {
16605
      switch (field) {
16606
      case WAREHOUSE_ID:
16607
        return isSetWarehouseId();
16608
      case PROVIDER_ID:
16609
        return isSetProviderId();
16610
      }
16611
      throw new IllegalStateException();
16612
    }
16613
 
16614
    public boolean isSet(int fieldID) {
16615
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16616
    }
16617
 
16618
    @Override
16619
    public boolean equals(Object that) {
16620
      if (that == null)
16621
        return false;
16622
      if (that instanceof markOrdersAsManifested_args)
16623
        return this.equals((markOrdersAsManifested_args)that);
16624
      return false;
16625
    }
16626
 
16627
    public boolean equals(markOrdersAsManifested_args that) {
16628
      if (that == null)
16629
        return false;
16630
 
16631
      boolean this_present_warehouseId = true;
16632
      boolean that_present_warehouseId = true;
16633
      if (this_present_warehouseId || that_present_warehouseId) {
16634
        if (!(this_present_warehouseId && that_present_warehouseId))
16635
          return false;
16636
        if (this.warehouseId != that.warehouseId)
16637
          return false;
16638
      }
16639
 
16640
      boolean this_present_providerId = true;
16641
      boolean that_present_providerId = true;
16642
      if (this_present_providerId || that_present_providerId) {
16643
        if (!(this_present_providerId && that_present_providerId))
16644
          return false;
16645
        if (this.providerId != that.providerId)
16646
          return false;
16647
      }
16648
 
16649
      return true;
16650
    }
16651
 
16652
    @Override
16653
    public int hashCode() {
16654
      return 0;
16655
    }
16656
 
16657
    public int compareTo(markOrdersAsManifested_args other) {
16658
      if (!getClass().equals(other.getClass())) {
16659
        return getClass().getName().compareTo(other.getClass().getName());
16660
      }
16661
 
16662
      int lastComparison = 0;
16663
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
16664
 
16665
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
16666
      if (lastComparison != 0) {
16667
        return lastComparison;
16668
      }
16669
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
16670
      if (lastComparison != 0) {
16671
        return lastComparison;
16672
      }
16673
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
16674
      if (lastComparison != 0) {
16675
        return lastComparison;
16676
      }
16677
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
16678
      if (lastComparison != 0) {
16679
        return lastComparison;
16680
      }
16681
      return 0;
16682
    }
16683
 
16684
    public void read(TProtocol iprot) throws TException {
16685
      TField field;
16686
      iprot.readStructBegin();
16687
      while (true)
16688
      {
16689
        field = iprot.readFieldBegin();
16690
        if (field.type == TType.STOP) { 
16691
          break;
16692
        }
16693
        _Fields fieldId = _Fields.findByThriftId(field.id);
16694
        if (fieldId == null) {
16695
          TProtocolUtil.skip(iprot, field.type);
16696
        } else {
16697
          switch (fieldId) {
16698
            case WAREHOUSE_ID:
16699
              if (field.type == TType.I64) {
16700
                this.warehouseId = iprot.readI64();
16701
                setWarehouseIdIsSet(true);
16702
              } else { 
16703
                TProtocolUtil.skip(iprot, field.type);
16704
              }
16705
              break;
16706
            case PROVIDER_ID:
16707
              if (field.type == TType.I64) {
16708
                this.providerId = iprot.readI64();
16709
                setProviderIdIsSet(true);
16710
              } else { 
16711
                TProtocolUtil.skip(iprot, field.type);
16712
              }
16713
              break;
16714
          }
16715
          iprot.readFieldEnd();
16716
        }
16717
      }
16718
      iprot.readStructEnd();
16719
      validate();
16720
    }
16721
 
16722
    public void write(TProtocol oprot) throws TException {
16723
      validate();
16724
 
16725
      oprot.writeStructBegin(STRUCT_DESC);
16726
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
16727
      oprot.writeI64(this.warehouseId);
16728
      oprot.writeFieldEnd();
16729
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
16730
      oprot.writeI64(this.providerId);
16731
      oprot.writeFieldEnd();
16732
      oprot.writeFieldStop();
16733
      oprot.writeStructEnd();
16734
    }
16735
 
16736
    @Override
16737
    public String toString() {
16738
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
16739
      boolean first = true;
16740
 
16741
      sb.append("warehouseId:");
16742
      sb.append(this.warehouseId);
16743
      first = false;
16744
      if (!first) sb.append(", ");
16745
      sb.append("providerId:");
16746
      sb.append(this.providerId);
16747
      first = false;
16748
      sb.append(")");
16749
      return sb.toString();
16750
    }
16751
 
16752
    public void validate() throws TException {
16753
      // check for required fields
16754
    }
16755
 
16756
  }
16757
 
16758
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
16759
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
16760
 
16761
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16762
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16763
 
16764
    private boolean success;
16765
    private TransactionServiceException ex;
16766
 
16767
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16768
    public enum _Fields implements TFieldIdEnum {
16769
      SUCCESS((short)0, "success"),
16770
      EX((short)1, "ex");
16771
 
16772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16774
 
16775
      static {
16776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16777
          byId.put((int)field._thriftId, field);
16778
          byName.put(field.getFieldName(), field);
16779
        }
16780
      }
16781
 
16782
      /**
16783
       * Find the _Fields constant that matches fieldId, or null if its not found.
16784
       */
16785
      public static _Fields findByThriftId(int fieldId) {
16786
        return byId.get(fieldId);
16787
      }
16788
 
16789
      /**
16790
       * Find the _Fields constant that matches fieldId, throwing an exception
16791
       * if it is not found.
16792
       */
16793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16794
        _Fields fields = findByThriftId(fieldId);
16795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16796
        return fields;
16797
      }
16798
 
16799
      /**
16800
       * Find the _Fields constant that matches name, or null if its not found.
16801
       */
16802
      public static _Fields findByName(String name) {
16803
        return byName.get(name);
16804
      }
16805
 
16806
      private final short _thriftId;
16807
      private final String _fieldName;
16808
 
16809
      _Fields(short thriftId, String fieldName) {
16810
        _thriftId = thriftId;
16811
        _fieldName = fieldName;
16812
      }
16813
 
16814
      public short getThriftFieldId() {
16815
        return _thriftId;
16816
      }
16817
 
16818
      public String getFieldName() {
16819
        return _fieldName;
16820
      }
16821
    }
16822
 
16823
    // isset id assignments
16824
    private static final int __SUCCESS_ISSET_ID = 0;
16825
    private BitSet __isset_bit_vector = new BitSet(1);
16826
 
16827
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16828
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16829
          new FieldValueMetaData(TType.BOOL)));
16830
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16831
          new FieldValueMetaData(TType.STRUCT)));
16832
    }});
16833
 
16834
    static {
16835
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
16836
    }
16837
 
16838
    public markOrdersAsManifested_result() {
16839
    }
16840
 
16841
    public markOrdersAsManifested_result(
16842
      boolean success,
16843
      TransactionServiceException ex)
16844
    {
16845
      this();
16846
      this.success = success;
16847
      setSuccessIsSet(true);
16848
      this.ex = ex;
16849
    }
16850
 
16851
    /**
16852
     * Performs a deep copy on <i>other</i>.
16853
     */
16854
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
16855
      __isset_bit_vector.clear();
16856
      __isset_bit_vector.or(other.__isset_bit_vector);
16857
      this.success = other.success;
16858
      if (other.isSetEx()) {
16859
        this.ex = new TransactionServiceException(other.ex);
16860
      }
16861
    }
16862
 
16863
    public markOrdersAsManifested_result deepCopy() {
16864
      return new markOrdersAsManifested_result(this);
16865
    }
16866
 
16867
    @Deprecated
16868
    public markOrdersAsManifested_result clone() {
16869
      return new markOrdersAsManifested_result(this);
16870
    }
16871
 
16872
    public boolean isSuccess() {
16873
      return this.success;
16874
    }
16875
 
16876
    public markOrdersAsManifested_result setSuccess(boolean success) {
16877
      this.success = success;
16878
      setSuccessIsSet(true);
16879
      return this;
16880
    }
16881
 
16882
    public void unsetSuccess() {
16883
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16884
    }
16885
 
16886
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16887
    public boolean isSetSuccess() {
16888
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16889
    }
16890
 
16891
    public void setSuccessIsSet(boolean value) {
16892
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16893
    }
16894
 
16895
    public TransactionServiceException getEx() {
16896
      return this.ex;
16897
    }
16898
 
16899
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
16900
      this.ex = ex;
16901
      return this;
16902
    }
16903
 
16904
    public void unsetEx() {
16905
      this.ex = null;
16906
    }
16907
 
16908
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16909
    public boolean isSetEx() {
16910
      return this.ex != null;
16911
    }
16912
 
16913
    public void setExIsSet(boolean value) {
16914
      if (!value) {
16915
        this.ex = null;
16916
      }
16917
    }
16918
 
16919
    public void setFieldValue(_Fields field, Object value) {
16920
      switch (field) {
16921
      case SUCCESS:
16922
        if (value == null) {
16923
          unsetSuccess();
16924
        } else {
16925
          setSuccess((Boolean)value);
16926
        }
16927
        break;
16928
 
16929
      case EX:
16930
        if (value == null) {
16931
          unsetEx();
16932
        } else {
16933
          setEx((TransactionServiceException)value);
16934
        }
16935
        break;
16936
 
16937
      }
16938
    }
16939
 
16940
    public void setFieldValue(int fieldID, Object value) {
16941
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16942
    }
16943
 
16944
    public Object getFieldValue(_Fields field) {
16945
      switch (field) {
16946
      case SUCCESS:
16947
        return new Boolean(isSuccess());
16948
 
16949
      case EX:
16950
        return getEx();
16951
 
16952
      }
16953
      throw new IllegalStateException();
16954
    }
16955
 
16956
    public Object getFieldValue(int fieldId) {
16957
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16958
    }
16959
 
16960
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16961
    public boolean isSet(_Fields field) {
16962
      switch (field) {
16963
      case SUCCESS:
16964
        return isSetSuccess();
16965
      case EX:
16966
        return isSetEx();
16967
      }
16968
      throw new IllegalStateException();
16969
    }
16970
 
16971
    public boolean isSet(int fieldID) {
16972
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16973
    }
16974
 
16975
    @Override
16976
    public boolean equals(Object that) {
16977
      if (that == null)
16978
        return false;
16979
      if (that instanceof markOrdersAsManifested_result)
16980
        return this.equals((markOrdersAsManifested_result)that);
16981
      return false;
16982
    }
16983
 
16984
    public boolean equals(markOrdersAsManifested_result that) {
16985
      if (that == null)
16986
        return false;
16987
 
16988
      boolean this_present_success = true;
16989
      boolean that_present_success = true;
16990
      if (this_present_success || that_present_success) {
16991
        if (!(this_present_success && that_present_success))
16992
          return false;
16993
        if (this.success != that.success)
16994
          return false;
16995
      }
16996
 
16997
      boolean this_present_ex = true && this.isSetEx();
16998
      boolean that_present_ex = true && that.isSetEx();
16999
      if (this_present_ex || that_present_ex) {
17000
        if (!(this_present_ex && that_present_ex))
17001
          return false;
17002
        if (!this.ex.equals(that.ex))
17003
          return false;
17004
      }
17005
 
17006
      return true;
17007
    }
17008
 
17009
    @Override
17010
    public int hashCode() {
17011
      return 0;
17012
    }
17013
 
17014
    public int compareTo(markOrdersAsManifested_result other) {
17015
      if (!getClass().equals(other.getClass())) {
17016
        return getClass().getName().compareTo(other.getClass().getName());
17017
      }
17018
 
17019
      int lastComparison = 0;
17020
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
17021
 
17022
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17023
      if (lastComparison != 0) {
17024
        return lastComparison;
17025
      }
17026
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17027
      if (lastComparison != 0) {
17028
        return lastComparison;
17029
      }
17030
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17031
      if (lastComparison != 0) {
17032
        return lastComparison;
17033
      }
17034
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17035
      if (lastComparison != 0) {
17036
        return lastComparison;
17037
      }
17038
      return 0;
17039
    }
17040
 
17041
    public void read(TProtocol iprot) throws TException {
17042
      TField field;
17043
      iprot.readStructBegin();
17044
      while (true)
17045
      {
17046
        field = iprot.readFieldBegin();
17047
        if (field.type == TType.STOP) { 
17048
          break;
17049
        }
17050
        _Fields fieldId = _Fields.findByThriftId(field.id);
17051
        if (fieldId == null) {
17052
          TProtocolUtil.skip(iprot, field.type);
17053
        } else {
17054
          switch (fieldId) {
17055
            case SUCCESS:
17056
              if (field.type == TType.BOOL) {
17057
                this.success = iprot.readBool();
17058
                setSuccessIsSet(true);
17059
              } else { 
17060
                TProtocolUtil.skip(iprot, field.type);
17061
              }
17062
              break;
17063
            case EX:
17064
              if (field.type == TType.STRUCT) {
17065
                this.ex = new TransactionServiceException();
17066
                this.ex.read(iprot);
17067
              } else { 
17068
                TProtocolUtil.skip(iprot, field.type);
17069
              }
17070
              break;
17071
          }
17072
          iprot.readFieldEnd();
17073
        }
17074
      }
17075
      iprot.readStructEnd();
17076
      validate();
17077
    }
17078
 
17079
    public void write(TProtocol oprot) throws TException {
17080
      oprot.writeStructBegin(STRUCT_DESC);
17081
 
17082
      if (this.isSetSuccess()) {
17083
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17084
        oprot.writeBool(this.success);
17085
        oprot.writeFieldEnd();
17086
      } else if (this.isSetEx()) {
17087
        oprot.writeFieldBegin(EX_FIELD_DESC);
17088
        this.ex.write(oprot);
17089
        oprot.writeFieldEnd();
17090
      }
17091
      oprot.writeFieldStop();
17092
      oprot.writeStructEnd();
17093
    }
17094
 
17095
    @Override
17096
    public String toString() {
17097
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
17098
      boolean first = true;
17099
 
17100
      sb.append("success:");
17101
      sb.append(this.success);
17102
      first = false;
17103
      if (!first) sb.append(", ");
17104
      sb.append("ex:");
17105
      if (this.ex == null) {
17106
        sb.append("null");
17107
      } else {
17108
        sb.append(this.ex);
17109
      }
17110
      first = false;
17111
      sb.append(")");
17112
      return sb.toString();
17113
    }
17114
 
17115
    public void validate() throws TException {
17116
      // check for required fields
17117
    }
17118
 
17119
  }
17120
 
1114 chandransh 17121
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
17122
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
17123
 
17124
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
17125
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
17126
 
17127
    private long providerId;
17128
    private Map<String,Long> pickupDetails;
17129
 
17130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17131
    public enum _Fields implements TFieldIdEnum {
17132
      PROVIDER_ID((short)1, "providerId"),
17133
      PICKUP_DETAILS((short)2, "pickupDetails");
17134
 
17135
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17137
 
17138
      static {
17139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17140
          byId.put((int)field._thriftId, field);
17141
          byName.put(field.getFieldName(), field);
17142
        }
17143
      }
17144
 
17145
      /**
17146
       * Find the _Fields constant that matches fieldId, or null if its not found.
17147
       */
17148
      public static _Fields findByThriftId(int fieldId) {
17149
        return byId.get(fieldId);
17150
      }
17151
 
17152
      /**
17153
       * Find the _Fields constant that matches fieldId, throwing an exception
17154
       * if it is not found.
17155
       */
17156
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17157
        _Fields fields = findByThriftId(fieldId);
17158
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17159
        return fields;
17160
      }
17161
 
17162
      /**
17163
       * Find the _Fields constant that matches name, or null if its not found.
17164
       */
17165
      public static _Fields findByName(String name) {
17166
        return byName.get(name);
17167
      }
17168
 
17169
      private final short _thriftId;
17170
      private final String _fieldName;
17171
 
17172
      _Fields(short thriftId, String fieldName) {
17173
        _thriftId = thriftId;
17174
        _fieldName = fieldName;
17175
      }
17176
 
17177
      public short getThriftFieldId() {
17178
        return _thriftId;
17179
      }
17180
 
17181
      public String getFieldName() {
17182
        return _fieldName;
17183
      }
17184
    }
17185
 
17186
    // isset id assignments
17187
    private static final int __PROVIDERID_ISSET_ID = 0;
17188
    private BitSet __isset_bit_vector = new BitSet(1);
17189
 
17190
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17191
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17192
          new FieldValueMetaData(TType.I64)));
17193
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
17194
          new MapMetaData(TType.MAP, 
17195
              new FieldValueMetaData(TType.STRING), 
17196
              new FieldValueMetaData(TType.I64))));
17197
    }});
17198
 
17199
    static {
17200
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
17201
    }
17202
 
17203
    public markOrdersAsPickedUp_args() {
17204
    }
17205
 
17206
    public markOrdersAsPickedUp_args(
17207
      long providerId,
17208
      Map<String,Long> pickupDetails)
17209
    {
17210
      this();
17211
      this.providerId = providerId;
17212
      setProviderIdIsSet(true);
17213
      this.pickupDetails = pickupDetails;
17214
    }
17215
 
17216
    /**
17217
     * Performs a deep copy on <i>other</i>.
17218
     */
17219
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
17220
      __isset_bit_vector.clear();
17221
      __isset_bit_vector.or(other.__isset_bit_vector);
17222
      this.providerId = other.providerId;
17223
      if (other.isSetPickupDetails()) {
17224
        Map<String,Long> __this__pickupDetails = new HashMap<String,Long>();
17225
        for (Map.Entry<String, Long> other_element : other.pickupDetails.entrySet()) {
17226
 
17227
          String other_element_key = other_element.getKey();
17228
          Long other_element_value = other_element.getValue();
17229
 
17230
          String __this__pickupDetails_copy_key = other_element_key;
17231
 
17232
          Long __this__pickupDetails_copy_value = other_element_value;
17233
 
17234
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
17235
        }
17236
        this.pickupDetails = __this__pickupDetails;
17237
      }
17238
    }
17239
 
17240
    public markOrdersAsPickedUp_args deepCopy() {
17241
      return new markOrdersAsPickedUp_args(this);
17242
    }
17243
 
17244
    @Deprecated
17245
    public markOrdersAsPickedUp_args clone() {
17246
      return new markOrdersAsPickedUp_args(this);
17247
    }
17248
 
17249
    public long getProviderId() {
17250
      return this.providerId;
17251
    }
17252
 
17253
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
17254
      this.providerId = providerId;
17255
      setProviderIdIsSet(true);
17256
      return this;
17257
    }
17258
 
17259
    public void unsetProviderId() {
17260
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
17261
    }
17262
 
17263
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
17264
    public boolean isSetProviderId() {
17265
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
17266
    }
17267
 
17268
    public void setProviderIdIsSet(boolean value) {
17269
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
17270
    }
17271
 
17272
    public int getPickupDetailsSize() {
17273
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
17274
    }
17275
 
17276
    public void putToPickupDetails(String key, long val) {
17277
      if (this.pickupDetails == null) {
17278
        this.pickupDetails = new HashMap<String,Long>();
17279
      }
17280
      this.pickupDetails.put(key, val);
17281
    }
17282
 
17283
    public Map<String,Long> getPickupDetails() {
17284
      return this.pickupDetails;
17285
    }
17286
 
17287
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,Long> pickupDetails) {
17288
      this.pickupDetails = pickupDetails;
17289
      return this;
17290
    }
17291
 
17292
    public void unsetPickupDetails() {
17293
      this.pickupDetails = null;
17294
    }
17295
 
17296
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
17297
    public boolean isSetPickupDetails() {
17298
      return this.pickupDetails != null;
17299
    }
17300
 
17301
    public void setPickupDetailsIsSet(boolean value) {
17302
      if (!value) {
17303
        this.pickupDetails = null;
17304
      }
17305
    }
17306
 
17307
    public void setFieldValue(_Fields field, Object value) {
17308
      switch (field) {
17309
      case PROVIDER_ID:
17310
        if (value == null) {
17311
          unsetProviderId();
17312
        } else {
17313
          setProviderId((Long)value);
17314
        }
17315
        break;
17316
 
17317
      case PICKUP_DETAILS:
17318
        if (value == null) {
17319
          unsetPickupDetails();
17320
        } else {
17321
          setPickupDetails((Map<String,Long>)value);
17322
        }
17323
        break;
17324
 
17325
      }
17326
    }
17327
 
17328
    public void setFieldValue(int fieldID, Object value) {
17329
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17330
    }
17331
 
17332
    public Object getFieldValue(_Fields field) {
17333
      switch (field) {
17334
      case PROVIDER_ID:
17335
        return new Long(getProviderId());
17336
 
17337
      case PICKUP_DETAILS:
17338
        return getPickupDetails();
17339
 
17340
      }
17341
      throw new IllegalStateException();
17342
    }
17343
 
17344
    public Object getFieldValue(int fieldId) {
17345
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17346
    }
17347
 
17348
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17349
    public boolean isSet(_Fields field) {
17350
      switch (field) {
17351
      case PROVIDER_ID:
17352
        return isSetProviderId();
17353
      case PICKUP_DETAILS:
17354
        return isSetPickupDetails();
17355
      }
17356
      throw new IllegalStateException();
17357
    }
17358
 
17359
    public boolean isSet(int fieldID) {
17360
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17361
    }
17362
 
17363
    @Override
17364
    public boolean equals(Object that) {
17365
      if (that == null)
17366
        return false;
17367
      if (that instanceof markOrdersAsPickedUp_args)
17368
        return this.equals((markOrdersAsPickedUp_args)that);
17369
      return false;
17370
    }
17371
 
17372
    public boolean equals(markOrdersAsPickedUp_args that) {
17373
      if (that == null)
17374
        return false;
17375
 
17376
      boolean this_present_providerId = true;
17377
      boolean that_present_providerId = true;
17378
      if (this_present_providerId || that_present_providerId) {
17379
        if (!(this_present_providerId && that_present_providerId))
17380
          return false;
17381
        if (this.providerId != that.providerId)
17382
          return false;
17383
      }
17384
 
17385
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
17386
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
17387
      if (this_present_pickupDetails || that_present_pickupDetails) {
17388
        if (!(this_present_pickupDetails && that_present_pickupDetails))
17389
          return false;
17390
        if (!this.pickupDetails.equals(that.pickupDetails))
17391
          return false;
17392
      }
17393
 
17394
      return true;
17395
    }
17396
 
17397
    @Override
17398
    public int hashCode() {
17399
      return 0;
17400
    }
17401
 
17402
    public void read(TProtocol iprot) throws TException {
17403
      TField field;
17404
      iprot.readStructBegin();
17405
      while (true)
17406
      {
17407
        field = iprot.readFieldBegin();
17408
        if (field.type == TType.STOP) { 
17409
          break;
17410
        }
17411
        _Fields fieldId = _Fields.findByThriftId(field.id);
17412
        if (fieldId == null) {
17413
          TProtocolUtil.skip(iprot, field.type);
17414
        } else {
17415
          switch (fieldId) {
17416
            case PROVIDER_ID:
17417
              if (field.type == TType.I64) {
17418
                this.providerId = iprot.readI64();
17419
                setProviderIdIsSet(true);
17420
              } else { 
17421
                TProtocolUtil.skip(iprot, field.type);
17422
              }
17423
              break;
17424
            case PICKUP_DETAILS:
17425
              if (field.type == TType.MAP) {
17426
                {
17427
                  TMap _map36 = iprot.readMapBegin();
17428
                  this.pickupDetails = new HashMap<String,Long>(2*_map36.size);
17429
                  for (int _i37 = 0; _i37 < _map36.size; ++_i37)
17430
                  {
17431
                    String _key38;
17432
                    long _val39;
17433
                    _key38 = iprot.readString();
17434
                    _val39 = iprot.readI64();
17435
                    this.pickupDetails.put(_key38, _val39);
17436
                  }
17437
                  iprot.readMapEnd();
17438
                }
17439
              } else { 
17440
                TProtocolUtil.skip(iprot, field.type);
17441
              }
17442
              break;
17443
          }
17444
          iprot.readFieldEnd();
17445
        }
17446
      }
17447
      iprot.readStructEnd();
17448
      validate();
17449
    }
17450
 
17451
    public void write(TProtocol oprot) throws TException {
17452
      validate();
17453
 
17454
      oprot.writeStructBegin(STRUCT_DESC);
17455
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
17456
      oprot.writeI64(this.providerId);
17457
      oprot.writeFieldEnd();
17458
      if (this.pickupDetails != null) {
17459
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
17460
        {
17461
          oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.pickupDetails.size()));
17462
          for (Map.Entry<String, Long> _iter40 : this.pickupDetails.entrySet())
17463
          {
17464
            oprot.writeString(_iter40.getKey());
17465
            oprot.writeI64(_iter40.getValue());
17466
          }
17467
          oprot.writeMapEnd();
17468
        }
17469
        oprot.writeFieldEnd();
17470
      }
17471
      oprot.writeFieldStop();
17472
      oprot.writeStructEnd();
17473
    }
17474
 
17475
    @Override
17476
    public String toString() {
17477
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
17478
      boolean first = true;
17479
 
17480
      sb.append("providerId:");
17481
      sb.append(this.providerId);
17482
      first = false;
17483
      if (!first) sb.append(", ");
17484
      sb.append("pickupDetails:");
17485
      if (this.pickupDetails == null) {
17486
        sb.append("null");
17487
      } else {
17488
        sb.append(this.pickupDetails);
17489
      }
17490
      first = false;
17491
      sb.append(")");
17492
      return sb.toString();
17493
    }
17494
 
17495
    public void validate() throws TException {
17496
      // check for required fields
17497
    }
17498
 
17499
  }
17500
 
17501
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
17502
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
17503
 
17504
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17505
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17506
 
17507
    private List<Order> success;
17508
    private TransactionServiceException ex;
17509
 
17510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17511
    public enum _Fields implements TFieldIdEnum {
17512
      SUCCESS((short)0, "success"),
17513
      EX((short)1, "ex");
17514
 
17515
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17516
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17517
 
17518
      static {
17519
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17520
          byId.put((int)field._thriftId, field);
17521
          byName.put(field.getFieldName(), field);
17522
        }
17523
      }
17524
 
17525
      /**
17526
       * Find the _Fields constant that matches fieldId, or null if its not found.
17527
       */
17528
      public static _Fields findByThriftId(int fieldId) {
17529
        return byId.get(fieldId);
17530
      }
17531
 
17532
      /**
17533
       * Find the _Fields constant that matches fieldId, throwing an exception
17534
       * if it is not found.
17535
       */
17536
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17537
        _Fields fields = findByThriftId(fieldId);
17538
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17539
        return fields;
17540
      }
17541
 
17542
      /**
17543
       * Find the _Fields constant that matches name, or null if its not found.
17544
       */
17545
      public static _Fields findByName(String name) {
17546
        return byName.get(name);
17547
      }
17548
 
17549
      private final short _thriftId;
17550
      private final String _fieldName;
17551
 
17552
      _Fields(short thriftId, String fieldName) {
17553
        _thriftId = thriftId;
17554
        _fieldName = fieldName;
17555
      }
17556
 
17557
      public short getThriftFieldId() {
17558
        return _thriftId;
17559
      }
17560
 
17561
      public String getFieldName() {
17562
        return _fieldName;
17563
      }
17564
    }
17565
 
17566
    // isset id assignments
17567
 
17568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17569
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17570
          new ListMetaData(TType.LIST, 
17571
              new StructMetaData(TType.STRUCT, Order.class))));
17572
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17573
          new FieldValueMetaData(TType.STRUCT)));
17574
    }});
17575
 
17576
    static {
17577
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
17578
    }
17579
 
17580
    public markOrdersAsPickedUp_result() {
17581
    }
17582
 
17583
    public markOrdersAsPickedUp_result(
17584
      List<Order> success,
17585
      TransactionServiceException ex)
17586
    {
17587
      this();
17588
      this.success = success;
17589
      this.ex = ex;
17590
    }
17591
 
17592
    /**
17593
     * Performs a deep copy on <i>other</i>.
17594
     */
17595
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
17596
      if (other.isSetSuccess()) {
17597
        List<Order> __this__success = new ArrayList<Order>();
17598
        for (Order other_element : other.success) {
17599
          __this__success.add(new Order(other_element));
17600
        }
17601
        this.success = __this__success;
17602
      }
17603
      if (other.isSetEx()) {
17604
        this.ex = new TransactionServiceException(other.ex);
17605
      }
17606
    }
17607
 
17608
    public markOrdersAsPickedUp_result deepCopy() {
17609
      return new markOrdersAsPickedUp_result(this);
17610
    }
17611
 
17612
    @Deprecated
17613
    public markOrdersAsPickedUp_result clone() {
17614
      return new markOrdersAsPickedUp_result(this);
17615
    }
17616
 
17617
    public int getSuccessSize() {
17618
      return (this.success == null) ? 0 : this.success.size();
17619
    }
17620
 
17621
    public java.util.Iterator<Order> getSuccessIterator() {
17622
      return (this.success == null) ? null : this.success.iterator();
17623
    }
17624
 
17625
    public void addToSuccess(Order elem) {
17626
      if (this.success == null) {
17627
        this.success = new ArrayList<Order>();
17628
      }
17629
      this.success.add(elem);
17630
    }
17631
 
17632
    public List<Order> getSuccess() {
17633
      return this.success;
17634
    }
17635
 
17636
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
17637
      this.success = success;
17638
      return this;
17639
    }
17640
 
17641
    public void unsetSuccess() {
17642
      this.success = null;
17643
    }
17644
 
17645
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17646
    public boolean isSetSuccess() {
17647
      return this.success != null;
17648
    }
17649
 
17650
    public void setSuccessIsSet(boolean value) {
17651
      if (!value) {
17652
        this.success = null;
17653
      }
17654
    }
17655
 
17656
    public TransactionServiceException getEx() {
17657
      return this.ex;
17658
    }
17659
 
17660
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
17661
      this.ex = ex;
17662
      return this;
17663
    }
17664
 
17665
    public void unsetEx() {
17666
      this.ex = null;
17667
    }
17668
 
17669
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17670
    public boolean isSetEx() {
17671
      return this.ex != null;
17672
    }
17673
 
17674
    public void setExIsSet(boolean value) {
17675
      if (!value) {
17676
        this.ex = null;
17677
      }
17678
    }
17679
 
17680
    public void setFieldValue(_Fields field, Object value) {
17681
      switch (field) {
17682
      case SUCCESS:
17683
        if (value == null) {
17684
          unsetSuccess();
17685
        } else {
17686
          setSuccess((List<Order>)value);
17687
        }
17688
        break;
17689
 
17690
      case EX:
17691
        if (value == null) {
17692
          unsetEx();
17693
        } else {
17694
          setEx((TransactionServiceException)value);
17695
        }
17696
        break;
17697
 
17698
      }
17699
    }
17700
 
17701
    public void setFieldValue(int fieldID, Object value) {
17702
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17703
    }
17704
 
17705
    public Object getFieldValue(_Fields field) {
17706
      switch (field) {
17707
      case SUCCESS:
17708
        return getSuccess();
17709
 
17710
      case EX:
17711
        return getEx();
17712
 
17713
      }
17714
      throw new IllegalStateException();
17715
    }
17716
 
17717
    public Object getFieldValue(int fieldId) {
17718
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17719
    }
17720
 
17721
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17722
    public boolean isSet(_Fields field) {
17723
      switch (field) {
17724
      case SUCCESS:
17725
        return isSetSuccess();
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 markOrdersAsPickedUp_result)
17741
        return this.equals((markOrdersAsPickedUp_result)that);
17742
      return false;
17743
    }
17744
 
17745
    public boolean equals(markOrdersAsPickedUp_result that) {
17746
      if (that == null)
17747
        return false;
17748
 
17749
      boolean this_present_success = true && this.isSetSuccess();
17750
      boolean that_present_success = true && that.isSetSuccess();
17751
      if (this_present_success || that_present_success) {
17752
        if (!(this_present_success && that_present_success))
17753
          return false;
17754
        if (!this.success.equals(that.success))
17755
          return false;
17756
      }
17757
 
17758
      boolean this_present_ex = true && this.isSetEx();
17759
      boolean that_present_ex = true && that.isSetEx();
17760
      if (this_present_ex || that_present_ex) {
17761
        if (!(this_present_ex && that_present_ex))
17762
          return false;
17763
        if (!this.ex.equals(that.ex))
17764
          return false;
17765
      }
17766
 
17767
      return true;
17768
    }
17769
 
17770
    @Override
17771
    public int hashCode() {
17772
      return 0;
17773
    }
17774
 
17775
    public int compareTo(markOrdersAsPickedUp_result other) {
17776
      if (!getClass().equals(other.getClass())) {
17777
        return getClass().getName().compareTo(other.getClass().getName());
17778
      }
17779
 
17780
      int lastComparison = 0;
17781
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
17782
 
17783
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17784
      if (lastComparison != 0) {
17785
        return lastComparison;
17786
      }
17787
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17788
      if (lastComparison != 0) {
17789
        return lastComparison;
17790
      }
17791
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17792
      if (lastComparison != 0) {
17793
        return lastComparison;
17794
      }
17795
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17796
      if (lastComparison != 0) {
17797
        return lastComparison;
17798
      }
17799
      return 0;
17800
    }
17801
 
17802
    public void read(TProtocol iprot) throws TException {
17803
      TField field;
17804
      iprot.readStructBegin();
17805
      while (true)
17806
      {
17807
        field = iprot.readFieldBegin();
17808
        if (field.type == TType.STOP) { 
17809
          break;
17810
        }
17811
        _Fields fieldId = _Fields.findByThriftId(field.id);
17812
        if (fieldId == null) {
17813
          TProtocolUtil.skip(iprot, field.type);
17814
        } else {
17815
          switch (fieldId) {
17816
            case SUCCESS:
17817
              if (field.type == TType.LIST) {
17818
                {
17819
                  TList _list41 = iprot.readListBegin();
17820
                  this.success = new ArrayList<Order>(_list41.size);
17821
                  for (int _i42 = 0; _i42 < _list41.size; ++_i42)
17822
                  {
17823
                    Order _elem43;
17824
                    _elem43 = new Order();
17825
                    _elem43.read(iprot);
17826
                    this.success.add(_elem43);
17827
                  }
17828
                  iprot.readListEnd();
17829
                }
17830
              } else { 
17831
                TProtocolUtil.skip(iprot, field.type);
17832
              }
17833
              break;
17834
            case EX:
17835
              if (field.type == TType.STRUCT) {
17836
                this.ex = new TransactionServiceException();
17837
                this.ex.read(iprot);
17838
              } else { 
17839
                TProtocolUtil.skip(iprot, field.type);
17840
              }
17841
              break;
17842
          }
17843
          iprot.readFieldEnd();
17844
        }
17845
      }
17846
      iprot.readStructEnd();
17847
      validate();
17848
    }
17849
 
17850
    public void write(TProtocol oprot) throws TException {
17851
      oprot.writeStructBegin(STRUCT_DESC);
17852
 
17853
      if (this.isSetSuccess()) {
17854
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17855
        {
17856
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
17857
          for (Order _iter44 : this.success)
17858
          {
17859
            _iter44.write(oprot);
17860
          }
17861
          oprot.writeListEnd();
17862
        }
17863
        oprot.writeFieldEnd();
17864
      } else if (this.isSetEx()) {
17865
        oprot.writeFieldBegin(EX_FIELD_DESC);
17866
        this.ex.write(oprot);
17867
        oprot.writeFieldEnd();
17868
      }
17869
      oprot.writeFieldStop();
17870
      oprot.writeStructEnd();
17871
    }
17872
 
17873
    @Override
17874
    public String toString() {
17875
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
17876
      boolean first = true;
17877
 
17878
      sb.append("success:");
17879
      if (this.success == null) {
17880
        sb.append("null");
17881
      } else {
17882
        sb.append(this.success);
17883
      }
17884
      first = false;
17885
      if (!first) sb.append(", ");
17886
      sb.append("ex:");
17887
      if (this.ex == null) {
17888
        sb.append("null");
17889
      } else {
17890
        sb.append(this.ex);
17891
      }
17892
      first = false;
17893
      sb.append(")");
17894
      return sb.toString();
17895
    }
17896
 
17897
    public void validate() throws TException {
17898
      // check for required fields
17899
    }
17900
 
17901
  }
17902
 
1133 chandransh 17903
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
17904
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
17905
 
17906
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
17907
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
17908
 
17909
    private long providerId;
17910
    private Map<String,String> deliveredOrders;
17911
 
17912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17913
    public enum _Fields implements TFieldIdEnum {
17914
      PROVIDER_ID((short)1, "providerId"),
17915
      DELIVERED_ORDERS((short)2, "deliveredOrders");
17916
 
17917
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17918
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17919
 
17920
      static {
17921
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17922
          byId.put((int)field._thriftId, field);
17923
          byName.put(field.getFieldName(), field);
17924
        }
17925
      }
17926
 
17927
      /**
17928
       * Find the _Fields constant that matches fieldId, or null if its not found.
17929
       */
17930
      public static _Fields findByThriftId(int fieldId) {
17931
        return byId.get(fieldId);
17932
      }
17933
 
17934
      /**
17935
       * Find the _Fields constant that matches fieldId, throwing an exception
17936
       * if it is not found.
17937
       */
17938
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17939
        _Fields fields = findByThriftId(fieldId);
17940
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17941
        return fields;
17942
      }
17943
 
17944
      /**
17945
       * Find the _Fields constant that matches name, or null if its not found.
17946
       */
17947
      public static _Fields findByName(String name) {
17948
        return byName.get(name);
17949
      }
17950
 
17951
      private final short _thriftId;
17952
      private final String _fieldName;
17953
 
17954
      _Fields(short thriftId, String fieldName) {
17955
        _thriftId = thriftId;
17956
        _fieldName = fieldName;
17957
      }
17958
 
17959
      public short getThriftFieldId() {
17960
        return _thriftId;
17961
      }
17962
 
17963
      public String getFieldName() {
17964
        return _fieldName;
17965
      }
17966
    }
17967
 
17968
    // isset id assignments
17969
    private static final int __PROVIDERID_ISSET_ID = 0;
17970
    private BitSet __isset_bit_vector = new BitSet(1);
17971
 
17972
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17973
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17974
          new FieldValueMetaData(TType.I64)));
17975
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
17976
          new MapMetaData(TType.MAP, 
17977
              new FieldValueMetaData(TType.STRING), 
17978
              new FieldValueMetaData(TType.STRING))));
17979
    }});
17980
 
17981
    static {
17982
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
17983
    }
17984
 
17985
    public markOrdersAsDelivered_args() {
17986
    }
17987
 
17988
    public markOrdersAsDelivered_args(
17989
      long providerId,
17990
      Map<String,String> deliveredOrders)
17991
    {
17992
      this();
17993
      this.providerId = providerId;
17994
      setProviderIdIsSet(true);
17995
      this.deliveredOrders = deliveredOrders;
17996
    }
17997
 
17998
    /**
17999
     * Performs a deep copy on <i>other</i>.
18000
     */
18001
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
18002
      __isset_bit_vector.clear();
18003
      __isset_bit_vector.or(other.__isset_bit_vector);
18004
      this.providerId = other.providerId;
18005
      if (other.isSetDeliveredOrders()) {
18006
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
18007
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
18008
 
18009
          String other_element_key = other_element.getKey();
18010
          String other_element_value = other_element.getValue();
18011
 
18012
          String __this__deliveredOrders_copy_key = other_element_key;
18013
 
18014
          String __this__deliveredOrders_copy_value = other_element_value;
18015
 
18016
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
18017
        }
18018
        this.deliveredOrders = __this__deliveredOrders;
18019
      }
18020
    }
18021
 
18022
    public markOrdersAsDelivered_args deepCopy() {
18023
      return new markOrdersAsDelivered_args(this);
18024
    }
18025
 
18026
    @Deprecated
18027
    public markOrdersAsDelivered_args clone() {
18028
      return new markOrdersAsDelivered_args(this);
18029
    }
18030
 
18031
    public long getProviderId() {
18032
      return this.providerId;
18033
    }
18034
 
18035
    public markOrdersAsDelivered_args setProviderId(long providerId) {
18036
      this.providerId = providerId;
18037
      setProviderIdIsSet(true);
18038
      return this;
18039
    }
18040
 
18041
    public void unsetProviderId() {
18042
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
18043
    }
18044
 
18045
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
18046
    public boolean isSetProviderId() {
18047
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
18048
    }
18049
 
18050
    public void setProviderIdIsSet(boolean value) {
18051
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
18052
    }
18053
 
18054
    public int getDeliveredOrdersSize() {
18055
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
18056
    }
18057
 
18058
    public void putToDeliveredOrders(String key, String val) {
18059
      if (this.deliveredOrders == null) {
18060
        this.deliveredOrders = new HashMap<String,String>();
18061
      }
18062
      this.deliveredOrders.put(key, val);
18063
    }
18064
 
18065
    public Map<String,String> getDeliveredOrders() {
18066
      return this.deliveredOrders;
18067
    }
18068
 
18069
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
18070
      this.deliveredOrders = deliveredOrders;
18071
      return this;
18072
    }
18073
 
18074
    public void unsetDeliveredOrders() {
18075
      this.deliveredOrders = null;
18076
    }
18077
 
18078
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
18079
    public boolean isSetDeliveredOrders() {
18080
      return this.deliveredOrders != null;
18081
    }
18082
 
18083
    public void setDeliveredOrdersIsSet(boolean value) {
18084
      if (!value) {
18085
        this.deliveredOrders = null;
18086
      }
18087
    }
18088
 
18089
    public void setFieldValue(_Fields field, Object value) {
18090
      switch (field) {
18091
      case PROVIDER_ID:
18092
        if (value == null) {
18093
          unsetProviderId();
18094
        } else {
18095
          setProviderId((Long)value);
18096
        }
18097
        break;
18098
 
18099
      case DELIVERED_ORDERS:
18100
        if (value == null) {
18101
          unsetDeliveredOrders();
18102
        } else {
18103
          setDeliveredOrders((Map<String,String>)value);
18104
        }
18105
        break;
18106
 
18107
      }
18108
    }
18109
 
18110
    public void setFieldValue(int fieldID, Object value) {
18111
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18112
    }
18113
 
18114
    public Object getFieldValue(_Fields field) {
18115
      switch (field) {
18116
      case PROVIDER_ID:
18117
        return new Long(getProviderId());
18118
 
18119
      case DELIVERED_ORDERS:
18120
        return getDeliveredOrders();
18121
 
18122
      }
18123
      throw new IllegalStateException();
18124
    }
18125
 
18126
    public Object getFieldValue(int fieldId) {
18127
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18128
    }
18129
 
18130
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18131
    public boolean isSet(_Fields field) {
18132
      switch (field) {
18133
      case PROVIDER_ID:
18134
        return isSetProviderId();
18135
      case DELIVERED_ORDERS:
18136
        return isSetDeliveredOrders();
18137
      }
18138
      throw new IllegalStateException();
18139
    }
18140
 
18141
    public boolean isSet(int fieldID) {
18142
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18143
    }
18144
 
18145
    @Override
18146
    public boolean equals(Object that) {
18147
      if (that == null)
18148
        return false;
18149
      if (that instanceof markOrdersAsDelivered_args)
18150
        return this.equals((markOrdersAsDelivered_args)that);
18151
      return false;
18152
    }
18153
 
18154
    public boolean equals(markOrdersAsDelivered_args that) {
18155
      if (that == null)
18156
        return false;
18157
 
18158
      boolean this_present_providerId = true;
18159
      boolean that_present_providerId = true;
18160
      if (this_present_providerId || that_present_providerId) {
18161
        if (!(this_present_providerId && that_present_providerId))
18162
          return false;
18163
        if (this.providerId != that.providerId)
18164
          return false;
18165
      }
18166
 
18167
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
18168
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
18169
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
18170
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
18171
          return false;
18172
        if (!this.deliveredOrders.equals(that.deliveredOrders))
18173
          return false;
18174
      }
18175
 
18176
      return true;
18177
    }
18178
 
18179
    @Override
18180
    public int hashCode() {
18181
      return 0;
18182
    }
18183
 
18184
    public void read(TProtocol iprot) throws TException {
18185
      TField field;
18186
      iprot.readStructBegin();
18187
      while (true)
18188
      {
18189
        field = iprot.readFieldBegin();
18190
        if (field.type == TType.STOP) { 
18191
          break;
18192
        }
18193
        _Fields fieldId = _Fields.findByThriftId(field.id);
18194
        if (fieldId == null) {
18195
          TProtocolUtil.skip(iprot, field.type);
18196
        } else {
18197
          switch (fieldId) {
18198
            case PROVIDER_ID:
18199
              if (field.type == TType.I64) {
18200
                this.providerId = iprot.readI64();
18201
                setProviderIdIsSet(true);
18202
              } else { 
18203
                TProtocolUtil.skip(iprot, field.type);
18204
              }
18205
              break;
18206
            case DELIVERED_ORDERS:
18207
              if (field.type == TType.MAP) {
18208
                {
18209
                  TMap _map45 = iprot.readMapBegin();
18210
                  this.deliveredOrders = new HashMap<String,String>(2*_map45.size);
18211
                  for (int _i46 = 0; _i46 < _map45.size; ++_i46)
18212
                  {
18213
                    String _key47;
18214
                    String _val48;
18215
                    _key47 = iprot.readString();
18216
                    _val48 = iprot.readString();
18217
                    this.deliveredOrders.put(_key47, _val48);
18218
                  }
18219
                  iprot.readMapEnd();
18220
                }
18221
              } else { 
18222
                TProtocolUtil.skip(iprot, field.type);
18223
              }
18224
              break;
18225
          }
18226
          iprot.readFieldEnd();
18227
        }
18228
      }
18229
      iprot.readStructEnd();
18230
      validate();
18231
    }
18232
 
18233
    public void write(TProtocol oprot) throws TException {
18234
      validate();
18235
 
18236
      oprot.writeStructBegin(STRUCT_DESC);
18237
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
18238
      oprot.writeI64(this.providerId);
18239
      oprot.writeFieldEnd();
18240
      if (this.deliveredOrders != null) {
18241
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
18242
        {
18243
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
18244
          for (Map.Entry<String, String> _iter49 : this.deliveredOrders.entrySet())
18245
          {
18246
            oprot.writeString(_iter49.getKey());
18247
            oprot.writeString(_iter49.getValue());
18248
          }
18249
          oprot.writeMapEnd();
18250
        }
18251
        oprot.writeFieldEnd();
18252
      }
18253
      oprot.writeFieldStop();
18254
      oprot.writeStructEnd();
18255
    }
18256
 
18257
    @Override
18258
    public String toString() {
18259
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
18260
      boolean first = true;
18261
 
18262
      sb.append("providerId:");
18263
      sb.append(this.providerId);
18264
      first = false;
18265
      if (!first) sb.append(", ");
18266
      sb.append("deliveredOrders:");
18267
      if (this.deliveredOrders == null) {
18268
        sb.append("null");
18269
      } else {
18270
        sb.append(this.deliveredOrders);
18271
      }
18272
      first = false;
18273
      sb.append(")");
18274
      return sb.toString();
18275
    }
18276
 
18277
    public void validate() throws TException {
18278
      // check for required fields
18279
    }
18280
 
18281
  }
18282
 
18283
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
18284
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
18285
 
18286
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18287
 
18288
    private TransactionServiceException ex;
18289
 
18290
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18291
    public enum _Fields implements TFieldIdEnum {
18292
      EX((short)1, "ex");
18293
 
18294
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18296
 
18297
      static {
18298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18299
          byId.put((int)field._thriftId, field);
18300
          byName.put(field.getFieldName(), field);
18301
        }
18302
      }
18303
 
18304
      /**
18305
       * Find the _Fields constant that matches fieldId, or null if its not found.
18306
       */
18307
      public static _Fields findByThriftId(int fieldId) {
18308
        return byId.get(fieldId);
18309
      }
18310
 
18311
      /**
18312
       * Find the _Fields constant that matches fieldId, throwing an exception
18313
       * if it is not found.
18314
       */
18315
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18316
        _Fields fields = findByThriftId(fieldId);
18317
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18318
        return fields;
18319
      }
18320
 
18321
      /**
18322
       * Find the _Fields constant that matches name, or null if its not found.
18323
       */
18324
      public static _Fields findByName(String name) {
18325
        return byName.get(name);
18326
      }
18327
 
18328
      private final short _thriftId;
18329
      private final String _fieldName;
18330
 
18331
      _Fields(short thriftId, String fieldName) {
18332
        _thriftId = thriftId;
18333
        _fieldName = fieldName;
18334
      }
18335
 
18336
      public short getThriftFieldId() {
18337
        return _thriftId;
18338
      }
18339
 
18340
      public String getFieldName() {
18341
        return _fieldName;
18342
      }
18343
    }
18344
 
18345
    // isset id assignments
18346
 
18347
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18348
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18349
          new FieldValueMetaData(TType.STRUCT)));
18350
    }});
18351
 
18352
    static {
18353
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
18354
    }
18355
 
18356
    public markOrdersAsDelivered_result() {
18357
    }
18358
 
18359
    public markOrdersAsDelivered_result(
18360
      TransactionServiceException ex)
18361
    {
18362
      this();
18363
      this.ex = ex;
18364
    }
18365
 
18366
    /**
18367
     * Performs a deep copy on <i>other</i>.
18368
     */
18369
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
18370
      if (other.isSetEx()) {
18371
        this.ex = new TransactionServiceException(other.ex);
18372
      }
18373
    }
18374
 
18375
    public markOrdersAsDelivered_result deepCopy() {
18376
      return new markOrdersAsDelivered_result(this);
18377
    }
18378
 
18379
    @Deprecated
18380
    public markOrdersAsDelivered_result clone() {
18381
      return new markOrdersAsDelivered_result(this);
18382
    }
18383
 
18384
    public TransactionServiceException getEx() {
18385
      return this.ex;
18386
    }
18387
 
18388
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
18389
      this.ex = ex;
18390
      return this;
18391
    }
18392
 
18393
    public void unsetEx() {
18394
      this.ex = null;
18395
    }
18396
 
18397
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18398
    public boolean isSetEx() {
18399
      return this.ex != null;
18400
    }
18401
 
18402
    public void setExIsSet(boolean value) {
18403
      if (!value) {
18404
        this.ex = null;
18405
      }
18406
    }
18407
 
18408
    public void setFieldValue(_Fields field, Object value) {
18409
      switch (field) {
18410
      case EX:
18411
        if (value == null) {
18412
          unsetEx();
18413
        } else {
18414
          setEx((TransactionServiceException)value);
18415
        }
18416
        break;
18417
 
18418
      }
18419
    }
18420
 
18421
    public void setFieldValue(int fieldID, Object value) {
18422
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18423
    }
18424
 
18425
    public Object getFieldValue(_Fields field) {
18426
      switch (field) {
18427
      case EX:
18428
        return getEx();
18429
 
18430
      }
18431
      throw new IllegalStateException();
18432
    }
18433
 
18434
    public Object getFieldValue(int fieldId) {
18435
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18436
    }
18437
 
18438
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18439
    public boolean isSet(_Fields field) {
18440
      switch (field) {
18441
      case EX:
18442
        return isSetEx();
18443
      }
18444
      throw new IllegalStateException();
18445
    }
18446
 
18447
    public boolean isSet(int fieldID) {
18448
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18449
    }
18450
 
18451
    @Override
18452
    public boolean equals(Object that) {
18453
      if (that == null)
18454
        return false;
18455
      if (that instanceof markOrdersAsDelivered_result)
18456
        return this.equals((markOrdersAsDelivered_result)that);
18457
      return false;
18458
    }
18459
 
18460
    public boolean equals(markOrdersAsDelivered_result that) {
18461
      if (that == null)
18462
        return false;
18463
 
18464
      boolean this_present_ex = true && this.isSetEx();
18465
      boolean that_present_ex = true && that.isSetEx();
18466
      if (this_present_ex || that_present_ex) {
18467
        if (!(this_present_ex && that_present_ex))
18468
          return false;
18469
        if (!this.ex.equals(that.ex))
18470
          return false;
18471
      }
18472
 
18473
      return true;
18474
    }
18475
 
18476
    @Override
18477
    public int hashCode() {
18478
      return 0;
18479
    }
18480
 
18481
    public int compareTo(markOrdersAsDelivered_result other) {
18482
      if (!getClass().equals(other.getClass())) {
18483
        return getClass().getName().compareTo(other.getClass().getName());
18484
      }
18485
 
18486
      int lastComparison = 0;
18487
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
18488
 
18489
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18490
      if (lastComparison != 0) {
18491
        return lastComparison;
18492
      }
18493
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18494
      if (lastComparison != 0) {
18495
        return lastComparison;
18496
      }
18497
      return 0;
18498
    }
18499
 
18500
    public void read(TProtocol iprot) throws TException {
18501
      TField field;
18502
      iprot.readStructBegin();
18503
      while (true)
18504
      {
18505
        field = iprot.readFieldBegin();
18506
        if (field.type == TType.STOP) { 
18507
          break;
18508
        }
18509
        _Fields fieldId = _Fields.findByThriftId(field.id);
18510
        if (fieldId == null) {
18511
          TProtocolUtil.skip(iprot, field.type);
18512
        } else {
18513
          switch (fieldId) {
18514
            case EX:
18515
              if (field.type == TType.STRUCT) {
18516
                this.ex = new TransactionServiceException();
18517
                this.ex.read(iprot);
18518
              } else { 
18519
                TProtocolUtil.skip(iprot, field.type);
18520
              }
18521
              break;
18522
          }
18523
          iprot.readFieldEnd();
18524
        }
18525
      }
18526
      iprot.readStructEnd();
18527
      validate();
18528
    }
18529
 
18530
    public void write(TProtocol oprot) throws TException {
18531
      oprot.writeStructBegin(STRUCT_DESC);
18532
 
18533
      if (this.isSetEx()) {
18534
        oprot.writeFieldBegin(EX_FIELD_DESC);
18535
        this.ex.write(oprot);
18536
        oprot.writeFieldEnd();
18537
      }
18538
      oprot.writeFieldStop();
18539
      oprot.writeStructEnd();
18540
    }
18541
 
18542
    @Override
18543
    public String toString() {
18544
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
18545
      boolean first = true;
18546
 
18547
      sb.append("ex:");
18548
      if (this.ex == null) {
18549
        sb.append("null");
18550
      } else {
18551
        sb.append(this.ex);
18552
      }
18553
      first = false;
18554
      sb.append(")");
18555
      return sb.toString();
18556
    }
18557
 
18558
    public void validate() throws TException {
18559
      // check for required fields
18560
    }
18561
 
18562
  }
18563
 
18564
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
18565
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
18566
 
18567
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
18568
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
18569
 
18570
    private long providerId;
18571
    private Map<String,String> returnedOrders;
18572
 
18573
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18574
    public enum _Fields implements TFieldIdEnum {
18575
      PROVIDER_ID((short)1, "providerId"),
18576
      RETURNED_ORDERS((short)2, "returnedOrders");
18577
 
18578
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18579
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18580
 
18581
      static {
18582
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18583
          byId.put((int)field._thriftId, field);
18584
          byName.put(field.getFieldName(), field);
18585
        }
18586
      }
18587
 
18588
      /**
18589
       * Find the _Fields constant that matches fieldId, or null if its not found.
18590
       */
18591
      public static _Fields findByThriftId(int fieldId) {
18592
        return byId.get(fieldId);
18593
      }
18594
 
18595
      /**
18596
       * Find the _Fields constant that matches fieldId, throwing an exception
18597
       * if it is not found.
18598
       */
18599
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18600
        _Fields fields = findByThriftId(fieldId);
18601
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18602
        return fields;
18603
      }
18604
 
18605
      /**
18606
       * Find the _Fields constant that matches name, or null if its not found.
18607
       */
18608
      public static _Fields findByName(String name) {
18609
        return byName.get(name);
18610
      }
18611
 
18612
      private final short _thriftId;
18613
      private final String _fieldName;
18614
 
18615
      _Fields(short thriftId, String fieldName) {
18616
        _thriftId = thriftId;
18617
        _fieldName = fieldName;
18618
      }
18619
 
18620
      public short getThriftFieldId() {
18621
        return _thriftId;
18622
      }
18623
 
18624
      public String getFieldName() {
18625
        return _fieldName;
18626
      }
18627
    }
18628
 
18629
    // isset id assignments
18630
    private static final int __PROVIDERID_ISSET_ID = 0;
18631
    private BitSet __isset_bit_vector = new BitSet(1);
18632
 
18633
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18634
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
18635
          new FieldValueMetaData(TType.I64)));
18636
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
18637
          new MapMetaData(TType.MAP, 
18638
              new FieldValueMetaData(TType.STRING), 
18639
              new FieldValueMetaData(TType.STRING))));
18640
    }});
18641
 
18642
    static {
18643
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
18644
    }
18645
 
18646
    public markOrdersAsFailed_args() {
18647
    }
18648
 
18649
    public markOrdersAsFailed_args(
18650
      long providerId,
18651
      Map<String,String> returnedOrders)
18652
    {
18653
      this();
18654
      this.providerId = providerId;
18655
      setProviderIdIsSet(true);
18656
      this.returnedOrders = returnedOrders;
18657
    }
18658
 
18659
    /**
18660
     * Performs a deep copy on <i>other</i>.
18661
     */
18662
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
18663
      __isset_bit_vector.clear();
18664
      __isset_bit_vector.or(other.__isset_bit_vector);
18665
      this.providerId = other.providerId;
18666
      if (other.isSetReturnedOrders()) {
18667
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
18668
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
18669
 
18670
          String other_element_key = other_element.getKey();
18671
          String other_element_value = other_element.getValue();
18672
 
18673
          String __this__returnedOrders_copy_key = other_element_key;
18674
 
18675
          String __this__returnedOrders_copy_value = other_element_value;
18676
 
18677
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
18678
        }
18679
        this.returnedOrders = __this__returnedOrders;
18680
      }
18681
    }
18682
 
18683
    public markOrdersAsFailed_args deepCopy() {
18684
      return new markOrdersAsFailed_args(this);
18685
    }
18686
 
18687
    @Deprecated
18688
    public markOrdersAsFailed_args clone() {
18689
      return new markOrdersAsFailed_args(this);
18690
    }
18691
 
18692
    public long getProviderId() {
18693
      return this.providerId;
18694
    }
18695
 
18696
    public markOrdersAsFailed_args setProviderId(long providerId) {
18697
      this.providerId = providerId;
18698
      setProviderIdIsSet(true);
18699
      return this;
18700
    }
18701
 
18702
    public void unsetProviderId() {
18703
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
18704
    }
18705
 
18706
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
18707
    public boolean isSetProviderId() {
18708
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
18709
    }
18710
 
18711
    public void setProviderIdIsSet(boolean value) {
18712
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
18713
    }
18714
 
18715
    public int getReturnedOrdersSize() {
18716
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
18717
    }
18718
 
18719
    public void putToReturnedOrders(String key, String val) {
18720
      if (this.returnedOrders == null) {
18721
        this.returnedOrders = new HashMap<String,String>();
18722
      }
18723
      this.returnedOrders.put(key, val);
18724
    }
18725
 
18726
    public Map<String,String> getReturnedOrders() {
18727
      return this.returnedOrders;
18728
    }
18729
 
18730
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
18731
      this.returnedOrders = returnedOrders;
18732
      return this;
18733
    }
18734
 
18735
    public void unsetReturnedOrders() {
18736
      this.returnedOrders = null;
18737
    }
18738
 
18739
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
18740
    public boolean isSetReturnedOrders() {
18741
      return this.returnedOrders != null;
18742
    }
18743
 
18744
    public void setReturnedOrdersIsSet(boolean value) {
18745
      if (!value) {
18746
        this.returnedOrders = null;
18747
      }
18748
    }
18749
 
18750
    public void setFieldValue(_Fields field, Object value) {
18751
      switch (field) {
18752
      case PROVIDER_ID:
18753
        if (value == null) {
18754
          unsetProviderId();
18755
        } else {
18756
          setProviderId((Long)value);
18757
        }
18758
        break;
18759
 
18760
      case RETURNED_ORDERS:
18761
        if (value == null) {
18762
          unsetReturnedOrders();
18763
        } else {
18764
          setReturnedOrders((Map<String,String>)value);
18765
        }
18766
        break;
18767
 
18768
      }
18769
    }
18770
 
18771
    public void setFieldValue(int fieldID, Object value) {
18772
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18773
    }
18774
 
18775
    public Object getFieldValue(_Fields field) {
18776
      switch (field) {
18777
      case PROVIDER_ID:
18778
        return new Long(getProviderId());
18779
 
18780
      case RETURNED_ORDERS:
18781
        return getReturnedOrders();
18782
 
18783
      }
18784
      throw new IllegalStateException();
18785
    }
18786
 
18787
    public Object getFieldValue(int fieldId) {
18788
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18789
    }
18790
 
18791
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18792
    public boolean isSet(_Fields field) {
18793
      switch (field) {
18794
      case PROVIDER_ID:
18795
        return isSetProviderId();
18796
      case RETURNED_ORDERS:
18797
        return isSetReturnedOrders();
18798
      }
18799
      throw new IllegalStateException();
18800
    }
18801
 
18802
    public boolean isSet(int fieldID) {
18803
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18804
    }
18805
 
18806
    @Override
18807
    public boolean equals(Object that) {
18808
      if (that == null)
18809
        return false;
18810
      if (that instanceof markOrdersAsFailed_args)
18811
        return this.equals((markOrdersAsFailed_args)that);
18812
      return false;
18813
    }
18814
 
18815
    public boolean equals(markOrdersAsFailed_args that) {
18816
      if (that == null)
18817
        return false;
18818
 
18819
      boolean this_present_providerId = true;
18820
      boolean that_present_providerId = true;
18821
      if (this_present_providerId || that_present_providerId) {
18822
        if (!(this_present_providerId && that_present_providerId))
18823
          return false;
18824
        if (this.providerId != that.providerId)
18825
          return false;
18826
      }
18827
 
18828
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
18829
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
18830
      if (this_present_returnedOrders || that_present_returnedOrders) {
18831
        if (!(this_present_returnedOrders && that_present_returnedOrders))
18832
          return false;
18833
        if (!this.returnedOrders.equals(that.returnedOrders))
18834
          return false;
18835
      }
18836
 
18837
      return true;
18838
    }
18839
 
18840
    @Override
18841
    public int hashCode() {
18842
      return 0;
18843
    }
18844
 
18845
    public void read(TProtocol iprot) throws TException {
18846
      TField field;
18847
      iprot.readStructBegin();
18848
      while (true)
18849
      {
18850
        field = iprot.readFieldBegin();
18851
        if (field.type == TType.STOP) { 
18852
          break;
18853
        }
18854
        _Fields fieldId = _Fields.findByThriftId(field.id);
18855
        if (fieldId == null) {
18856
          TProtocolUtil.skip(iprot, field.type);
18857
        } else {
18858
          switch (fieldId) {
18859
            case PROVIDER_ID:
18860
              if (field.type == TType.I64) {
18861
                this.providerId = iprot.readI64();
18862
                setProviderIdIsSet(true);
18863
              } else { 
18864
                TProtocolUtil.skip(iprot, field.type);
18865
              }
18866
              break;
18867
            case RETURNED_ORDERS:
18868
              if (field.type == TType.MAP) {
18869
                {
18870
                  TMap _map50 = iprot.readMapBegin();
18871
                  this.returnedOrders = new HashMap<String,String>(2*_map50.size);
18872
                  for (int _i51 = 0; _i51 < _map50.size; ++_i51)
18873
                  {
18874
                    String _key52;
18875
                    String _val53;
18876
                    _key52 = iprot.readString();
18877
                    _val53 = iprot.readString();
18878
                    this.returnedOrders.put(_key52, _val53);
18879
                  }
18880
                  iprot.readMapEnd();
18881
                }
18882
              } else { 
18883
                TProtocolUtil.skip(iprot, field.type);
18884
              }
18885
              break;
18886
          }
18887
          iprot.readFieldEnd();
18888
        }
18889
      }
18890
      iprot.readStructEnd();
18891
      validate();
18892
    }
18893
 
18894
    public void write(TProtocol oprot) throws TException {
18895
      validate();
18896
 
18897
      oprot.writeStructBegin(STRUCT_DESC);
18898
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
18899
      oprot.writeI64(this.providerId);
18900
      oprot.writeFieldEnd();
18901
      if (this.returnedOrders != null) {
18902
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
18903
        {
18904
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
18905
          for (Map.Entry<String, String> _iter54 : this.returnedOrders.entrySet())
18906
          {
18907
            oprot.writeString(_iter54.getKey());
18908
            oprot.writeString(_iter54.getValue());
18909
          }
18910
          oprot.writeMapEnd();
18911
        }
18912
        oprot.writeFieldEnd();
18913
      }
18914
      oprot.writeFieldStop();
18915
      oprot.writeStructEnd();
18916
    }
18917
 
18918
    @Override
18919
    public String toString() {
18920
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
18921
      boolean first = true;
18922
 
18923
      sb.append("providerId:");
18924
      sb.append(this.providerId);
18925
      first = false;
18926
      if (!first) sb.append(", ");
18927
      sb.append("returnedOrders:");
18928
      if (this.returnedOrders == null) {
18929
        sb.append("null");
18930
      } else {
18931
        sb.append(this.returnedOrders);
18932
      }
18933
      first = false;
18934
      sb.append(")");
18935
      return sb.toString();
18936
    }
18937
 
18938
    public void validate() throws TException {
18939
      // check for required fields
18940
    }
18941
 
18942
  }
18943
 
18944
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
18945
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
18946
 
18947
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18948
 
18949
    private TransactionServiceException ex;
18950
 
18951
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18952
    public enum _Fields implements TFieldIdEnum {
18953
      EX((short)1, "ex");
18954
 
18955
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18956
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18957
 
18958
      static {
18959
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18960
          byId.put((int)field._thriftId, field);
18961
          byName.put(field.getFieldName(), field);
18962
        }
18963
      }
18964
 
18965
      /**
18966
       * Find the _Fields constant that matches fieldId, or null if its not found.
18967
       */
18968
      public static _Fields findByThriftId(int fieldId) {
18969
        return byId.get(fieldId);
18970
      }
18971
 
18972
      /**
18973
       * Find the _Fields constant that matches fieldId, throwing an exception
18974
       * if it is not found.
18975
       */
18976
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18977
        _Fields fields = findByThriftId(fieldId);
18978
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18979
        return fields;
18980
      }
18981
 
18982
      /**
18983
       * Find the _Fields constant that matches name, or null if its not found.
18984
       */
18985
      public static _Fields findByName(String name) {
18986
        return byName.get(name);
18987
      }
18988
 
18989
      private final short _thriftId;
18990
      private final String _fieldName;
18991
 
18992
      _Fields(short thriftId, String fieldName) {
18993
        _thriftId = thriftId;
18994
        _fieldName = fieldName;
18995
      }
18996
 
18997
      public short getThriftFieldId() {
18998
        return _thriftId;
18999
      }
19000
 
19001
      public String getFieldName() {
19002
        return _fieldName;
19003
      }
19004
    }
19005
 
19006
    // isset id assignments
19007
 
19008
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19009
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19010
          new FieldValueMetaData(TType.STRUCT)));
19011
    }});
19012
 
19013
    static {
19014
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
19015
    }
19016
 
19017
    public markOrdersAsFailed_result() {
19018
    }
19019
 
19020
    public markOrdersAsFailed_result(
19021
      TransactionServiceException ex)
19022
    {
19023
      this();
19024
      this.ex = ex;
19025
    }
19026
 
19027
    /**
19028
     * Performs a deep copy on <i>other</i>.
19029
     */
19030
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
19031
      if (other.isSetEx()) {
19032
        this.ex = new TransactionServiceException(other.ex);
19033
      }
19034
    }
19035
 
19036
    public markOrdersAsFailed_result deepCopy() {
19037
      return new markOrdersAsFailed_result(this);
19038
    }
19039
 
19040
    @Deprecated
19041
    public markOrdersAsFailed_result clone() {
19042
      return new markOrdersAsFailed_result(this);
19043
    }
19044
 
19045
    public TransactionServiceException getEx() {
19046
      return this.ex;
19047
    }
19048
 
19049
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
19050
      this.ex = ex;
19051
      return this;
19052
    }
19053
 
19054
    public void unsetEx() {
19055
      this.ex = null;
19056
    }
19057
 
19058
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19059
    public boolean isSetEx() {
19060
      return this.ex != null;
19061
    }
19062
 
19063
    public void setExIsSet(boolean value) {
19064
      if (!value) {
19065
        this.ex = null;
19066
      }
19067
    }
19068
 
19069
    public void setFieldValue(_Fields field, Object value) {
19070
      switch (field) {
19071
      case EX:
19072
        if (value == null) {
19073
          unsetEx();
19074
        } else {
19075
          setEx((TransactionServiceException)value);
19076
        }
19077
        break;
19078
 
19079
      }
19080
    }
19081
 
19082
    public void setFieldValue(int fieldID, Object value) {
19083
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19084
    }
19085
 
19086
    public Object getFieldValue(_Fields field) {
19087
      switch (field) {
19088
      case EX:
19089
        return getEx();
19090
 
19091
      }
19092
      throw new IllegalStateException();
19093
    }
19094
 
19095
    public Object getFieldValue(int fieldId) {
19096
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19097
    }
19098
 
19099
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19100
    public boolean isSet(_Fields field) {
19101
      switch (field) {
19102
      case EX:
19103
        return isSetEx();
19104
      }
19105
      throw new IllegalStateException();
19106
    }
19107
 
19108
    public boolean isSet(int fieldID) {
19109
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19110
    }
19111
 
19112
    @Override
19113
    public boolean equals(Object that) {
19114
      if (that == null)
19115
        return false;
19116
      if (that instanceof markOrdersAsFailed_result)
19117
        return this.equals((markOrdersAsFailed_result)that);
19118
      return false;
19119
    }
19120
 
19121
    public boolean equals(markOrdersAsFailed_result that) {
19122
      if (that == null)
19123
        return false;
19124
 
19125
      boolean this_present_ex = true && this.isSetEx();
19126
      boolean that_present_ex = true && that.isSetEx();
19127
      if (this_present_ex || that_present_ex) {
19128
        if (!(this_present_ex && that_present_ex))
19129
          return false;
19130
        if (!this.ex.equals(that.ex))
19131
          return false;
19132
      }
19133
 
19134
      return true;
19135
    }
19136
 
19137
    @Override
19138
    public int hashCode() {
19139
      return 0;
19140
    }
19141
 
19142
    public int compareTo(markOrdersAsFailed_result other) {
19143
      if (!getClass().equals(other.getClass())) {
19144
        return getClass().getName().compareTo(other.getClass().getName());
19145
      }
19146
 
19147
      int lastComparison = 0;
19148
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
19149
 
19150
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19151
      if (lastComparison != 0) {
19152
        return lastComparison;
19153
      }
19154
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19155
      if (lastComparison != 0) {
19156
        return lastComparison;
19157
      }
19158
      return 0;
19159
    }
19160
 
19161
    public void read(TProtocol iprot) throws TException {
19162
      TField field;
19163
      iprot.readStructBegin();
19164
      while (true)
19165
      {
19166
        field = iprot.readFieldBegin();
19167
        if (field.type == TType.STOP) { 
19168
          break;
19169
        }
19170
        _Fields fieldId = _Fields.findByThriftId(field.id);
19171
        if (fieldId == null) {
19172
          TProtocolUtil.skip(iprot, field.type);
19173
        } else {
19174
          switch (fieldId) {
19175
            case EX:
19176
              if (field.type == TType.STRUCT) {
19177
                this.ex = new TransactionServiceException();
19178
                this.ex.read(iprot);
19179
              } else { 
19180
                TProtocolUtil.skip(iprot, field.type);
19181
              }
19182
              break;
19183
          }
19184
          iprot.readFieldEnd();
19185
        }
19186
      }
19187
      iprot.readStructEnd();
19188
      validate();
19189
    }
19190
 
19191
    public void write(TProtocol oprot) throws TException {
19192
      oprot.writeStructBegin(STRUCT_DESC);
19193
 
19194
      if (this.isSetEx()) {
19195
        oprot.writeFieldBegin(EX_FIELD_DESC);
19196
        this.ex.write(oprot);
19197
        oprot.writeFieldEnd();
19198
      }
19199
      oprot.writeFieldStop();
19200
      oprot.writeStructEnd();
19201
    }
19202
 
19203
    @Override
19204
    public String toString() {
19205
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
19206
      boolean first = true;
19207
 
19208
      sb.append("ex:");
19209
      if (this.ex == null) {
19210
        sb.append("null");
19211
      } else {
19212
        sb.append(this.ex);
19213
      }
19214
      first = false;
19215
      sb.append(")");
19216
      return sb.toString();
19217
    }
19218
 
19219
    public void validate() throws TException {
19220
      // check for required fields
19221
    }
19222
 
19223
  }
19224
 
305 ashish 19225
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
19226
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
19227
 
483 rajveer 19228
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 19229
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
19230
 
483 rajveer 19231
    private long orderId;
305 ashish 19232
    private boolean valid;
19233
 
19234
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19235
    public enum _Fields implements TFieldIdEnum {
483 rajveer 19236
      ORDER_ID((short)1, "orderId"),
305 ashish 19237
      VALID((short)2, "valid");
19238
 
19239
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19240
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19241
 
19242
      static {
19243
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19244
          byId.put((int)field._thriftId, field);
19245
          byName.put(field.getFieldName(), field);
19246
        }
19247
      }
19248
 
19249
      /**
19250
       * Find the _Fields constant that matches fieldId, or null if its not found.
19251
       */
19252
      public static _Fields findByThriftId(int fieldId) {
19253
        return byId.get(fieldId);
19254
      }
19255
 
19256
      /**
19257
       * Find the _Fields constant that matches fieldId, throwing an exception
19258
       * if it is not found.
19259
       */
19260
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19261
        _Fields fields = findByThriftId(fieldId);
19262
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19263
        return fields;
19264
      }
19265
 
19266
      /**
19267
       * Find the _Fields constant that matches name, or null if its not found.
19268
       */
19269
      public static _Fields findByName(String name) {
19270
        return byName.get(name);
19271
      }
19272
 
19273
      private final short _thriftId;
19274
      private final String _fieldName;
19275
 
19276
      _Fields(short thriftId, String fieldName) {
19277
        _thriftId = thriftId;
19278
        _fieldName = fieldName;
19279
      }
19280
 
19281
      public short getThriftFieldId() {
19282
        return _thriftId;
19283
      }
19284
 
19285
      public String getFieldName() {
19286
        return _fieldName;
19287
      }
19288
    }
19289
 
19290
    // isset id assignments
483 rajveer 19291
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 19292
    private static final int __VALID_ISSET_ID = 1;
19293
    private BitSet __isset_bit_vector = new BitSet(2);
19294
 
19295
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 19296
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 19297
          new FieldValueMetaData(TType.I64)));
19298
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
19299
          new FieldValueMetaData(TType.BOOL)));
19300
    }});
19301
 
19302
    static {
19303
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
19304
    }
19305
 
19306
    public getAlerts_args() {
19307
    }
19308
 
19309
    public getAlerts_args(
483 rajveer 19310
      long orderId,
305 ashish 19311
      boolean valid)
19312
    {
19313
      this();
483 rajveer 19314
      this.orderId = orderId;
19315
      setOrderIdIsSet(true);
305 ashish 19316
      this.valid = valid;
19317
      setValidIsSet(true);
19318
    }
19319
 
19320
    /**
19321
     * Performs a deep copy on <i>other</i>.
19322
     */
19323
    public getAlerts_args(getAlerts_args other) {
19324
      __isset_bit_vector.clear();
19325
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 19326
      this.orderId = other.orderId;
305 ashish 19327
      this.valid = other.valid;
19328
    }
19329
 
19330
    public getAlerts_args deepCopy() {
19331
      return new getAlerts_args(this);
19332
    }
19333
 
19334
    @Deprecated
19335
    public getAlerts_args clone() {
19336
      return new getAlerts_args(this);
19337
    }
19338
 
483 rajveer 19339
    public long getOrderId() {
19340
      return this.orderId;
305 ashish 19341
    }
19342
 
483 rajveer 19343
    public getAlerts_args setOrderId(long orderId) {
19344
      this.orderId = orderId;
19345
      setOrderIdIsSet(true);
305 ashish 19346
      return this;
19347
    }
19348
 
483 rajveer 19349
    public void unsetOrderId() {
19350
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 19351
    }
19352
 
483 rajveer 19353
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19354
    public boolean isSetOrderId() {
19355
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 19356
    }
19357
 
483 rajveer 19358
    public void setOrderIdIsSet(boolean value) {
19359
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 19360
    }
19361
 
19362
    public boolean isValid() {
19363
      return this.valid;
19364
    }
19365
 
19366
    public getAlerts_args setValid(boolean valid) {
19367
      this.valid = valid;
19368
      setValidIsSet(true);
19369
      return this;
19370
    }
19371
 
19372
    public void unsetValid() {
19373
      __isset_bit_vector.clear(__VALID_ISSET_ID);
19374
    }
19375
 
19376
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
19377
    public boolean isSetValid() {
19378
      return __isset_bit_vector.get(__VALID_ISSET_ID);
19379
    }
19380
 
19381
    public void setValidIsSet(boolean value) {
19382
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
19383
    }
19384
 
19385
    public void setFieldValue(_Fields field, Object value) {
19386
      switch (field) {
483 rajveer 19387
      case ORDER_ID:
305 ashish 19388
        if (value == null) {
483 rajveer 19389
          unsetOrderId();
305 ashish 19390
        } else {
483 rajveer 19391
          setOrderId((Long)value);
305 ashish 19392
        }
19393
        break;
19394
 
19395
      case VALID:
19396
        if (value == null) {
19397
          unsetValid();
19398
        } else {
19399
          setValid((Boolean)value);
19400
        }
19401
        break;
19402
 
19403
      }
19404
    }
19405
 
19406
    public void setFieldValue(int fieldID, Object value) {
19407
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19408
    }
19409
 
19410
    public Object getFieldValue(_Fields field) {
19411
      switch (field) {
483 rajveer 19412
      case ORDER_ID:
19413
        return new Long(getOrderId());
305 ashish 19414
 
19415
      case VALID:
19416
        return new Boolean(isValid());
19417
 
19418
      }
19419
      throw new IllegalStateException();
19420
    }
19421
 
19422
    public Object getFieldValue(int fieldId) {
19423
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19424
    }
19425
 
19426
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19427
    public boolean isSet(_Fields field) {
19428
      switch (field) {
483 rajveer 19429
      case ORDER_ID:
19430
        return isSetOrderId();
305 ashish 19431
      case VALID:
19432
        return isSetValid();
19433
      }
19434
      throw new IllegalStateException();
19435
    }
19436
 
19437
    public boolean isSet(int fieldID) {
19438
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19439
    }
19440
 
19441
    @Override
19442
    public boolean equals(Object that) {
19443
      if (that == null)
19444
        return false;
19445
      if (that instanceof getAlerts_args)
19446
        return this.equals((getAlerts_args)that);
19447
      return false;
19448
    }
19449
 
19450
    public boolean equals(getAlerts_args that) {
19451
      if (that == null)
19452
        return false;
19453
 
483 rajveer 19454
      boolean this_present_orderId = true;
19455
      boolean that_present_orderId = true;
19456
      if (this_present_orderId || that_present_orderId) {
19457
        if (!(this_present_orderId && that_present_orderId))
305 ashish 19458
          return false;
483 rajveer 19459
        if (this.orderId != that.orderId)
305 ashish 19460
          return false;
19461
      }
19462
 
19463
      boolean this_present_valid = true;
19464
      boolean that_present_valid = true;
19465
      if (this_present_valid || that_present_valid) {
19466
        if (!(this_present_valid && that_present_valid))
19467
          return false;
19468
        if (this.valid != that.valid)
19469
          return false;
19470
      }
19471
 
19472
      return true;
19473
    }
19474
 
19475
    @Override
19476
    public int hashCode() {
19477
      return 0;
19478
    }
19479
 
19480
    public int compareTo(getAlerts_args other) {
19481
      if (!getClass().equals(other.getClass())) {
19482
        return getClass().getName().compareTo(other.getClass().getName());
19483
      }
19484
 
19485
      int lastComparison = 0;
19486
      getAlerts_args typedOther = (getAlerts_args)other;
19487
 
483 rajveer 19488
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 19489
      if (lastComparison != 0) {
19490
        return lastComparison;
19491
      }
483 rajveer 19492
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 19493
      if (lastComparison != 0) {
19494
        return lastComparison;
19495
      }
19496
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
19497
      if (lastComparison != 0) {
19498
        return lastComparison;
19499
      }
19500
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
19501
      if (lastComparison != 0) {
19502
        return lastComparison;
19503
      }
19504
      return 0;
19505
    }
19506
 
19507
    public void read(TProtocol iprot) throws TException {
19508
      TField field;
19509
      iprot.readStructBegin();
19510
      while (true)
19511
      {
19512
        field = iprot.readFieldBegin();
19513
        if (field.type == TType.STOP) { 
19514
          break;
19515
        }
19516
        _Fields fieldId = _Fields.findByThriftId(field.id);
19517
        if (fieldId == null) {
19518
          TProtocolUtil.skip(iprot, field.type);
19519
        } else {
19520
          switch (fieldId) {
483 rajveer 19521
            case ORDER_ID:
305 ashish 19522
              if (field.type == TType.I64) {
483 rajveer 19523
                this.orderId = iprot.readI64();
19524
                setOrderIdIsSet(true);
305 ashish 19525
              } else { 
19526
                TProtocolUtil.skip(iprot, field.type);
19527
              }
19528
              break;
19529
            case VALID:
19530
              if (field.type == TType.BOOL) {
19531
                this.valid = iprot.readBool();
19532
                setValidIsSet(true);
19533
              } else { 
19534
                TProtocolUtil.skip(iprot, field.type);
19535
              }
19536
              break;
19537
          }
19538
          iprot.readFieldEnd();
19539
        }
19540
      }
19541
      iprot.readStructEnd();
19542
      validate();
19543
    }
19544
 
19545
    public void write(TProtocol oprot) throws TException {
19546
      validate();
19547
 
19548
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 19549
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19550
      oprot.writeI64(this.orderId);
305 ashish 19551
      oprot.writeFieldEnd();
19552
      oprot.writeFieldBegin(VALID_FIELD_DESC);
19553
      oprot.writeBool(this.valid);
19554
      oprot.writeFieldEnd();
19555
      oprot.writeFieldStop();
19556
      oprot.writeStructEnd();
19557
    }
19558
 
19559
    @Override
19560
    public String toString() {
19561
      StringBuilder sb = new StringBuilder("getAlerts_args(");
19562
      boolean first = true;
19563
 
483 rajveer 19564
      sb.append("orderId:");
19565
      sb.append(this.orderId);
305 ashish 19566
      first = false;
19567
      if (!first) sb.append(", ");
19568
      sb.append("valid:");
19569
      sb.append(this.valid);
19570
      first = false;
19571
      sb.append(")");
19572
      return sb.toString();
19573
    }
19574
 
19575
    public void validate() throws TException {
19576
      // check for required fields
19577
    }
19578
 
19579
  }
19580
 
19581
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
19582
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
19583
 
19584
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19585
 
19586
    private List<Alert> success;
19587
 
19588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19589
    public enum _Fields implements TFieldIdEnum {
19590
      SUCCESS((short)0, "success");
19591
 
19592
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19594
 
19595
      static {
19596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19597
          byId.put((int)field._thriftId, field);
19598
          byName.put(field.getFieldName(), field);
19599
        }
19600
      }
19601
 
19602
      /**
19603
       * Find the _Fields constant that matches fieldId, or null if its not found.
19604
       */
19605
      public static _Fields findByThriftId(int fieldId) {
19606
        return byId.get(fieldId);
19607
      }
19608
 
19609
      /**
19610
       * Find the _Fields constant that matches fieldId, throwing an exception
19611
       * if it is not found.
19612
       */
19613
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19614
        _Fields fields = findByThriftId(fieldId);
19615
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19616
        return fields;
19617
      }
19618
 
19619
      /**
19620
       * Find the _Fields constant that matches name, or null if its not found.
19621
       */
19622
      public static _Fields findByName(String name) {
19623
        return byName.get(name);
19624
      }
19625
 
19626
      private final short _thriftId;
19627
      private final String _fieldName;
19628
 
19629
      _Fields(short thriftId, String fieldName) {
19630
        _thriftId = thriftId;
19631
        _fieldName = fieldName;
19632
      }
19633
 
19634
      public short getThriftFieldId() {
19635
        return _thriftId;
19636
      }
19637
 
19638
      public String getFieldName() {
19639
        return _fieldName;
19640
      }
19641
    }
19642
 
19643
    // isset id assignments
19644
 
19645
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19646
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19647
          new ListMetaData(TType.LIST, 
19648
              new StructMetaData(TType.STRUCT, Alert.class))));
19649
    }});
19650
 
19651
    static {
19652
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
19653
    }
19654
 
19655
    public getAlerts_result() {
19656
    }
19657
 
19658
    public getAlerts_result(
19659
      List<Alert> success)
19660
    {
19661
      this();
19662
      this.success = success;
19663
    }
19664
 
19665
    /**
19666
     * Performs a deep copy on <i>other</i>.
19667
     */
19668
    public getAlerts_result(getAlerts_result other) {
19669
      if (other.isSetSuccess()) {
19670
        List<Alert> __this__success = new ArrayList<Alert>();
19671
        for (Alert other_element : other.success) {
19672
          __this__success.add(new Alert(other_element));
19673
        }
19674
        this.success = __this__success;
19675
      }
19676
    }
19677
 
19678
    public getAlerts_result deepCopy() {
19679
      return new getAlerts_result(this);
19680
    }
19681
 
19682
    @Deprecated
19683
    public getAlerts_result clone() {
19684
      return new getAlerts_result(this);
19685
    }
19686
 
19687
    public int getSuccessSize() {
19688
      return (this.success == null) ? 0 : this.success.size();
19689
    }
19690
 
19691
    public java.util.Iterator<Alert> getSuccessIterator() {
19692
      return (this.success == null) ? null : this.success.iterator();
19693
    }
19694
 
19695
    public void addToSuccess(Alert elem) {
19696
      if (this.success == null) {
19697
        this.success = new ArrayList<Alert>();
19698
      }
19699
      this.success.add(elem);
19700
    }
19701
 
19702
    public List<Alert> getSuccess() {
19703
      return this.success;
19704
    }
19705
 
19706
    public getAlerts_result setSuccess(List<Alert> success) {
19707
      this.success = success;
19708
      return this;
19709
    }
19710
 
19711
    public void unsetSuccess() {
19712
      this.success = null;
19713
    }
19714
 
19715
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19716
    public boolean isSetSuccess() {
19717
      return this.success != null;
19718
    }
19719
 
19720
    public void setSuccessIsSet(boolean value) {
19721
      if (!value) {
19722
        this.success = null;
19723
      }
19724
    }
19725
 
19726
    public void setFieldValue(_Fields field, Object value) {
19727
      switch (field) {
19728
      case SUCCESS:
19729
        if (value == null) {
19730
          unsetSuccess();
19731
        } else {
19732
          setSuccess((List<Alert>)value);
19733
        }
19734
        break;
19735
 
19736
      }
19737
    }
19738
 
19739
    public void setFieldValue(int fieldID, Object value) {
19740
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19741
    }
19742
 
19743
    public Object getFieldValue(_Fields field) {
19744
      switch (field) {
19745
      case SUCCESS:
19746
        return getSuccess();
19747
 
19748
      }
19749
      throw new IllegalStateException();
19750
    }
19751
 
19752
    public Object getFieldValue(int fieldId) {
19753
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19754
    }
19755
 
19756
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19757
    public boolean isSet(_Fields field) {
19758
      switch (field) {
19759
      case SUCCESS:
19760
        return isSetSuccess();
19761
      }
19762
      throw new IllegalStateException();
19763
    }
19764
 
19765
    public boolean isSet(int fieldID) {
19766
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19767
    }
19768
 
19769
    @Override
19770
    public boolean equals(Object that) {
19771
      if (that == null)
19772
        return false;
19773
      if (that instanceof getAlerts_result)
19774
        return this.equals((getAlerts_result)that);
19775
      return false;
19776
    }
19777
 
19778
    public boolean equals(getAlerts_result that) {
19779
      if (that == null)
19780
        return false;
19781
 
19782
      boolean this_present_success = true && this.isSetSuccess();
19783
      boolean that_present_success = true && that.isSetSuccess();
19784
      if (this_present_success || that_present_success) {
19785
        if (!(this_present_success && that_present_success))
19786
          return false;
19787
        if (!this.success.equals(that.success))
19788
          return false;
19789
      }
19790
 
19791
      return true;
19792
    }
19793
 
19794
    @Override
19795
    public int hashCode() {
19796
      return 0;
19797
    }
19798
 
19799
    public int compareTo(getAlerts_result other) {
19800
      if (!getClass().equals(other.getClass())) {
19801
        return getClass().getName().compareTo(other.getClass().getName());
19802
      }
19803
 
19804
      int lastComparison = 0;
19805
      getAlerts_result typedOther = (getAlerts_result)other;
19806
 
19807
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19808
      if (lastComparison != 0) {
19809
        return lastComparison;
19810
      }
19811
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19812
      if (lastComparison != 0) {
19813
        return lastComparison;
19814
      }
19815
      return 0;
19816
    }
19817
 
19818
    public void read(TProtocol iprot) throws TException {
19819
      TField field;
19820
      iprot.readStructBegin();
19821
      while (true)
19822
      {
19823
        field = iprot.readFieldBegin();
19824
        if (field.type == TType.STOP) { 
19825
          break;
19826
        }
19827
        _Fields fieldId = _Fields.findByThriftId(field.id);
19828
        if (fieldId == null) {
19829
          TProtocolUtil.skip(iprot, field.type);
19830
        } else {
19831
          switch (fieldId) {
19832
            case SUCCESS:
19833
              if (field.type == TType.LIST) {
19834
                {
1133 chandransh 19835
                  TList _list55 = iprot.readListBegin();
19836
                  this.success = new ArrayList<Alert>(_list55.size);
19837
                  for (int _i56 = 0; _i56 < _list55.size; ++_i56)
305 ashish 19838
                  {
1133 chandransh 19839
                    Alert _elem57;
19840
                    _elem57 = new Alert();
19841
                    _elem57.read(iprot);
19842
                    this.success.add(_elem57);
305 ashish 19843
                  }
19844
                  iprot.readListEnd();
19845
                }
19846
              } else { 
19847
                TProtocolUtil.skip(iprot, field.type);
19848
              }
19849
              break;
19850
          }
19851
          iprot.readFieldEnd();
19852
        }
19853
      }
19854
      iprot.readStructEnd();
19855
      validate();
19856
    }
19857
 
19858
    public void write(TProtocol oprot) throws TException {
19859
      oprot.writeStructBegin(STRUCT_DESC);
19860
 
19861
      if (this.isSetSuccess()) {
19862
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19863
        {
19864
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1133 chandransh 19865
          for (Alert _iter58 : this.success)
305 ashish 19866
          {
1133 chandransh 19867
            _iter58.write(oprot);
305 ashish 19868
          }
19869
          oprot.writeListEnd();
19870
        }
19871
        oprot.writeFieldEnd();
19872
      }
19873
      oprot.writeFieldStop();
19874
      oprot.writeStructEnd();
19875
    }
19876
 
19877
    @Override
19878
    public String toString() {
19879
      StringBuilder sb = new StringBuilder("getAlerts_result(");
19880
      boolean first = true;
19881
 
19882
      sb.append("success:");
19883
      if (this.success == null) {
19884
        sb.append("null");
19885
      } else {
19886
        sb.append(this.success);
19887
      }
19888
      first = false;
19889
      sb.append(")");
19890
      return sb.toString();
19891
    }
19892
 
19893
    public void validate() throws TException {
19894
      // check for required fields
19895
    }
19896
 
19897
  }
19898
 
19899
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
19900
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
19901
 
483 rajveer 19902
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 19903
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
19904
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
19905
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
19906
 
483 rajveer 19907
    private long orderId;
305 ashish 19908
    private boolean unset;
19909
    private long type;
19910
    private String comment;
19911
 
19912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19913
    public enum _Fields implements TFieldIdEnum {
483 rajveer 19914
      ORDER_ID((short)1, "orderId"),
305 ashish 19915
      UNSET((short)2, "unset"),
19916
      TYPE((short)3, "type"),
19917
      COMMENT((short)4, "comment");
19918
 
19919
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19920
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19921
 
19922
      static {
19923
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19924
          byId.put((int)field._thriftId, field);
19925
          byName.put(field.getFieldName(), field);
19926
        }
19927
      }
19928
 
19929
      /**
19930
       * Find the _Fields constant that matches fieldId, or null if its not found.
19931
       */
19932
      public static _Fields findByThriftId(int fieldId) {
19933
        return byId.get(fieldId);
19934
      }
19935
 
19936
      /**
19937
       * Find the _Fields constant that matches fieldId, throwing an exception
19938
       * if it is not found.
19939
       */
19940
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19941
        _Fields fields = findByThriftId(fieldId);
19942
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19943
        return fields;
19944
      }
19945
 
19946
      /**
19947
       * Find the _Fields constant that matches name, or null if its not found.
19948
       */
19949
      public static _Fields findByName(String name) {
19950
        return byName.get(name);
19951
      }
19952
 
19953
      private final short _thriftId;
19954
      private final String _fieldName;
19955
 
19956
      _Fields(short thriftId, String fieldName) {
19957
        _thriftId = thriftId;
19958
        _fieldName = fieldName;
19959
      }
19960
 
19961
      public short getThriftFieldId() {
19962
        return _thriftId;
19963
      }
19964
 
19965
      public String getFieldName() {
19966
        return _fieldName;
19967
      }
19968
    }
19969
 
19970
    // isset id assignments
483 rajveer 19971
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 19972
    private static final int __UNSET_ISSET_ID = 1;
19973
    private static final int __TYPE_ISSET_ID = 2;
19974
    private BitSet __isset_bit_vector = new BitSet(3);
19975
 
19976
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 19977
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 19978
          new FieldValueMetaData(TType.I64)));
19979
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
19980
          new FieldValueMetaData(TType.BOOL)));
19981
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
19982
          new FieldValueMetaData(TType.I64)));
19983
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
19984
          new FieldValueMetaData(TType.STRING)));
19985
    }});
19986
 
19987
    static {
19988
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
19989
    }
19990
 
19991
    public setAlert_args() {
19992
    }
19993
 
19994
    public setAlert_args(
483 rajveer 19995
      long orderId,
305 ashish 19996
      boolean unset,
19997
      long type,
19998
      String comment)
19999
    {
20000
      this();
483 rajveer 20001
      this.orderId = orderId;
20002
      setOrderIdIsSet(true);
305 ashish 20003
      this.unset = unset;
20004
      setUnsetIsSet(true);
20005
      this.type = type;
20006
      setTypeIsSet(true);
20007
      this.comment = comment;
20008
    }
20009
 
20010
    /**
20011
     * Performs a deep copy on <i>other</i>.
20012
     */
20013
    public setAlert_args(setAlert_args other) {
20014
      __isset_bit_vector.clear();
20015
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 20016
      this.orderId = other.orderId;
305 ashish 20017
      this.unset = other.unset;
20018
      this.type = other.type;
20019
      if (other.isSetComment()) {
20020
        this.comment = other.comment;
20021
      }
20022
    }
20023
 
20024
    public setAlert_args deepCopy() {
20025
      return new setAlert_args(this);
20026
    }
20027
 
20028
    @Deprecated
20029
    public setAlert_args clone() {
20030
      return new setAlert_args(this);
20031
    }
20032
 
483 rajveer 20033
    public long getOrderId() {
20034
      return this.orderId;
305 ashish 20035
    }
20036
 
483 rajveer 20037
    public setAlert_args setOrderId(long orderId) {
20038
      this.orderId = orderId;
20039
      setOrderIdIsSet(true);
305 ashish 20040
      return this;
20041
    }
20042
 
483 rajveer 20043
    public void unsetOrderId() {
20044
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 20045
    }
20046
 
483 rajveer 20047
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20048
    public boolean isSetOrderId() {
20049
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 20050
    }
20051
 
483 rajveer 20052
    public void setOrderIdIsSet(boolean value) {
20053
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 20054
    }
20055
 
20056
    public boolean isUnset() {
20057
      return this.unset;
20058
    }
20059
 
20060
    public setAlert_args setUnset(boolean unset) {
20061
      this.unset = unset;
20062
      setUnsetIsSet(true);
20063
      return this;
20064
    }
20065
 
20066
    public void unsetUnset() {
20067
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
20068
    }
20069
 
20070
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
20071
    public boolean isSetUnset() {
20072
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
20073
    }
20074
 
20075
    public void setUnsetIsSet(boolean value) {
20076
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
20077
    }
20078
 
20079
    public long getType() {
20080
      return this.type;
20081
    }
20082
 
20083
    public setAlert_args setType(long type) {
20084
      this.type = type;
20085
      setTypeIsSet(true);
20086
      return this;
20087
    }
20088
 
20089
    public void unsetType() {
20090
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
20091
    }
20092
 
20093
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
20094
    public boolean isSetType() {
20095
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
20096
    }
20097
 
20098
    public void setTypeIsSet(boolean value) {
20099
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
20100
    }
20101
 
20102
    public String getComment() {
20103
      return this.comment;
20104
    }
20105
 
20106
    public setAlert_args setComment(String comment) {
20107
      this.comment = comment;
20108
      return this;
20109
    }
20110
 
20111
    public void unsetComment() {
20112
      this.comment = null;
20113
    }
20114
 
20115
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
20116
    public boolean isSetComment() {
20117
      return this.comment != null;
20118
    }
20119
 
20120
    public void setCommentIsSet(boolean value) {
20121
      if (!value) {
20122
        this.comment = null;
20123
      }
20124
    }
20125
 
20126
    public void setFieldValue(_Fields field, Object value) {
20127
      switch (field) {
483 rajveer 20128
      case ORDER_ID:
305 ashish 20129
        if (value == null) {
483 rajveer 20130
          unsetOrderId();
305 ashish 20131
        } else {
483 rajveer 20132
          setOrderId((Long)value);
305 ashish 20133
        }
20134
        break;
20135
 
20136
      case UNSET:
20137
        if (value == null) {
20138
          unsetUnset();
20139
        } else {
20140
          setUnset((Boolean)value);
20141
        }
20142
        break;
20143
 
20144
      case TYPE:
20145
        if (value == null) {
20146
          unsetType();
20147
        } else {
20148
          setType((Long)value);
20149
        }
20150
        break;
20151
 
20152
      case COMMENT:
20153
        if (value == null) {
20154
          unsetComment();
20155
        } else {
20156
          setComment((String)value);
20157
        }
20158
        break;
20159
 
20160
      }
20161
    }
20162
 
20163
    public void setFieldValue(int fieldID, Object value) {
20164
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20165
    }
20166
 
20167
    public Object getFieldValue(_Fields field) {
20168
      switch (field) {
483 rajveer 20169
      case ORDER_ID:
20170
        return new Long(getOrderId());
305 ashish 20171
 
20172
      case UNSET:
20173
        return new Boolean(isUnset());
20174
 
20175
      case TYPE:
20176
        return new Long(getType());
20177
 
20178
      case COMMENT:
20179
        return getComment();
20180
 
20181
      }
20182
      throw new IllegalStateException();
20183
    }
20184
 
20185
    public Object getFieldValue(int fieldId) {
20186
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20187
    }
20188
 
20189
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20190
    public boolean isSet(_Fields field) {
20191
      switch (field) {
483 rajveer 20192
      case ORDER_ID:
20193
        return isSetOrderId();
305 ashish 20194
      case UNSET:
20195
        return isSetUnset();
20196
      case TYPE:
20197
        return isSetType();
20198
      case COMMENT:
20199
        return isSetComment();
20200
      }
20201
      throw new IllegalStateException();
20202
    }
20203
 
20204
    public boolean isSet(int fieldID) {
20205
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20206
    }
20207
 
20208
    @Override
20209
    public boolean equals(Object that) {
20210
      if (that == null)
20211
        return false;
20212
      if (that instanceof setAlert_args)
20213
        return this.equals((setAlert_args)that);
20214
      return false;
20215
    }
20216
 
20217
    public boolean equals(setAlert_args that) {
20218
      if (that == null)
20219
        return false;
20220
 
483 rajveer 20221
      boolean this_present_orderId = true;
20222
      boolean that_present_orderId = true;
20223
      if (this_present_orderId || that_present_orderId) {
20224
        if (!(this_present_orderId && that_present_orderId))
305 ashish 20225
          return false;
483 rajveer 20226
        if (this.orderId != that.orderId)
305 ashish 20227
          return false;
20228
      }
20229
 
20230
      boolean this_present_unset = true;
20231
      boolean that_present_unset = true;
20232
      if (this_present_unset || that_present_unset) {
20233
        if (!(this_present_unset && that_present_unset))
20234
          return false;
20235
        if (this.unset != that.unset)
20236
          return false;
20237
      }
20238
 
20239
      boolean this_present_type = true;
20240
      boolean that_present_type = true;
20241
      if (this_present_type || that_present_type) {
20242
        if (!(this_present_type && that_present_type))
20243
          return false;
20244
        if (this.type != that.type)
20245
          return false;
20246
      }
20247
 
20248
      boolean this_present_comment = true && this.isSetComment();
20249
      boolean that_present_comment = true && that.isSetComment();
20250
      if (this_present_comment || that_present_comment) {
20251
        if (!(this_present_comment && that_present_comment))
20252
          return false;
20253
        if (!this.comment.equals(that.comment))
20254
          return false;
20255
      }
20256
 
20257
      return true;
20258
    }
20259
 
20260
    @Override
20261
    public int hashCode() {
20262
      return 0;
20263
    }
20264
 
20265
    public int compareTo(setAlert_args other) {
20266
      if (!getClass().equals(other.getClass())) {
20267
        return getClass().getName().compareTo(other.getClass().getName());
20268
      }
20269
 
20270
      int lastComparison = 0;
20271
      setAlert_args typedOther = (setAlert_args)other;
20272
 
483 rajveer 20273
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 20274
      if (lastComparison != 0) {
20275
        return lastComparison;
20276
      }
483 rajveer 20277
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 20278
      if (lastComparison != 0) {
20279
        return lastComparison;
20280
      }
20281
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
20282
      if (lastComparison != 0) {
20283
        return lastComparison;
20284
      }
20285
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
20286
      if (lastComparison != 0) {
20287
        return lastComparison;
20288
      }
20289
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
20290
      if (lastComparison != 0) {
20291
        return lastComparison;
20292
      }
20293
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
20294
      if (lastComparison != 0) {
20295
        return lastComparison;
20296
      }
20297
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
20298
      if (lastComparison != 0) {
20299
        return lastComparison;
20300
      }
20301
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
20302
      if (lastComparison != 0) {
20303
        return lastComparison;
20304
      }
20305
      return 0;
20306
    }
20307
 
20308
    public void read(TProtocol iprot) throws TException {
20309
      TField field;
20310
      iprot.readStructBegin();
20311
      while (true)
20312
      {
20313
        field = iprot.readFieldBegin();
20314
        if (field.type == TType.STOP) { 
20315
          break;
20316
        }
20317
        _Fields fieldId = _Fields.findByThriftId(field.id);
20318
        if (fieldId == null) {
20319
          TProtocolUtil.skip(iprot, field.type);
20320
        } else {
20321
          switch (fieldId) {
483 rajveer 20322
            case ORDER_ID:
305 ashish 20323
              if (field.type == TType.I64) {
483 rajveer 20324
                this.orderId = iprot.readI64();
20325
                setOrderIdIsSet(true);
305 ashish 20326
              } else { 
20327
                TProtocolUtil.skip(iprot, field.type);
20328
              }
20329
              break;
20330
            case UNSET:
20331
              if (field.type == TType.BOOL) {
20332
                this.unset = iprot.readBool();
20333
                setUnsetIsSet(true);
20334
              } else { 
20335
                TProtocolUtil.skip(iprot, field.type);
20336
              }
20337
              break;
20338
            case TYPE:
20339
              if (field.type == TType.I64) {
20340
                this.type = iprot.readI64();
20341
                setTypeIsSet(true);
20342
              } else { 
20343
                TProtocolUtil.skip(iprot, field.type);
20344
              }
20345
              break;
20346
            case COMMENT:
20347
              if (field.type == TType.STRING) {
20348
                this.comment = iprot.readString();
20349
              } else { 
20350
                TProtocolUtil.skip(iprot, field.type);
20351
              }
20352
              break;
20353
          }
20354
          iprot.readFieldEnd();
20355
        }
20356
      }
20357
      iprot.readStructEnd();
20358
      validate();
20359
    }
20360
 
20361
    public void write(TProtocol oprot) throws TException {
20362
      validate();
20363
 
20364
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 20365
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20366
      oprot.writeI64(this.orderId);
305 ashish 20367
      oprot.writeFieldEnd();
20368
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
20369
      oprot.writeBool(this.unset);
20370
      oprot.writeFieldEnd();
20371
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
20372
      oprot.writeI64(this.type);
20373
      oprot.writeFieldEnd();
20374
      if (this.comment != null) {
20375
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
20376
        oprot.writeString(this.comment);
20377
        oprot.writeFieldEnd();
20378
      }
20379
      oprot.writeFieldStop();
20380
      oprot.writeStructEnd();
20381
    }
20382
 
20383
    @Override
20384
    public String toString() {
20385
      StringBuilder sb = new StringBuilder("setAlert_args(");
20386
      boolean first = true;
20387
 
483 rajveer 20388
      sb.append("orderId:");
20389
      sb.append(this.orderId);
305 ashish 20390
      first = false;
20391
      if (!first) sb.append(", ");
20392
      sb.append("unset:");
20393
      sb.append(this.unset);
20394
      first = false;
20395
      if (!first) sb.append(", ");
20396
      sb.append("type:");
20397
      sb.append(this.type);
20398
      first = false;
20399
      if (!first) sb.append(", ");
20400
      sb.append("comment:");
20401
      if (this.comment == null) {
20402
        sb.append("null");
20403
      } else {
20404
        sb.append(this.comment);
20405
      }
20406
      first = false;
20407
      sb.append(")");
20408
      return sb.toString();
20409
    }
20410
 
20411
    public void validate() throws TException {
20412
      // check for required fields
20413
    }
20414
 
20415
  }
20416
 
20417
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
20418
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
20419
 
20420
 
20421
 
20422
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20423
    public enum _Fields implements TFieldIdEnum {
20424
;
20425
 
20426
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20427
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20428
 
20429
      static {
20430
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20431
          byId.put((int)field._thriftId, field);
20432
          byName.put(field.getFieldName(), field);
20433
        }
20434
      }
20435
 
20436
      /**
20437
       * Find the _Fields constant that matches fieldId, or null if its not found.
20438
       */
20439
      public static _Fields findByThriftId(int fieldId) {
20440
        return byId.get(fieldId);
20441
      }
20442
 
20443
      /**
20444
       * Find the _Fields constant that matches fieldId, throwing an exception
20445
       * if it is not found.
20446
       */
20447
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20448
        _Fields fields = findByThriftId(fieldId);
20449
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20450
        return fields;
20451
      }
20452
 
20453
      /**
20454
       * Find the _Fields constant that matches name, or null if its not found.
20455
       */
20456
      public static _Fields findByName(String name) {
20457
        return byName.get(name);
20458
      }
20459
 
20460
      private final short _thriftId;
20461
      private final String _fieldName;
20462
 
20463
      _Fields(short thriftId, String fieldName) {
20464
        _thriftId = thriftId;
20465
        _fieldName = fieldName;
20466
      }
20467
 
20468
      public short getThriftFieldId() {
20469
        return _thriftId;
20470
      }
20471
 
20472
      public String getFieldName() {
20473
        return _fieldName;
20474
      }
20475
    }
20476
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20477
    }});
20478
 
20479
    static {
20480
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
20481
    }
20482
 
20483
    public setAlert_result() {
20484
    }
20485
 
20486
    /**
20487
     * Performs a deep copy on <i>other</i>.
20488
     */
20489
    public setAlert_result(setAlert_result other) {
20490
    }
20491
 
20492
    public setAlert_result deepCopy() {
20493
      return new setAlert_result(this);
20494
    }
20495
 
20496
    @Deprecated
20497
    public setAlert_result clone() {
20498
      return new setAlert_result(this);
20499
    }
20500
 
20501
    public void setFieldValue(_Fields field, Object value) {
20502
      switch (field) {
20503
      }
20504
    }
20505
 
20506
    public void setFieldValue(int fieldID, Object value) {
20507
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20508
    }
20509
 
20510
    public Object getFieldValue(_Fields field) {
20511
      switch (field) {
20512
      }
20513
      throw new IllegalStateException();
20514
    }
20515
 
20516
    public Object getFieldValue(int fieldId) {
20517
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20518
    }
20519
 
20520
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20521
    public boolean isSet(_Fields field) {
20522
      switch (field) {
20523
      }
20524
      throw new IllegalStateException();
20525
    }
20526
 
20527
    public boolean isSet(int fieldID) {
20528
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20529
    }
20530
 
20531
    @Override
20532
    public boolean equals(Object that) {
20533
      if (that == null)
20534
        return false;
20535
      if (that instanceof setAlert_result)
20536
        return this.equals((setAlert_result)that);
20537
      return false;
20538
    }
20539
 
20540
    public boolean equals(setAlert_result that) {
20541
      if (that == null)
20542
        return false;
20543
 
20544
      return true;
20545
    }
20546
 
20547
    @Override
20548
    public int hashCode() {
20549
      return 0;
20550
    }
20551
 
20552
    public int compareTo(setAlert_result other) {
20553
      if (!getClass().equals(other.getClass())) {
20554
        return getClass().getName().compareTo(other.getClass().getName());
20555
      }
20556
 
20557
      int lastComparison = 0;
20558
      setAlert_result typedOther = (setAlert_result)other;
20559
 
20560
      return 0;
20561
    }
20562
 
20563
    public void read(TProtocol iprot) throws TException {
20564
      TField field;
20565
      iprot.readStructBegin();
20566
      while (true)
20567
      {
20568
        field = iprot.readFieldBegin();
20569
        if (field.type == TType.STOP) { 
20570
          break;
20571
        }
20572
        _Fields fieldId = _Fields.findByThriftId(field.id);
20573
        if (fieldId == null) {
20574
          TProtocolUtil.skip(iprot, field.type);
20575
        } else {
20576
          switch (fieldId) {
20577
          }
20578
          iprot.readFieldEnd();
20579
        }
20580
      }
20581
      iprot.readStructEnd();
20582
      validate();
20583
    }
20584
 
20585
    public void write(TProtocol oprot) throws TException {
20586
      oprot.writeStructBegin(STRUCT_DESC);
20587
 
20588
      oprot.writeFieldStop();
20589
      oprot.writeStructEnd();
20590
    }
20591
 
20592
    @Override
20593
    public String toString() {
20594
      StringBuilder sb = new StringBuilder("setAlert_result(");
20595
      boolean first = true;
20596
 
20597
      sb.append(")");
20598
      return sb.toString();
20599
    }
20600
 
20601
    public void validate() throws TException {
20602
      // check for required fields
20603
    }
20604
 
20605
  }
20606
 
68 ashish 20607
}