Subversion Repositories SmartDukaan

Rev

Rev 1209 | Rev 1245 | 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
    /**
1221 chandransh 93
     * Create a batch of all the pending orders for the given warehouse.
94
     * The returned list is orderd by created_timestamp.
95
     * If there are no pending orders, an empty list is returned.
96
     * *
97
     * 
98
     * @param warehouseId
99
     */
100
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
101
 
102
    /**
1209 chandransh 103
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
1221 chandransh 104
     * *
1209 chandransh 105
     * 
106
     * @param orderId
107
     */
108
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
109
 
110
    /**
758 chandransh 111
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
112
     * 
113
     * @param warehouseId
114
     * @param providerId
115
     */
116
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
117
 
1114 chandransh 118
    /**
119
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
120
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
121
     * Raises an exception if we encounter report for an AWB number that we did not ship.
122
     * 
123
     * @param providerId
124
     * @param pickupDetails
125
     */
126
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException;
127
 
1133 chandransh 128
    /**
129
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
130
     * the name of the receiver.
131
     * Raises an exception if we encounter report for an AWB number that we did not ship.
132
     * 
133
     * @param providerId
134
     * @param deliveredOrders
135
     */
136
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
137
 
138
    /**
139
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
140
     * Raises an exception if we encounter report for an AWB number that we did not ship.
141
     * 
142
     * @param providerId
143
     * @param returnedOrders
144
     */
145
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
146
 
483 rajveer 147
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 148
 
483 rajveer 149
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 150
 
151
  }
152
 
153
  public static class Client implements Iface {
154
    public Client(TProtocol prot)
155
    {
156
      this(prot, prot);
157
    }
158
 
159
    public Client(TProtocol iprot, TProtocol oprot)
160
    {
161
      iprot_ = iprot;
162
      oprot_ = oprot;
163
    }
164
 
165
    protected TProtocol iprot_;
166
    protected TProtocol oprot_;
167
 
168
    protected int seqid_;
169
 
170
    public TProtocol getInputProtocol()
171
    {
172
      return this.iprot_;
173
    }
174
 
175
    public TProtocol getOutputProtocol()
176
    {
177
      return this.oprot_;
178
    }
179
 
764 rajveer 180
    public void closeSession() throws TException
181
    {
182
      send_closeSession();
183
      recv_closeSession();
184
    }
185
 
186
    public void send_closeSession() throws TException
187
    {
188
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
189
      closeSession_args args = new closeSession_args();
190
      args.write(oprot_);
191
      oprot_.writeMessageEnd();
192
      oprot_.getTransport().flush();
193
    }
194
 
195
    public void recv_closeSession() throws TException
196
    {
197
      TMessage msg = iprot_.readMessageBegin();
198
      if (msg.type == TMessageType.EXCEPTION) {
199
        TApplicationException x = TApplicationException.read(iprot_);
200
        iprot_.readMessageEnd();
201
        throw x;
202
      }
203
      closeSession_result result = new closeSession_result();
204
      result.read(iprot_);
205
      iprot_.readMessageEnd();
206
      return;
207
    }
208
 
132 ashish 209
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 210
    {
211
      send_createTransaction(transaction);
132 ashish 212
      return recv_createTransaction();
68 ashish 213
    }
214
 
215
    public void send_createTransaction(Transaction transaction) throws TException
216
    {
217
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
218
      createTransaction_args args = new createTransaction_args();
219
      args.transaction = transaction;
220
      args.write(oprot_);
221
      oprot_.writeMessageEnd();
222
      oprot_.getTransport().flush();
223
    }
224
 
132 ashish 225
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 226
    {
227
      TMessage msg = iprot_.readMessageBegin();
228
      if (msg.type == TMessageType.EXCEPTION) {
229
        TApplicationException x = TApplicationException.read(iprot_);
230
        iprot_.readMessageEnd();
231
        throw x;
232
      }
233
      createTransaction_result result = new createTransaction_result();
234
      result.read(iprot_);
235
      iprot_.readMessageEnd();
132 ashish 236
      if (result.isSetSuccess()) {
237
        return result.success;
238
      }
68 ashish 239
      if (result.ex != null) {
240
        throw result.ex;
241
      }
132 ashish 242
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 243
    }
244
 
245
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
246
    {
247
      send_getTransaction(id);
248
      return recv_getTransaction();
249
    }
250
 
251
    public void send_getTransaction(long id) throws TException
252
    {
253
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
254
      getTransaction_args args = new getTransaction_args();
255
      args.id = id;
256
      args.write(oprot_);
257
      oprot_.writeMessageEnd();
258
      oprot_.getTransport().flush();
259
    }
260
 
261
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
262
    {
263
      TMessage msg = iprot_.readMessageBegin();
264
      if (msg.type == TMessageType.EXCEPTION) {
265
        TApplicationException x = TApplicationException.read(iprot_);
266
        iprot_.readMessageEnd();
267
        throw x;
268
      }
269
      getTransaction_result result = new getTransaction_result();
270
      result.read(iprot_);
271
      iprot_.readMessageEnd();
272
      if (result.isSetSuccess()) {
273
        return result.success;
274
      }
275
      if (result.ex != null) {
276
        throw result.ex;
277
      }
278
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
279
    }
280
 
132 ashish 281
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 282
    {
132 ashish 283
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 284
      return recv_getTransactionsForCustomer();
285
    }
286
 
132 ashish 287
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 288
    {
289
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
290
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
291
      args.customerId = customerId;
132 ashish 292
      args.from_date = from_date;
293
      args.to_date = to_date;
68 ashish 294
      args.status = status;
295
      args.write(oprot_);
296
      oprot_.writeMessageEnd();
297
      oprot_.getTransport().flush();
298
    }
299
 
300
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
301
    {
302
      TMessage msg = iprot_.readMessageBegin();
303
      if (msg.type == TMessageType.EXCEPTION) {
304
        TApplicationException x = TApplicationException.read(iprot_);
305
        iprot_.readMessageEnd();
306
        throw x;
307
      }
308
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
309
      result.read(iprot_);
310
      iprot_.readMessageEnd();
311
      if (result.isSetSuccess()) {
312
        return result.success;
313
      }
314
      if (result.ex != null) {
315
        throw result.ex;
316
      }
317
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
318
    }
319
 
132 ashish 320
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
321
    {
322
      send_getTransactionsForShoppingCartId(shoppingCartId);
323
      return recv_getTransactionsForShoppingCartId();
324
    }
325
 
326
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
327
    {
328
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
329
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
330
      args.shoppingCartId = shoppingCartId;
331
      args.write(oprot_);
332
      oprot_.writeMessageEnd();
333
      oprot_.getTransport().flush();
334
    }
335
 
336
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
337
    {
338
      TMessage msg = iprot_.readMessageBegin();
339
      if (msg.type == TMessageType.EXCEPTION) {
340
        TApplicationException x = TApplicationException.read(iprot_);
341
        iprot_.readMessageEnd();
342
        throw x;
343
      }
344
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
345
      result.read(iprot_);
346
      iprot_.readMessageEnd();
347
      if (result.isSetSuccess()) {
348
        return result.success;
349
      }
350
      if (result.ex != null) {
351
        throw result.ex;
352
      }
353
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
354
    }
355
 
68 ashish 356
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
357
    {
358
      send_getTransactionStatus(transactionId);
359
      return recv_getTransactionStatus();
360
    }
361
 
362
    public void send_getTransactionStatus(long transactionId) throws TException
363
    {
364
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
365
      getTransactionStatus_args args = new getTransactionStatus_args();
366
      args.transactionId = transactionId;
367
      args.write(oprot_);
368
      oprot_.writeMessageEnd();
369
      oprot_.getTransport().flush();
370
    }
371
 
372
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
373
    {
374
      TMessage msg = iprot_.readMessageBegin();
375
      if (msg.type == TMessageType.EXCEPTION) {
376
        TApplicationException x = TApplicationException.read(iprot_);
377
        iprot_.readMessageEnd();
378
        throw x;
379
      }
380
      getTransactionStatus_result result = new getTransactionStatus_result();
381
      result.read(iprot_);
382
      iprot_.readMessageEnd();
383
      if (result.isSetSuccess()) {
384
        return result.success;
385
      }
386
      if (result.ex != null) {
387
        throw result.ex;
388
      }
389
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
390
    }
391
 
392
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
393
    {
394
      send_changeTransactionStatus(transactionId, status, description);
395
      return recv_changeTransactionStatus();
396
    }
397
 
398
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
399
    {
400
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
401
      changeTransactionStatus_args args = new changeTransactionStatus_args();
402
      args.transactionId = transactionId;
403
      args.status = status;
404
      args.description = description;
405
      args.write(oprot_);
406
      oprot_.writeMessageEnd();
407
      oprot_.getTransport().flush();
408
    }
409
 
410
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
411
    {
412
      TMessage msg = iprot_.readMessageBegin();
413
      if (msg.type == TMessageType.EXCEPTION) {
414
        TApplicationException x = TApplicationException.read(iprot_);
415
        iprot_.readMessageEnd();
416
        throw x;
417
      }
418
      changeTransactionStatus_result result = new changeTransactionStatus_result();
419
      result.read(iprot_);
420
      iprot_.readMessageEnd();
421
      if (result.isSetSuccess()) {
422
        return result.success;
423
      }
424
      if (result.ex != null) {
425
        throw result.ex;
426
      }
427
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
428
    }
429
 
483 rajveer 430
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 431
    {
483 rajveer 432
      send_getAllOrders(status, from_date, to_date, warehouse_id);
433
      return recv_getAllOrders();
68 ashish 434
    }
435
 
483 rajveer 436
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 437
    {
483 rajveer 438
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
439
      getAllOrders_args args = new getAllOrders_args();
440
      args.status = status;
441
      args.from_date = from_date;
442
      args.to_date = to_date;
443
      args.warehouse_id = warehouse_id;
68 ashish 444
      args.write(oprot_);
445
      oprot_.writeMessageEnd();
446
      oprot_.getTransport().flush();
447
    }
448
 
483 rajveer 449
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 450
    {
451
      TMessage msg = iprot_.readMessageBegin();
452
      if (msg.type == TMessageType.EXCEPTION) {
453
        TApplicationException x = TApplicationException.read(iprot_);
454
        iprot_.readMessageEnd();
455
        throw x;
456
      }
483 rajveer 457
      getAllOrders_result result = new getAllOrders_result();
68 ashish 458
      result.read(iprot_);
459
      iprot_.readMessageEnd();
460
      if (result.isSetSuccess()) {
461
        return result.success;
462
      }
463
      if (result.ex != null) {
464
        throw result.ex;
465
      }
483 rajveer 466
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 467
    }
468
 
1022 varun.gupt 469
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
470
    {
471
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
472
      return recv_getOrdersByBillingDate();
473
    }
474
 
475
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
476
    {
477
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
478
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
479
      args.status = status;
480
      args.start_billing_date = start_billing_date;
481
      args.end_billing_date = end_billing_date;
482
      args.warehouse_id = warehouse_id;
483
      args.write(oprot_);
484
      oprot_.writeMessageEnd();
485
      oprot_.getTransport().flush();
486
    }
487
 
488
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
489
    {
490
      TMessage msg = iprot_.readMessageBegin();
491
      if (msg.type == TMessageType.EXCEPTION) {
492
        TApplicationException x = TApplicationException.read(iprot_);
493
        iprot_.readMessageEnd();
494
        throw x;
495
      }
496
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
497
      result.read(iprot_);
498
      iprot_.readMessageEnd();
499
      if (result.isSetSuccess()) {
500
        return result.success;
501
      }
502
      if (result.ex != null) {
503
        throw result.ex;
504
      }
505
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
506
    }
507
 
483 rajveer 508
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 509
    {
483 rajveer 510
      send_changeOrderStatus(orderId, status, description);
511
      return recv_changeOrderStatus();
68 ashish 512
    }
513
 
483 rajveer 514
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 515
    {
483 rajveer 516
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
517
      changeOrderStatus_args args = new changeOrderStatus_args();
518
      args.orderId = orderId;
519
      args.status = status;
520
      args.description = description;
68 ashish 521
      args.write(oprot_);
522
      oprot_.writeMessageEnd();
523
      oprot_.getTransport().flush();
524
    }
525
 
483 rajveer 526
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 527
    {
528
      TMessage msg = iprot_.readMessageBegin();
529
      if (msg.type == TMessageType.EXCEPTION) {
530
        TApplicationException x = TApplicationException.read(iprot_);
531
        iprot_.readMessageEnd();
532
        throw x;
533
      }
483 rajveer 534
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 535
      result.read(iprot_);
536
      iprot_.readMessageEnd();
537
      if (result.isSetSuccess()) {
538
        return result.success;
539
      }
540
      if (result.ex != null) {
541
        throw result.ex;
542
      }
483 rajveer 543
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 544
    }
545
 
1148 chandransh 546
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 547
    {
1148 chandransh 548
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 549
      return recv_addBillingDetails();
550
    }
551
 
1148 chandransh 552
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 553
    {
554
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
555
      addBillingDetails_args args = new addBillingDetails_args();
556
      args.orderId = orderId;
557
      args.invoice_number = invoice_number;
558
      args.billed_by = billed_by;
559
      args.write(oprot_);
560
      oprot_.writeMessageEnd();
561
      oprot_.getTransport().flush();
562
    }
563
 
564
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
565
    {
566
      TMessage msg = iprot_.readMessageBegin();
567
      if (msg.type == TMessageType.EXCEPTION) {
568
        TApplicationException x = TApplicationException.read(iprot_);
569
        iprot_.readMessageEnd();
570
        throw x;
571
      }
572
      addBillingDetails_result result = new addBillingDetails_result();
573
      result.read(iprot_);
574
      iprot_.readMessageEnd();
575
      if (result.isSetSuccess()) {
576
        return result.success;
577
      }
578
      if (result.ex != null) {
579
        throw result.ex;
580
      }
581
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
582
    }
583
 
1148 chandransh 584
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
585
    {
586
      send_addJacketNumber(orderId, jacketNumber);
587
      return recv_addJacketNumber();
588
    }
589
 
590
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
591
    {
592
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
593
      addJacketNumber_args args = new addJacketNumber_args();
594
      args.orderId = orderId;
595
      args.jacketNumber = jacketNumber;
596
      args.write(oprot_);
597
      oprot_.writeMessageEnd();
598
      oprot_.getTransport().flush();
599
    }
600
 
601
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
602
    {
603
      TMessage msg = iprot_.readMessageBegin();
604
      if (msg.type == TMessageType.EXCEPTION) {
605
        TApplicationException x = TApplicationException.read(iprot_);
606
        iprot_.readMessageEnd();
607
        throw x;
608
      }
609
      addJacketNumber_result result = new addJacketNumber_result();
610
      result.read(iprot_);
611
      iprot_.readMessageEnd();
612
      if (result.isSetSuccess()) {
613
        return result.success;
614
      }
615
      if (result.ex != null) {
616
        throw result.ex;
617
      }
618
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
619
    }
620
 
923 rajveer 621
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
622
    {
623
      send_acceptOrder(orderId);
624
      return recv_acceptOrder();
625
    }
626
 
627
    public void send_acceptOrder(long orderId) throws TException
628
    {
629
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
630
      acceptOrder_args args = new acceptOrder_args();
631
      args.orderId = orderId;
632
      args.write(oprot_);
633
      oprot_.writeMessageEnd();
634
      oprot_.getTransport().flush();
635
    }
636
 
637
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
638
    {
639
      TMessage msg = iprot_.readMessageBegin();
640
      if (msg.type == TMessageType.EXCEPTION) {
641
        TApplicationException x = TApplicationException.read(iprot_);
642
        iprot_.readMessageEnd();
643
        throw x;
644
      }
645
      acceptOrder_result result = new acceptOrder_result();
646
      result.read(iprot_);
647
      iprot_.readMessageEnd();
648
      if (result.isSetSuccess()) {
649
        return result.success;
650
      }
651
      if (result.ex != null) {
652
        throw result.ex;
653
      }
654
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
655
    }
656
 
657
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
658
    {
659
      send_billOrder(orderId);
660
      return recv_billOrder();
661
    }
662
 
663
    public void send_billOrder(long orderId) throws TException
664
    {
665
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
666
      billOrder_args args = new billOrder_args();
667
      args.orderId = orderId;
668
      args.write(oprot_);
669
      oprot_.writeMessageEnd();
670
      oprot_.getTransport().flush();
671
    }
672
 
673
    public boolean recv_billOrder() throws TransactionServiceException, TException
674
    {
675
      TMessage msg = iprot_.readMessageBegin();
676
      if (msg.type == TMessageType.EXCEPTION) {
677
        TApplicationException x = TApplicationException.read(iprot_);
678
        iprot_.readMessageEnd();
679
        throw x;
680
      }
681
      billOrder_result result = new billOrder_result();
682
      result.read(iprot_);
683
      iprot_.readMessageEnd();
684
      if (result.isSetSuccess()) {
685
        return result.success;
686
      }
687
      if (result.ex != null) {
688
        throw result.ex;
689
      }
690
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
691
    }
692
 
483 rajveer 693
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 694
    {
483 rajveer 695
      send_getOrdersForTransaction(transactionId);
696
      return recv_getOrdersForTransaction();
68 ashish 697
    }
698
 
483 rajveer 699
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 700
    {
483 rajveer 701
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
702
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 703
      args.transactionId = transactionId;
704
      args.write(oprot_);
705
      oprot_.writeMessageEnd();
706
      oprot_.getTransport().flush();
707
    }
708
 
483 rajveer 709
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 710
    {
711
      TMessage msg = iprot_.readMessageBegin();
712
      if (msg.type == TMessageType.EXCEPTION) {
713
        TApplicationException x = TApplicationException.read(iprot_);
714
        iprot_.readMessageEnd();
715
        throw x;
716
      }
483 rajveer 717
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 718
      result.read(iprot_);
719
      iprot_.readMessageEnd();
720
      if (result.isSetSuccess()) {
721
        return result.success;
722
      }
723
      if (result.ex != null) {
724
        throw result.ex;
725
      }
483 rajveer 726
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 727
    }
728
 
483 rajveer 729
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 730
    {
483 rajveer 731
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
732
      return recv_getOrdersForCustomer();
68 ashish 733
    }
734
 
483 rajveer 735
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 736
    {
483 rajveer 737
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
738
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
739
      args.customerId = customerId;
740
      args.from_date = from_date;
741
      args.to_date = to_date;
742
      args.status = status;
68 ashish 743
      args.write(oprot_);
744
      oprot_.writeMessageEnd();
745
      oprot_.getTransport().flush();
746
    }
747
 
483 rajveer 748
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 749
    {
750
      TMessage msg = iprot_.readMessageBegin();
751
      if (msg.type == TMessageType.EXCEPTION) {
752
        TApplicationException x = TApplicationException.read(iprot_);
753
        iprot_.readMessageEnd();
754
        throw x;
755
      }
483 rajveer 756
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 757
      result.read(iprot_);
758
      iprot_.readMessageEnd();
759
      if (result.isSetSuccess()) {
760
        return result.success;
761
      }
762
      if (result.ex != null) {
763
        throw result.ex;
764
      }
483 rajveer 765
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 766
    }
767
 
483 rajveer 768
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 769
    {
483 rajveer 770
      send_createOrder(order);
771
      return recv_createOrder();
68 ashish 772
    }
773
 
483 rajveer 774
    public void send_createOrder(Order order) throws TException
68 ashish 775
    {
483 rajveer 776
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
777
      createOrder_args args = new createOrder_args();
778
      args.order = order;
68 ashish 779
      args.write(oprot_);
780
      oprot_.writeMessageEnd();
781
      oprot_.getTransport().flush();
782
    }
783
 
483 rajveer 784
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 785
    {
786
      TMessage msg = iprot_.readMessageBegin();
787
      if (msg.type == TMessageType.EXCEPTION) {
788
        TApplicationException x = TApplicationException.read(iprot_);
789
        iprot_.readMessageEnd();
790
        throw x;
791
      }
483 rajveer 792
      createOrder_result result = new createOrder_result();
68 ashish 793
      result.read(iprot_);
794
      iprot_.readMessageEnd();
795
      if (result.isSetSuccess()) {
796
        return result.success;
797
      }
798
      if (result.ex != null) {
799
        throw result.ex;
800
      }
483 rajveer 801
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 802
    }
803
 
483 rajveer 804
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 805
    {
483 rajveer 806
      send_getOrder(id);
807
      return recv_getOrder();
68 ashish 808
    }
809
 
483 rajveer 810
    public void send_getOrder(long id) throws TException
68 ashish 811
    {
483 rajveer 812
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
813
      getOrder_args args = new getOrder_args();
814
      args.id = id;
68 ashish 815
      args.write(oprot_);
816
      oprot_.writeMessageEnd();
817
      oprot_.getTransport().flush();
818
    }
819
 
483 rajveer 820
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 821
    {
822
      TMessage msg = iprot_.readMessageBegin();
823
      if (msg.type == TMessageType.EXCEPTION) {
824
        TApplicationException x = TApplicationException.read(iprot_);
825
        iprot_.readMessageEnd();
826
        throw x;
827
      }
483 rajveer 828
      getOrder_result result = new getOrder_result();
68 ashish 829
      result.read(iprot_);
830
      iprot_.readMessageEnd();
831
      if (result.isSetSuccess()) {
832
        return result.success;
833
      }
834
      if (result.ex != null) {
835
        throw result.ex;
836
      }
483 rajveer 837
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 838
    }
839
 
483 rajveer 840
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 841
    {
483 rajveer 842
      send_getLineItemsForOrder(orderId);
843
      return recv_getLineItemsForOrder();
68 ashish 844
    }
845
 
483 rajveer 846
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 847
    {
483 rajveer 848
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
849
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
850
      args.orderId = orderId;
68 ashish 851
      args.write(oprot_);
852
      oprot_.writeMessageEnd();
853
      oprot_.getTransport().flush();
854
    }
855
 
483 rajveer 856
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 857
    {
858
      TMessage msg = iprot_.readMessageBegin();
859
      if (msg.type == TMessageType.EXCEPTION) {
860
        TApplicationException x = TApplicationException.read(iprot_);
861
        iprot_.readMessageEnd();
862
        throw x;
863
      }
483 rajveer 864
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 865
      result.read(iprot_);
866
      iprot_.readMessageEnd();
867
      if (result.isSetSuccess()) {
868
        return result.success;
869
      }
870
      if (result.ex != null) {
871
        throw result.ex;
872
      }
483 rajveer 873
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 874
    }
875
 
1221 chandransh 876
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
877
    {
878
      send_batchOrders(warehouseId);
879
      return recv_batchOrders();
880
    }
881
 
882
    public void send_batchOrders(long warehouseId) throws TException
883
    {
884
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
885
      batchOrders_args args = new batchOrders_args();
886
      args.warehouseId = warehouseId;
887
      args.write(oprot_);
888
      oprot_.writeMessageEnd();
889
      oprot_.getTransport().flush();
890
    }
891
 
892
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
893
    {
894
      TMessage msg = iprot_.readMessageBegin();
895
      if (msg.type == TMessageType.EXCEPTION) {
896
        TApplicationException x = TApplicationException.read(iprot_);
897
        iprot_.readMessageEnd();
898
        throw x;
899
      }
900
      batchOrders_result result = new batchOrders_result();
901
      result.read(iprot_);
902
      iprot_.readMessageEnd();
903
      if (result.isSetSuccess()) {
904
        return result.success;
905
      }
906
      if (result.ex != null) {
907
        throw result.ex;
908
      }
909
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
910
    }
911
 
1209 chandransh 912
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
913
    {
914
      send_markOrderAsOutOfStock(orderId);
915
      return recv_markOrderAsOutOfStock();
916
    }
917
 
918
    public void send_markOrderAsOutOfStock(long orderId) throws TException
919
    {
920
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
921
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
922
      args.orderId = orderId;
923
      args.write(oprot_);
924
      oprot_.writeMessageEnd();
925
      oprot_.getTransport().flush();
926
    }
927
 
928
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
929
    {
930
      TMessage msg = iprot_.readMessageBegin();
931
      if (msg.type == TMessageType.EXCEPTION) {
932
        TApplicationException x = TApplicationException.read(iprot_);
933
        iprot_.readMessageEnd();
934
        throw x;
935
      }
936
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
937
      result.read(iprot_);
938
      iprot_.readMessageEnd();
939
      if (result.isSetSuccess()) {
940
        return result.success;
941
      }
942
      if (result.ex != null) {
943
        throw result.ex;
944
      }
945
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
946
    }
947
 
758 chandransh 948
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
949
    {
950
      send_markOrdersAsManifested(warehouseId, providerId);
951
      return recv_markOrdersAsManifested();
952
    }
953
 
954
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
955
    {
956
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
957
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
958
      args.warehouseId = warehouseId;
959
      args.providerId = providerId;
960
      args.write(oprot_);
961
      oprot_.writeMessageEnd();
962
      oprot_.getTransport().flush();
963
    }
964
 
965
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
966
    {
967
      TMessage msg = iprot_.readMessageBegin();
968
      if (msg.type == TMessageType.EXCEPTION) {
969
        TApplicationException x = TApplicationException.read(iprot_);
970
        iprot_.readMessageEnd();
971
        throw x;
972
      }
973
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
974
      result.read(iprot_);
975
      iprot_.readMessageEnd();
976
      if (result.isSetSuccess()) {
977
        return result.success;
978
      }
979
      if (result.ex != null) {
980
        throw result.ex;
981
      }
982
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
983
    }
984
 
1114 chandransh 985
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException
986
    {
987
      send_markOrdersAsPickedUp(providerId, pickupDetails);
988
      return recv_markOrdersAsPickedUp();
989
    }
990
 
991
    public void send_markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TException
992
    {
993
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
994
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
995
      args.providerId = providerId;
996
      args.pickupDetails = pickupDetails;
997
      args.write(oprot_);
998
      oprot_.writeMessageEnd();
999
      oprot_.getTransport().flush();
1000
    }
1001
 
1002
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1003
    {
1004
      TMessage msg = iprot_.readMessageBegin();
1005
      if (msg.type == TMessageType.EXCEPTION) {
1006
        TApplicationException x = TApplicationException.read(iprot_);
1007
        iprot_.readMessageEnd();
1008
        throw x;
1009
      }
1010
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1011
      result.read(iprot_);
1012
      iprot_.readMessageEnd();
1013
      if (result.isSetSuccess()) {
1014
        return result.success;
1015
      }
1016
      if (result.ex != null) {
1017
        throw result.ex;
1018
      }
1019
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1020
    }
1021
 
1133 chandransh 1022
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1023
    {
1024
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1025
      recv_markOrdersAsDelivered();
1026
    }
1027
 
1028
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1029
    {
1030
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1031
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1032
      args.providerId = providerId;
1033
      args.deliveredOrders = deliveredOrders;
1034
      args.write(oprot_);
1035
      oprot_.writeMessageEnd();
1036
      oprot_.getTransport().flush();
1037
    }
1038
 
1039
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1040
    {
1041
      TMessage msg = iprot_.readMessageBegin();
1042
      if (msg.type == TMessageType.EXCEPTION) {
1043
        TApplicationException x = TApplicationException.read(iprot_);
1044
        iprot_.readMessageEnd();
1045
        throw x;
1046
      }
1047
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1048
      result.read(iprot_);
1049
      iprot_.readMessageEnd();
1050
      if (result.ex != null) {
1051
        throw result.ex;
1052
      }
1053
      return;
1054
    }
1055
 
1056
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1057
    {
1058
      send_markOrdersAsFailed(providerId, returnedOrders);
1059
      recv_markOrdersAsFailed();
1060
    }
1061
 
1062
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1063
    {
1064
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1065
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1066
      args.providerId = providerId;
1067
      args.returnedOrders = returnedOrders;
1068
      args.write(oprot_);
1069
      oprot_.writeMessageEnd();
1070
      oprot_.getTransport().flush();
1071
    }
1072
 
1073
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1074
    {
1075
      TMessage msg = iprot_.readMessageBegin();
1076
      if (msg.type == TMessageType.EXCEPTION) {
1077
        TApplicationException x = TApplicationException.read(iprot_);
1078
        iprot_.readMessageEnd();
1079
        throw x;
1080
      }
1081
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1082
      result.read(iprot_);
1083
      iprot_.readMessageEnd();
1084
      if (result.ex != null) {
1085
        throw result.ex;
1086
      }
1087
      return;
1088
    }
1089
 
483 rajveer 1090
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1091
    {
483 rajveer 1092
      send_getAlerts(orderId, valid);
305 ashish 1093
      return recv_getAlerts();
1094
    }
1095
 
483 rajveer 1096
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1097
    {
1098
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1099
      getAlerts_args args = new getAlerts_args();
483 rajveer 1100
      args.orderId = orderId;
305 ashish 1101
      args.valid = valid;
1102
      args.write(oprot_);
1103
      oprot_.writeMessageEnd();
1104
      oprot_.getTransport().flush();
1105
    }
1106
 
1107
    public List<Alert> recv_getAlerts() throws TException
1108
    {
1109
      TMessage msg = iprot_.readMessageBegin();
1110
      if (msg.type == TMessageType.EXCEPTION) {
1111
        TApplicationException x = TApplicationException.read(iprot_);
1112
        iprot_.readMessageEnd();
1113
        throw x;
1114
      }
1115
      getAlerts_result result = new getAlerts_result();
1116
      result.read(iprot_);
1117
      iprot_.readMessageEnd();
1118
      if (result.isSetSuccess()) {
1119
        return result.success;
1120
      }
1121
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1122
    }
1123
 
483 rajveer 1124
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1125
    {
483 rajveer 1126
      send_setAlert(orderId, unset, type, comment);
305 ashish 1127
      recv_setAlert();
1128
    }
1129
 
483 rajveer 1130
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1131
    {
1132
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1133
      setAlert_args args = new setAlert_args();
483 rajveer 1134
      args.orderId = orderId;
305 ashish 1135
      args.unset = unset;
1136
      args.type = type;
1137
      args.comment = comment;
1138
      args.write(oprot_);
1139
      oprot_.writeMessageEnd();
1140
      oprot_.getTransport().flush();
1141
    }
1142
 
1143
    public void recv_setAlert() throws TException
1144
    {
1145
      TMessage msg = iprot_.readMessageBegin();
1146
      if (msg.type == TMessageType.EXCEPTION) {
1147
        TApplicationException x = TApplicationException.read(iprot_);
1148
        iprot_.readMessageEnd();
1149
        throw x;
1150
      }
1151
      setAlert_result result = new setAlert_result();
1152
      result.read(iprot_);
1153
      iprot_.readMessageEnd();
1154
      return;
1155
    }
1156
 
68 ashish 1157
  }
1158
  public static class Processor implements TProcessor {
1159
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1160
    public Processor(Iface iface)
1161
    {
1162
      iface_ = iface;
764 rajveer 1163
      processMap_.put("closeSession", new closeSession());
68 ashish 1164
      processMap_.put("createTransaction", new createTransaction());
1165
      processMap_.put("getTransaction", new getTransaction());
1166
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1167
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1168
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1169
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 1170
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1171
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
483 rajveer 1172
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1173
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1174
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1175
      processMap_.put("acceptOrder", new acceptOrder());
1176
      processMap_.put("billOrder", new billOrder());
483 rajveer 1177
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1178
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1179
      processMap_.put("createOrder", new createOrder());
1180
      processMap_.put("getOrder", new getOrder());
1181
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1221 chandransh 1182
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1183
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1184
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1185
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1186
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1187
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
305 ashish 1188
      processMap_.put("getAlerts", new getAlerts());
1189
      processMap_.put("setAlert", new setAlert());
68 ashish 1190
    }
1191
 
1192
    protected static interface ProcessFunction {
1193
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1194
    }
1195
 
1196
    private Iface iface_;
1197
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1198
 
1199
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1200
    {
1201
      TMessage msg = iprot.readMessageBegin();
1202
      ProcessFunction fn = processMap_.get(msg.name);
1203
      if (fn == null) {
1204
        TProtocolUtil.skip(iprot, TType.STRUCT);
1205
        iprot.readMessageEnd();
1206
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1207
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1208
        x.write(oprot);
1209
        oprot.writeMessageEnd();
1210
        oprot.getTransport().flush();
1211
        return true;
1212
      }
1213
      fn.process(msg.seqid, iprot, oprot);
1214
      return true;
1215
    }
1216
 
764 rajveer 1217
    private class closeSession implements ProcessFunction {
1218
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1219
      {
1220
        closeSession_args args = new closeSession_args();
1221
        args.read(iprot);
1222
        iprot.readMessageEnd();
1223
        closeSession_result result = new closeSession_result();
1224
        iface_.closeSession();
1225
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1226
        result.write(oprot);
1227
        oprot.writeMessageEnd();
1228
        oprot.getTransport().flush();
1229
      }
1230
 
1231
    }
1232
 
68 ashish 1233
    private class createTransaction implements ProcessFunction {
1234
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1235
      {
1236
        createTransaction_args args = new createTransaction_args();
1237
        args.read(iprot);
1238
        iprot.readMessageEnd();
1239
        createTransaction_result result = new createTransaction_result();
1240
        try {
132 ashish 1241
          result.success = iface_.createTransaction(args.transaction);
1242
          result.setSuccessIsSet(true);
68 ashish 1243
        } catch (TransactionServiceException ex) {
1244
          result.ex = ex;
1245
        } catch (Throwable th) {
1246
          LOGGER.error("Internal error processing createTransaction", th);
1247
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1248
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1249
          x.write(oprot);
1250
          oprot.writeMessageEnd();
1251
          oprot.getTransport().flush();
1252
          return;
1253
        }
1254
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1255
        result.write(oprot);
1256
        oprot.writeMessageEnd();
1257
        oprot.getTransport().flush();
1258
      }
1259
 
1260
    }
1261
 
1262
    private class getTransaction implements ProcessFunction {
1263
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1264
      {
1265
        getTransaction_args args = new getTransaction_args();
1266
        args.read(iprot);
1267
        iprot.readMessageEnd();
1268
        getTransaction_result result = new getTransaction_result();
1269
        try {
1270
          result.success = iface_.getTransaction(args.id);
1271
        } catch (TransactionServiceException ex) {
1272
          result.ex = ex;
1273
        } catch (Throwable th) {
1274
          LOGGER.error("Internal error processing getTransaction", th);
1275
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1276
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1277
          x.write(oprot);
1278
          oprot.writeMessageEnd();
1279
          oprot.getTransport().flush();
1280
          return;
1281
        }
1282
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1283
        result.write(oprot);
1284
        oprot.writeMessageEnd();
1285
        oprot.getTransport().flush();
1286
      }
1287
 
1288
    }
1289
 
1290
    private class getTransactionsForCustomer implements ProcessFunction {
1291
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1292
      {
1293
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1294
        args.read(iprot);
1295
        iprot.readMessageEnd();
1296
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1297
        try {
132 ashish 1298
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1299
        } catch (TransactionServiceException ex) {
1300
          result.ex = ex;
1301
        } catch (Throwable th) {
1302
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1303
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1304
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1305
          x.write(oprot);
1306
          oprot.writeMessageEnd();
1307
          oprot.getTransport().flush();
1308
          return;
1309
        }
1310
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1311
        result.write(oprot);
1312
        oprot.writeMessageEnd();
1313
        oprot.getTransport().flush();
1314
      }
1315
 
1316
    }
1317
 
132 ashish 1318
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1319
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1320
      {
1321
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1322
        args.read(iprot);
1323
        iprot.readMessageEnd();
1324
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1325
        try {
1326
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1327
        } catch (TransactionServiceException ex) {
1328
          result.ex = ex;
1329
        } catch (Throwable th) {
1330
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1331
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1332
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1333
          x.write(oprot);
1334
          oprot.writeMessageEnd();
1335
          oprot.getTransport().flush();
1336
          return;
1337
        }
1338
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1339
        result.write(oprot);
1340
        oprot.writeMessageEnd();
1341
        oprot.getTransport().flush();
1342
      }
1343
 
1344
    }
1345
 
68 ashish 1346
    private class getTransactionStatus implements ProcessFunction {
1347
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1348
      {
1349
        getTransactionStatus_args args = new getTransactionStatus_args();
1350
        args.read(iprot);
1351
        iprot.readMessageEnd();
1352
        getTransactionStatus_result result = new getTransactionStatus_result();
1353
        try {
1354
          result.success = iface_.getTransactionStatus(args.transactionId);
1355
        } catch (TransactionServiceException ex) {
1356
          result.ex = ex;
1357
        } catch (Throwable th) {
1358
          LOGGER.error("Internal error processing getTransactionStatus", th);
1359
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1360
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1361
          x.write(oprot);
1362
          oprot.writeMessageEnd();
1363
          oprot.getTransport().flush();
1364
          return;
1365
        }
1366
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1367
        result.write(oprot);
1368
        oprot.writeMessageEnd();
1369
        oprot.getTransport().flush();
1370
      }
1371
 
1372
    }
1373
 
1374
    private class changeTransactionStatus implements ProcessFunction {
1375
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1376
      {
1377
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1378
        args.read(iprot);
1379
        iprot.readMessageEnd();
1380
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1381
        try {
1382
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1383
          result.setSuccessIsSet(true);
1384
        } catch (TransactionServiceException ex) {
1385
          result.ex = ex;
1386
        } catch (Throwable th) {
1387
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1388
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1389
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1390
          x.write(oprot);
1391
          oprot.writeMessageEnd();
1392
          oprot.getTransport().flush();
1393
          return;
1394
        }
1395
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1396
        result.write(oprot);
1397
        oprot.writeMessageEnd();
1398
        oprot.getTransport().flush();
1399
      }
1400
 
1401
    }
1402
 
483 rajveer 1403
    private class getAllOrders implements ProcessFunction {
68 ashish 1404
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1405
      {
483 rajveer 1406
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1407
        args.read(iprot);
1408
        iprot.readMessageEnd();
483 rajveer 1409
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1410
        try {
483 rajveer 1411
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1412
        } catch (TransactionServiceException ex) {
1413
          result.ex = ex;
1414
        } catch (Throwable th) {
483 rajveer 1415
          LOGGER.error("Internal error processing getAllOrders", th);
1416
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1417
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1418
          x.write(oprot);
1419
          oprot.writeMessageEnd();
1420
          oprot.getTransport().flush();
1421
          return;
1422
        }
483 rajveer 1423
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1424
        result.write(oprot);
1425
        oprot.writeMessageEnd();
1426
        oprot.getTransport().flush();
1427
      }
1428
 
1429
    }
1430
 
1022 varun.gupt 1431
    private class getOrdersByBillingDate implements ProcessFunction {
1432
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1433
      {
1434
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1435
        args.read(iprot);
1436
        iprot.readMessageEnd();
1437
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1438
        try {
1439
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1440
        } catch (TransactionServiceException ex) {
1441
          result.ex = ex;
1442
        } catch (Throwable th) {
1443
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1444
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1445
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1446
          x.write(oprot);
1447
          oprot.writeMessageEnd();
1448
          oprot.getTransport().flush();
1449
          return;
1450
        }
1451
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1452
        result.write(oprot);
1453
        oprot.writeMessageEnd();
1454
        oprot.getTransport().flush();
1455
      }
1456
 
1457
    }
1458
 
483 rajveer 1459
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1460
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1461
      {
483 rajveer 1462
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1463
        args.read(iprot);
1464
        iprot.readMessageEnd();
483 rajveer 1465
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1466
        try {
483 rajveer 1467
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1468
          result.setSuccessIsSet(true);
1469
        } catch (TransactionServiceException ex) {
1470
          result.ex = ex;
1471
        } catch (Throwable th) {
483 rajveer 1472
          LOGGER.error("Internal error processing changeOrderStatus", th);
1473
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1474
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1475
          x.write(oprot);
1476
          oprot.writeMessageEnd();
1477
          oprot.getTransport().flush();
1478
          return;
1479
        }
483 rajveer 1480
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1481
        result.write(oprot);
1482
        oprot.writeMessageEnd();
1483
        oprot.getTransport().flush();
1484
      }
1485
 
1486
    }
1487
 
495 rajveer 1488
    private class addBillingDetails implements ProcessFunction {
1489
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1490
      {
1491
        addBillingDetails_args args = new addBillingDetails_args();
1492
        args.read(iprot);
1493
        iprot.readMessageEnd();
1494
        addBillingDetails_result result = new addBillingDetails_result();
1495
        try {
1148 chandransh 1496
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1497
          result.setSuccessIsSet(true);
1498
        } catch (TransactionServiceException ex) {
1499
          result.ex = ex;
1500
        } catch (Throwable th) {
1501
          LOGGER.error("Internal error processing addBillingDetails", th);
1502
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1503
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1504
          x.write(oprot);
1505
          oprot.writeMessageEnd();
1506
          oprot.getTransport().flush();
1507
          return;
1508
        }
1509
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1510
        result.write(oprot);
1511
        oprot.writeMessageEnd();
1512
        oprot.getTransport().flush();
1513
      }
1514
 
1515
    }
1516
 
1148 chandransh 1517
    private class addJacketNumber implements ProcessFunction {
1518
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1519
      {
1520
        addJacketNumber_args args = new addJacketNumber_args();
1521
        args.read(iprot);
1522
        iprot.readMessageEnd();
1523
        addJacketNumber_result result = new addJacketNumber_result();
1524
        try {
1525
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1526
          result.setSuccessIsSet(true);
1527
        } catch (TransactionServiceException ex) {
1528
          result.ex = ex;
1529
        } catch (Throwable th) {
1530
          LOGGER.error("Internal error processing addJacketNumber", th);
1531
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1532
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1533
          x.write(oprot);
1534
          oprot.writeMessageEnd();
1535
          oprot.getTransport().flush();
1536
          return;
1537
        }
1538
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1539
        result.write(oprot);
1540
        oprot.writeMessageEnd();
1541
        oprot.getTransport().flush();
1542
      }
1543
 
1544
    }
1545
 
923 rajveer 1546
    private class acceptOrder implements ProcessFunction {
1547
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1548
      {
1549
        acceptOrder_args args = new acceptOrder_args();
1550
        args.read(iprot);
1551
        iprot.readMessageEnd();
1552
        acceptOrder_result result = new acceptOrder_result();
1553
        try {
1554
          result.success = iface_.acceptOrder(args.orderId);
1555
          result.setSuccessIsSet(true);
1556
        } catch (TransactionServiceException ex) {
1557
          result.ex = ex;
1558
        } catch (Throwable th) {
1559
          LOGGER.error("Internal error processing acceptOrder", th);
1560
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1561
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1562
          x.write(oprot);
1563
          oprot.writeMessageEnd();
1564
          oprot.getTransport().flush();
1565
          return;
1566
        }
1567
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1568
        result.write(oprot);
1569
        oprot.writeMessageEnd();
1570
        oprot.getTransport().flush();
1571
      }
1572
 
1573
    }
1574
 
1575
    private class billOrder implements ProcessFunction {
1576
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1577
      {
1578
        billOrder_args args = new billOrder_args();
1579
        args.read(iprot);
1580
        iprot.readMessageEnd();
1581
        billOrder_result result = new billOrder_result();
1582
        try {
1583
          result.success = iface_.billOrder(args.orderId);
1584
          result.setSuccessIsSet(true);
1585
        } catch (TransactionServiceException ex) {
1586
          result.ex = ex;
1587
        } catch (Throwable th) {
1588
          LOGGER.error("Internal error processing billOrder", th);
1589
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1590
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1591
          x.write(oprot);
1592
          oprot.writeMessageEnd();
1593
          oprot.getTransport().flush();
1594
          return;
1595
        }
1596
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1597
        result.write(oprot);
1598
        oprot.writeMessageEnd();
1599
        oprot.getTransport().flush();
1600
      }
1601
 
1602
    }
1603
 
483 rajveer 1604
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1605
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1606
      {
483 rajveer 1607
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1608
        args.read(iprot);
1609
        iprot.readMessageEnd();
483 rajveer 1610
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1611
        try {
483 rajveer 1612
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1613
        } catch (TransactionServiceException ex) {
1614
          result.ex = ex;
1615
        } catch (Throwable th) {
483 rajveer 1616
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1617
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1618
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1619
          x.write(oprot);
1620
          oprot.writeMessageEnd();
1621
          oprot.getTransport().flush();
1622
          return;
1623
        }
483 rajveer 1624
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1625
        result.write(oprot);
1626
        oprot.writeMessageEnd();
1627
        oprot.getTransport().flush();
1628
      }
1629
 
1630
    }
1631
 
483 rajveer 1632
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1633
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1634
      {
483 rajveer 1635
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1636
        args.read(iprot);
1637
        iprot.readMessageEnd();
483 rajveer 1638
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1639
        try {
483 rajveer 1640
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1641
        } catch (TransactionServiceException ex) {
1642
          result.ex = ex;
1643
        } catch (Throwable th) {
483 rajveer 1644
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1645
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1646
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1647
          x.write(oprot);
1648
          oprot.writeMessageEnd();
1649
          oprot.getTransport().flush();
1650
          return;
1651
        }
483 rajveer 1652
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1653
        result.write(oprot);
1654
        oprot.writeMessageEnd();
1655
        oprot.getTransport().flush();
1656
      }
1657
 
1658
    }
1659
 
483 rajveer 1660
    private class createOrder implements ProcessFunction {
68 ashish 1661
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1662
      {
483 rajveer 1663
        createOrder_args args = new createOrder_args();
68 ashish 1664
        args.read(iprot);
1665
        iprot.readMessageEnd();
483 rajveer 1666
        createOrder_result result = new createOrder_result();
68 ashish 1667
        try {
483 rajveer 1668
          result.success = iface_.createOrder(args.order);
68 ashish 1669
          result.setSuccessIsSet(true);
1670
        } catch (TransactionServiceException ex) {
1671
          result.ex = ex;
1672
        } catch (Throwable th) {
483 rajveer 1673
          LOGGER.error("Internal error processing createOrder", th);
1674
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1675
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1676
          x.write(oprot);
1677
          oprot.writeMessageEnd();
1678
          oprot.getTransport().flush();
1679
          return;
1680
        }
483 rajveer 1681
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1682
        result.write(oprot);
1683
        oprot.writeMessageEnd();
1684
        oprot.getTransport().flush();
1685
      }
1686
 
1687
    }
1688
 
483 rajveer 1689
    private class getOrder implements ProcessFunction {
68 ashish 1690
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1691
      {
483 rajveer 1692
        getOrder_args args = new getOrder_args();
68 ashish 1693
        args.read(iprot);
1694
        iprot.readMessageEnd();
483 rajveer 1695
        getOrder_result result = new getOrder_result();
68 ashish 1696
        try {
483 rajveer 1697
          result.success = iface_.getOrder(args.id);
68 ashish 1698
        } catch (TransactionServiceException ex) {
1699
          result.ex = ex;
1700
        } catch (Throwable th) {
483 rajveer 1701
          LOGGER.error("Internal error processing getOrder", th);
1702
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1703
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1704
          x.write(oprot);
1705
          oprot.writeMessageEnd();
1706
          oprot.getTransport().flush();
1707
          return;
1708
        }
483 rajveer 1709
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1710
        result.write(oprot);
1711
        oprot.writeMessageEnd();
1712
        oprot.getTransport().flush();
1713
      }
1714
 
1715
    }
1716
 
483 rajveer 1717
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1718
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1719
      {
483 rajveer 1720
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1721
        args.read(iprot);
1722
        iprot.readMessageEnd();
483 rajveer 1723
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1724
        try {
483 rajveer 1725
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1726
        } catch (TransactionServiceException ex) {
1727
          result.ex = ex;
1728
        } catch (Throwable th) {
483 rajveer 1729
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1730
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1731
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1732
          x.write(oprot);
1733
          oprot.writeMessageEnd();
1734
          oprot.getTransport().flush();
1735
          return;
1736
        }
483 rajveer 1737
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1738
        result.write(oprot);
1739
        oprot.writeMessageEnd();
1740
        oprot.getTransport().flush();
1741
      }
1742
 
1743
    }
1744
 
1221 chandransh 1745
    private class batchOrders implements ProcessFunction {
1746
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1747
      {
1748
        batchOrders_args args = new batchOrders_args();
1749
        args.read(iprot);
1750
        iprot.readMessageEnd();
1751
        batchOrders_result result = new batchOrders_result();
1752
        try {
1753
          result.success = iface_.batchOrders(args.warehouseId);
1754
        } catch (TransactionServiceException ex) {
1755
          result.ex = ex;
1756
        } catch (Throwable th) {
1757
          LOGGER.error("Internal error processing batchOrders", th);
1758
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
1759
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
1760
          x.write(oprot);
1761
          oprot.writeMessageEnd();
1762
          oprot.getTransport().flush();
1763
          return;
1764
        }
1765
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
1766
        result.write(oprot);
1767
        oprot.writeMessageEnd();
1768
        oprot.getTransport().flush();
1769
      }
1770
 
1771
    }
1772
 
1209 chandransh 1773
    private class markOrderAsOutOfStock implements ProcessFunction {
1774
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1775
      {
1776
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1777
        args.read(iprot);
1778
        iprot.readMessageEnd();
1779
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1780
        try {
1781
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
1782
          result.setSuccessIsSet(true);
1783
        } catch (TransactionServiceException ex) {
1784
          result.ex = ex;
1785
        } catch (Throwable th) {
1786
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
1787
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
1788
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
1789
          x.write(oprot);
1790
          oprot.writeMessageEnd();
1791
          oprot.getTransport().flush();
1792
          return;
1793
        }
1794
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
1795
        result.write(oprot);
1796
        oprot.writeMessageEnd();
1797
        oprot.getTransport().flush();
1798
      }
1799
 
1800
    }
1801
 
758 chandransh 1802
    private class markOrdersAsManifested implements ProcessFunction {
1803
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1804
      {
1805
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1806
        args.read(iprot);
1807
        iprot.readMessageEnd();
1808
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1809
        try {
1810
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1811
          result.setSuccessIsSet(true);
1812
        } catch (TransactionServiceException ex) {
1813
          result.ex = ex;
1814
        } catch (Throwable th) {
1815
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1816
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1817
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1818
          x.write(oprot);
1819
          oprot.writeMessageEnd();
1820
          oprot.getTransport().flush();
1821
          return;
1822
        }
1823
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1824
        result.write(oprot);
1825
        oprot.writeMessageEnd();
1826
        oprot.getTransport().flush();
1827
      }
1828
 
1829
    }
1830
 
1114 chandransh 1831
    private class markOrdersAsPickedUp implements ProcessFunction {
1832
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1833
      {
1834
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1835
        args.read(iprot);
1836
        iprot.readMessageEnd();
1837
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1838
        try {
1839
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
1840
        } catch (TransactionServiceException ex) {
1841
          result.ex = ex;
1842
        } catch (Throwable th) {
1843
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
1844
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
1845
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
1846
          x.write(oprot);
1847
          oprot.writeMessageEnd();
1848
          oprot.getTransport().flush();
1849
          return;
1850
        }
1851
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
1852
        result.write(oprot);
1853
        oprot.writeMessageEnd();
1854
        oprot.getTransport().flush();
1855
      }
1856
 
1857
    }
1858
 
1133 chandransh 1859
    private class markOrdersAsDelivered implements ProcessFunction {
1860
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1861
      {
1862
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1863
        args.read(iprot);
1864
        iprot.readMessageEnd();
1865
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1866
        try {
1867
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
1868
        } catch (TransactionServiceException ex) {
1869
          result.ex = ex;
1870
        } catch (Throwable th) {
1871
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
1872
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
1873
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
1874
          x.write(oprot);
1875
          oprot.writeMessageEnd();
1876
          oprot.getTransport().flush();
1877
          return;
1878
        }
1879
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
1880
        result.write(oprot);
1881
        oprot.writeMessageEnd();
1882
        oprot.getTransport().flush();
1883
      }
1884
 
1885
    }
1886
 
1887
    private class markOrdersAsFailed implements ProcessFunction {
1888
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1889
      {
1890
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1891
        args.read(iprot);
1892
        iprot.readMessageEnd();
1893
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1894
        try {
1895
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
1896
        } catch (TransactionServiceException ex) {
1897
          result.ex = ex;
1898
        } catch (Throwable th) {
1899
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
1900
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
1901
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
1902
          x.write(oprot);
1903
          oprot.writeMessageEnd();
1904
          oprot.getTransport().flush();
1905
          return;
1906
        }
1907
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
1908
        result.write(oprot);
1909
        oprot.writeMessageEnd();
1910
        oprot.getTransport().flush();
1911
      }
1912
 
1913
    }
1914
 
305 ashish 1915
    private class getAlerts implements ProcessFunction {
1916
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1917
      {
1918
        getAlerts_args args = new getAlerts_args();
1919
        args.read(iprot);
1920
        iprot.readMessageEnd();
1921
        getAlerts_result result = new getAlerts_result();
483 rajveer 1922
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1923
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1924
        result.write(oprot);
1925
        oprot.writeMessageEnd();
1926
        oprot.getTransport().flush();
1927
      }
1928
 
1929
    }
1930
 
1931
    private class setAlert implements ProcessFunction {
1932
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1933
      {
1934
        setAlert_args args = new setAlert_args();
1935
        args.read(iprot);
1936
        iprot.readMessageEnd();
1937
        setAlert_result result = new setAlert_result();
483 rajveer 1938
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 1939
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1940
        result.write(oprot);
1941
        oprot.writeMessageEnd();
1942
        oprot.getTransport().flush();
1943
      }
1944
 
1945
    }
1946
 
68 ashish 1947
  }
1948
 
764 rajveer 1949
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1950
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1951
 
1952
 
1953
 
1954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1955
    public enum _Fields implements TFieldIdEnum {
1956
;
1957
 
1958
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1959
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1960
 
1961
      static {
1962
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1963
          byId.put((int)field._thriftId, field);
1964
          byName.put(field.getFieldName(), field);
1965
        }
1966
      }
1967
 
1968
      /**
1969
       * Find the _Fields constant that matches fieldId, or null if its not found.
1970
       */
1971
      public static _Fields findByThriftId(int fieldId) {
1972
        return byId.get(fieldId);
1973
      }
1974
 
1975
      /**
1976
       * Find the _Fields constant that matches fieldId, throwing an exception
1977
       * if it is not found.
1978
       */
1979
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1980
        _Fields fields = findByThriftId(fieldId);
1981
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1982
        return fields;
1983
      }
1984
 
1985
      /**
1986
       * Find the _Fields constant that matches name, or null if its not found.
1987
       */
1988
      public static _Fields findByName(String name) {
1989
        return byName.get(name);
1990
      }
1991
 
1992
      private final short _thriftId;
1993
      private final String _fieldName;
1994
 
1995
      _Fields(short thriftId, String fieldName) {
1996
        _thriftId = thriftId;
1997
        _fieldName = fieldName;
1998
      }
1999
 
2000
      public short getThriftFieldId() {
2001
        return _thriftId;
2002
      }
2003
 
2004
      public String getFieldName() {
2005
        return _fieldName;
2006
      }
2007
    }
2008
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2009
    }});
2010
 
2011
    static {
2012
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2013
    }
2014
 
2015
    public closeSession_args() {
2016
    }
2017
 
2018
    /**
2019
     * Performs a deep copy on <i>other</i>.
2020
     */
2021
    public closeSession_args(closeSession_args other) {
2022
    }
2023
 
2024
    public closeSession_args deepCopy() {
2025
      return new closeSession_args(this);
2026
    }
2027
 
2028
    @Deprecated
2029
    public closeSession_args clone() {
2030
      return new closeSession_args(this);
2031
    }
2032
 
2033
    public void setFieldValue(_Fields field, Object value) {
2034
      switch (field) {
2035
      }
2036
    }
2037
 
2038
    public void setFieldValue(int fieldID, Object value) {
2039
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2040
    }
2041
 
2042
    public Object getFieldValue(_Fields field) {
2043
      switch (field) {
2044
      }
2045
      throw new IllegalStateException();
2046
    }
2047
 
2048
    public Object getFieldValue(int fieldId) {
2049
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2050
    }
2051
 
2052
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2053
    public boolean isSet(_Fields field) {
2054
      switch (field) {
2055
      }
2056
      throw new IllegalStateException();
2057
    }
2058
 
2059
    public boolean isSet(int fieldID) {
2060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2061
    }
2062
 
2063
    @Override
2064
    public boolean equals(Object that) {
2065
      if (that == null)
2066
        return false;
2067
      if (that instanceof closeSession_args)
2068
        return this.equals((closeSession_args)that);
2069
      return false;
2070
    }
2071
 
2072
    public boolean equals(closeSession_args that) {
2073
      if (that == null)
2074
        return false;
2075
 
2076
      return true;
2077
    }
2078
 
2079
    @Override
2080
    public int hashCode() {
2081
      return 0;
2082
    }
2083
 
2084
    public int compareTo(closeSession_args other) {
2085
      if (!getClass().equals(other.getClass())) {
2086
        return getClass().getName().compareTo(other.getClass().getName());
2087
      }
2088
 
2089
      int lastComparison = 0;
2090
      closeSession_args typedOther = (closeSession_args)other;
2091
 
2092
      return 0;
2093
    }
2094
 
2095
    public void read(TProtocol iprot) throws TException {
2096
      TField field;
2097
      iprot.readStructBegin();
2098
      while (true)
2099
      {
2100
        field = iprot.readFieldBegin();
2101
        if (field.type == TType.STOP) { 
2102
          break;
2103
        }
2104
        _Fields fieldId = _Fields.findByThriftId(field.id);
2105
        if (fieldId == null) {
2106
          TProtocolUtil.skip(iprot, field.type);
2107
        } else {
2108
          switch (fieldId) {
2109
          }
2110
          iprot.readFieldEnd();
2111
        }
2112
      }
2113
      iprot.readStructEnd();
2114
      validate();
2115
    }
2116
 
2117
    public void write(TProtocol oprot) throws TException {
2118
      validate();
2119
 
2120
      oprot.writeStructBegin(STRUCT_DESC);
2121
      oprot.writeFieldStop();
2122
      oprot.writeStructEnd();
2123
    }
2124
 
2125
    @Override
2126
    public String toString() {
2127
      StringBuilder sb = new StringBuilder("closeSession_args(");
2128
      boolean first = true;
2129
 
2130
      sb.append(")");
2131
      return sb.toString();
2132
    }
2133
 
2134
    public void validate() throws TException {
2135
      // check for required fields
2136
    }
2137
 
2138
  }
2139
 
2140
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2141
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2142
 
2143
 
2144
 
2145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2146
    public enum _Fields implements TFieldIdEnum {
2147
;
2148
 
2149
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2150
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2151
 
2152
      static {
2153
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2154
          byId.put((int)field._thriftId, field);
2155
          byName.put(field.getFieldName(), field);
2156
        }
2157
      }
2158
 
2159
      /**
2160
       * Find the _Fields constant that matches fieldId, or null if its not found.
2161
       */
2162
      public static _Fields findByThriftId(int fieldId) {
2163
        return byId.get(fieldId);
2164
      }
2165
 
2166
      /**
2167
       * Find the _Fields constant that matches fieldId, throwing an exception
2168
       * if it is not found.
2169
       */
2170
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2171
        _Fields fields = findByThriftId(fieldId);
2172
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2173
        return fields;
2174
      }
2175
 
2176
      /**
2177
       * Find the _Fields constant that matches name, or null if its not found.
2178
       */
2179
      public static _Fields findByName(String name) {
2180
        return byName.get(name);
2181
      }
2182
 
2183
      private final short _thriftId;
2184
      private final String _fieldName;
2185
 
2186
      _Fields(short thriftId, String fieldName) {
2187
        _thriftId = thriftId;
2188
        _fieldName = fieldName;
2189
      }
2190
 
2191
      public short getThriftFieldId() {
2192
        return _thriftId;
2193
      }
2194
 
2195
      public String getFieldName() {
2196
        return _fieldName;
2197
      }
2198
    }
2199
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2200
    }});
2201
 
2202
    static {
2203
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2204
    }
2205
 
2206
    public closeSession_result() {
2207
    }
2208
 
2209
    /**
2210
     * Performs a deep copy on <i>other</i>.
2211
     */
2212
    public closeSession_result(closeSession_result other) {
2213
    }
2214
 
2215
    public closeSession_result deepCopy() {
2216
      return new closeSession_result(this);
2217
    }
2218
 
2219
    @Deprecated
2220
    public closeSession_result clone() {
2221
      return new closeSession_result(this);
2222
    }
2223
 
2224
    public void setFieldValue(_Fields field, Object value) {
2225
      switch (field) {
2226
      }
2227
    }
2228
 
2229
    public void setFieldValue(int fieldID, Object value) {
2230
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2231
    }
2232
 
2233
    public Object getFieldValue(_Fields field) {
2234
      switch (field) {
2235
      }
2236
      throw new IllegalStateException();
2237
    }
2238
 
2239
    public Object getFieldValue(int fieldId) {
2240
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2241
    }
2242
 
2243
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2244
    public boolean isSet(_Fields field) {
2245
      switch (field) {
2246
      }
2247
      throw new IllegalStateException();
2248
    }
2249
 
2250
    public boolean isSet(int fieldID) {
2251
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2252
    }
2253
 
2254
    @Override
2255
    public boolean equals(Object that) {
2256
      if (that == null)
2257
        return false;
2258
      if (that instanceof closeSession_result)
2259
        return this.equals((closeSession_result)that);
2260
      return false;
2261
    }
2262
 
2263
    public boolean equals(closeSession_result that) {
2264
      if (that == null)
2265
        return false;
2266
 
2267
      return true;
2268
    }
2269
 
2270
    @Override
2271
    public int hashCode() {
2272
      return 0;
2273
    }
2274
 
2275
    public int compareTo(closeSession_result other) {
2276
      if (!getClass().equals(other.getClass())) {
2277
        return getClass().getName().compareTo(other.getClass().getName());
2278
      }
2279
 
2280
      int lastComparison = 0;
2281
      closeSession_result typedOther = (closeSession_result)other;
2282
 
2283
      return 0;
2284
    }
2285
 
2286
    public void read(TProtocol iprot) throws TException {
2287
      TField field;
2288
      iprot.readStructBegin();
2289
      while (true)
2290
      {
2291
        field = iprot.readFieldBegin();
2292
        if (field.type == TType.STOP) { 
2293
          break;
2294
        }
2295
        _Fields fieldId = _Fields.findByThriftId(field.id);
2296
        if (fieldId == null) {
2297
          TProtocolUtil.skip(iprot, field.type);
2298
        } else {
2299
          switch (fieldId) {
2300
          }
2301
          iprot.readFieldEnd();
2302
        }
2303
      }
2304
      iprot.readStructEnd();
2305
      validate();
2306
    }
2307
 
2308
    public void write(TProtocol oprot) throws TException {
2309
      oprot.writeStructBegin(STRUCT_DESC);
2310
 
2311
      oprot.writeFieldStop();
2312
      oprot.writeStructEnd();
2313
    }
2314
 
2315
    @Override
2316
    public String toString() {
2317
      StringBuilder sb = new StringBuilder("closeSession_result(");
2318
      boolean first = true;
2319
 
2320
      sb.append(")");
2321
      return sb.toString();
2322
    }
2323
 
2324
    public void validate() throws TException {
2325
      // check for required fields
2326
    }
2327
 
2328
  }
2329
 
684 chandransh 2330
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2331
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2332
 
2333
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2334
 
2335
    private Transaction transaction;
2336
 
2337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2338
    public enum _Fields implements TFieldIdEnum {
2339
      TRANSACTION((short)1, "transaction");
2340
 
2341
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2343
 
2344
      static {
2345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2346
          byId.put((int)field._thriftId, field);
2347
          byName.put(field.getFieldName(), field);
2348
        }
2349
      }
2350
 
2351
      /**
2352
       * Find the _Fields constant that matches fieldId, or null if its not found.
2353
       */
2354
      public static _Fields findByThriftId(int fieldId) {
2355
        return byId.get(fieldId);
2356
      }
2357
 
2358
      /**
2359
       * Find the _Fields constant that matches fieldId, throwing an exception
2360
       * if it is not found.
2361
       */
2362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2363
        _Fields fields = findByThriftId(fieldId);
2364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2365
        return fields;
2366
      }
2367
 
2368
      /**
2369
       * Find the _Fields constant that matches name, or null if its not found.
2370
       */
2371
      public static _Fields findByName(String name) {
2372
        return byName.get(name);
2373
      }
2374
 
2375
      private final short _thriftId;
2376
      private final String _fieldName;
2377
 
2378
      _Fields(short thriftId, String fieldName) {
2379
        _thriftId = thriftId;
2380
        _fieldName = fieldName;
2381
      }
2382
 
2383
      public short getThriftFieldId() {
2384
        return _thriftId;
2385
      }
2386
 
2387
      public String getFieldName() {
2388
        return _fieldName;
2389
      }
2390
    }
2391
 
2392
    // isset id assignments
2393
 
2394
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2395
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2396
          new StructMetaData(TType.STRUCT, Transaction.class)));
2397
    }});
2398
 
2399
    static {
2400
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2401
    }
2402
 
2403
    public createTransaction_args() {
2404
    }
2405
 
2406
    public createTransaction_args(
2407
      Transaction transaction)
2408
    {
2409
      this();
2410
      this.transaction = transaction;
2411
    }
2412
 
2413
    /**
2414
     * Performs a deep copy on <i>other</i>.
2415
     */
2416
    public createTransaction_args(createTransaction_args other) {
2417
      if (other.isSetTransaction()) {
2418
        this.transaction = new Transaction(other.transaction);
2419
      }
2420
    }
2421
 
2422
    public createTransaction_args deepCopy() {
2423
      return new createTransaction_args(this);
2424
    }
2425
 
2426
    @Deprecated
2427
    public createTransaction_args clone() {
2428
      return new createTransaction_args(this);
2429
    }
2430
 
2431
    public Transaction getTransaction() {
2432
      return this.transaction;
2433
    }
2434
 
2435
    public createTransaction_args setTransaction(Transaction transaction) {
2436
      this.transaction = transaction;
2437
      return this;
2438
    }
2439
 
2440
    public void unsetTransaction() {
2441
      this.transaction = null;
2442
    }
2443
 
2444
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2445
    public boolean isSetTransaction() {
2446
      return this.transaction != null;
2447
    }
2448
 
2449
    public void setTransactionIsSet(boolean value) {
2450
      if (!value) {
2451
        this.transaction = null;
2452
      }
2453
    }
2454
 
2455
    public void setFieldValue(_Fields field, Object value) {
2456
      switch (field) {
2457
      case TRANSACTION:
2458
        if (value == null) {
2459
          unsetTransaction();
2460
        } else {
2461
          setTransaction((Transaction)value);
2462
        }
2463
        break;
2464
 
2465
      }
2466
    }
2467
 
2468
    public void setFieldValue(int fieldID, Object value) {
2469
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2470
    }
2471
 
2472
    public Object getFieldValue(_Fields field) {
2473
      switch (field) {
2474
      case TRANSACTION:
2475
        return getTransaction();
2476
 
2477
      }
2478
      throw new IllegalStateException();
2479
    }
2480
 
2481
    public Object getFieldValue(int fieldId) {
2482
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2483
    }
2484
 
2485
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2486
    public boolean isSet(_Fields field) {
2487
      switch (field) {
2488
      case TRANSACTION:
2489
        return isSetTransaction();
2490
      }
2491
      throw new IllegalStateException();
2492
    }
2493
 
2494
    public boolean isSet(int fieldID) {
2495
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2496
    }
2497
 
2498
    @Override
2499
    public boolean equals(Object that) {
2500
      if (that == null)
2501
        return false;
2502
      if (that instanceof createTransaction_args)
2503
        return this.equals((createTransaction_args)that);
2504
      return false;
2505
    }
2506
 
2507
    public boolean equals(createTransaction_args that) {
2508
      if (that == null)
2509
        return false;
2510
 
2511
      boolean this_present_transaction = true && this.isSetTransaction();
2512
      boolean that_present_transaction = true && that.isSetTransaction();
2513
      if (this_present_transaction || that_present_transaction) {
2514
        if (!(this_present_transaction && that_present_transaction))
2515
          return false;
2516
        if (!this.transaction.equals(that.transaction))
2517
          return false;
2518
      }
2519
 
2520
      return true;
2521
    }
2522
 
2523
    @Override
2524
    public int hashCode() {
2525
      return 0;
2526
    }
2527
 
684 chandransh 2528
    public int compareTo(createTransaction_args other) {
2529
      if (!getClass().equals(other.getClass())) {
2530
        return getClass().getName().compareTo(other.getClass().getName());
2531
      }
2532
 
2533
      int lastComparison = 0;
2534
      createTransaction_args typedOther = (createTransaction_args)other;
2535
 
2536
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2537
      if (lastComparison != 0) {
2538
        return lastComparison;
2539
      }
2540
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2541
      if (lastComparison != 0) {
2542
        return lastComparison;
2543
      }
2544
      return 0;
2545
    }
2546
 
68 ashish 2547
    public void read(TProtocol iprot) throws TException {
2548
      TField field;
2549
      iprot.readStructBegin();
2550
      while (true)
2551
      {
2552
        field = iprot.readFieldBegin();
2553
        if (field.type == TType.STOP) { 
2554
          break;
2555
        }
2556
        _Fields fieldId = _Fields.findByThriftId(field.id);
2557
        if (fieldId == null) {
2558
          TProtocolUtil.skip(iprot, field.type);
2559
        } else {
2560
          switch (fieldId) {
2561
            case TRANSACTION:
2562
              if (field.type == TType.STRUCT) {
2563
                this.transaction = new Transaction();
2564
                this.transaction.read(iprot);
2565
              } else { 
2566
                TProtocolUtil.skip(iprot, field.type);
2567
              }
2568
              break;
2569
          }
2570
          iprot.readFieldEnd();
2571
        }
2572
      }
2573
      iprot.readStructEnd();
2574
      validate();
2575
    }
2576
 
2577
    public void write(TProtocol oprot) throws TException {
2578
      validate();
2579
 
2580
      oprot.writeStructBegin(STRUCT_DESC);
2581
      if (this.transaction != null) {
2582
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2583
        this.transaction.write(oprot);
2584
        oprot.writeFieldEnd();
2585
      }
2586
      oprot.writeFieldStop();
2587
      oprot.writeStructEnd();
2588
    }
2589
 
2590
    @Override
2591
    public String toString() {
2592
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2593
      boolean first = true;
2594
 
2595
      sb.append("transaction:");
2596
      if (this.transaction == null) {
2597
        sb.append("null");
2598
      } else {
2599
        sb.append(this.transaction);
2600
      }
2601
      first = false;
2602
      sb.append(")");
2603
      return sb.toString();
2604
    }
2605
 
2606
    public void validate() throws TException {
2607
      // check for required fields
2608
    }
2609
 
2610
  }
2611
 
2612
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2613
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2614
 
132 ashish 2615
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2616
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2617
 
132 ashish 2618
    private long success;
68 ashish 2619
    private TransactionServiceException ex;
2620
 
2621
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2622
    public enum _Fields implements TFieldIdEnum {
132 ashish 2623
      SUCCESS((short)0, "success"),
68 ashish 2624
      EX((short)1, "ex");
2625
 
2626
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2628
 
2629
      static {
2630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2631
          byId.put((int)field._thriftId, field);
2632
          byName.put(field.getFieldName(), field);
2633
        }
2634
      }
2635
 
2636
      /**
2637
       * Find the _Fields constant that matches fieldId, or null if its not found.
2638
       */
2639
      public static _Fields findByThriftId(int fieldId) {
2640
        return byId.get(fieldId);
2641
      }
2642
 
2643
      /**
2644
       * Find the _Fields constant that matches fieldId, throwing an exception
2645
       * if it is not found.
2646
       */
2647
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2648
        _Fields fields = findByThriftId(fieldId);
2649
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2650
        return fields;
2651
      }
2652
 
2653
      /**
2654
       * Find the _Fields constant that matches name, or null if its not found.
2655
       */
2656
      public static _Fields findByName(String name) {
2657
        return byName.get(name);
2658
      }
2659
 
2660
      private final short _thriftId;
2661
      private final String _fieldName;
2662
 
2663
      _Fields(short thriftId, String fieldName) {
2664
        _thriftId = thriftId;
2665
        _fieldName = fieldName;
2666
      }
2667
 
2668
      public short getThriftFieldId() {
2669
        return _thriftId;
2670
      }
2671
 
2672
      public String getFieldName() {
2673
        return _fieldName;
2674
      }
2675
    }
2676
 
2677
    // isset id assignments
132 ashish 2678
    private static final int __SUCCESS_ISSET_ID = 0;
2679
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2680
 
2681
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2682
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2683
          new FieldValueMetaData(TType.I64)));
68 ashish 2684
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2685
          new FieldValueMetaData(TType.STRUCT)));
2686
    }});
2687
 
2688
    static {
2689
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2690
    }
2691
 
2692
    public createTransaction_result() {
2693
    }
2694
 
2695
    public createTransaction_result(
132 ashish 2696
      long success,
68 ashish 2697
      TransactionServiceException ex)
2698
    {
2699
      this();
132 ashish 2700
      this.success = success;
2701
      setSuccessIsSet(true);
68 ashish 2702
      this.ex = ex;
2703
    }
2704
 
2705
    /**
2706
     * Performs a deep copy on <i>other</i>.
2707
     */
2708
    public createTransaction_result(createTransaction_result other) {
132 ashish 2709
      __isset_bit_vector.clear();
2710
      __isset_bit_vector.or(other.__isset_bit_vector);
2711
      this.success = other.success;
68 ashish 2712
      if (other.isSetEx()) {
2713
        this.ex = new TransactionServiceException(other.ex);
2714
      }
2715
    }
2716
 
2717
    public createTransaction_result deepCopy() {
2718
      return new createTransaction_result(this);
2719
    }
2720
 
2721
    @Deprecated
2722
    public createTransaction_result clone() {
2723
      return new createTransaction_result(this);
2724
    }
2725
 
132 ashish 2726
    public long getSuccess() {
2727
      return this.success;
2728
    }
2729
 
2730
    public createTransaction_result setSuccess(long success) {
2731
      this.success = success;
2732
      setSuccessIsSet(true);
2733
      return this;
2734
    }
2735
 
2736
    public void unsetSuccess() {
2737
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2738
    }
2739
 
2740
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2741
    public boolean isSetSuccess() {
2742
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2743
    }
2744
 
2745
    public void setSuccessIsSet(boolean value) {
2746
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2747
    }
2748
 
68 ashish 2749
    public TransactionServiceException getEx() {
2750
      return this.ex;
2751
    }
2752
 
2753
    public createTransaction_result setEx(TransactionServiceException ex) {
2754
      this.ex = ex;
2755
      return this;
2756
    }
2757
 
2758
    public void unsetEx() {
2759
      this.ex = null;
2760
    }
2761
 
2762
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2763
    public boolean isSetEx() {
2764
      return this.ex != null;
2765
    }
2766
 
2767
    public void setExIsSet(boolean value) {
2768
      if (!value) {
2769
        this.ex = null;
2770
      }
2771
    }
2772
 
2773
    public void setFieldValue(_Fields field, Object value) {
2774
      switch (field) {
132 ashish 2775
      case SUCCESS:
2776
        if (value == null) {
2777
          unsetSuccess();
2778
        } else {
2779
          setSuccess((Long)value);
2780
        }
2781
        break;
2782
 
68 ashish 2783
      case EX:
2784
        if (value == null) {
2785
          unsetEx();
2786
        } else {
2787
          setEx((TransactionServiceException)value);
2788
        }
2789
        break;
2790
 
2791
      }
2792
    }
2793
 
2794
    public void setFieldValue(int fieldID, Object value) {
2795
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2796
    }
2797
 
2798
    public Object getFieldValue(_Fields field) {
2799
      switch (field) {
132 ashish 2800
      case SUCCESS:
2801
        return new Long(getSuccess());
2802
 
68 ashish 2803
      case EX:
2804
        return getEx();
2805
 
2806
      }
2807
      throw new IllegalStateException();
2808
    }
2809
 
2810
    public Object getFieldValue(int fieldId) {
2811
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2812
    }
2813
 
2814
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2815
    public boolean isSet(_Fields field) {
2816
      switch (field) {
132 ashish 2817
      case SUCCESS:
2818
        return isSetSuccess();
68 ashish 2819
      case EX:
2820
        return isSetEx();
2821
      }
2822
      throw new IllegalStateException();
2823
    }
2824
 
2825
    public boolean isSet(int fieldID) {
2826
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2827
    }
2828
 
2829
    @Override
2830
    public boolean equals(Object that) {
2831
      if (that == null)
2832
        return false;
2833
      if (that instanceof createTransaction_result)
2834
        return this.equals((createTransaction_result)that);
2835
      return false;
2836
    }
2837
 
2838
    public boolean equals(createTransaction_result that) {
2839
      if (that == null)
2840
        return false;
2841
 
132 ashish 2842
      boolean this_present_success = true;
2843
      boolean that_present_success = true;
2844
      if (this_present_success || that_present_success) {
2845
        if (!(this_present_success && that_present_success))
2846
          return false;
2847
        if (this.success != that.success)
2848
          return false;
2849
      }
2850
 
68 ashish 2851
      boolean this_present_ex = true && this.isSetEx();
2852
      boolean that_present_ex = true && that.isSetEx();
2853
      if (this_present_ex || that_present_ex) {
2854
        if (!(this_present_ex && that_present_ex))
2855
          return false;
2856
        if (!this.ex.equals(that.ex))
2857
          return false;
2858
      }
2859
 
2860
      return true;
2861
    }
2862
 
2863
    @Override
2864
    public int hashCode() {
2865
      return 0;
2866
    }
2867
 
2868
    public int compareTo(createTransaction_result other) {
2869
      if (!getClass().equals(other.getClass())) {
2870
        return getClass().getName().compareTo(other.getClass().getName());
2871
      }
2872
 
2873
      int lastComparison = 0;
2874
      createTransaction_result typedOther = (createTransaction_result)other;
2875
 
132 ashish 2876
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2877
      if (lastComparison != 0) {
2878
        return lastComparison;
2879
      }
2880
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2881
      if (lastComparison != 0) {
2882
        return lastComparison;
2883
      }
68 ashish 2884
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2885
      if (lastComparison != 0) {
2886
        return lastComparison;
2887
      }
2888
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2889
      if (lastComparison != 0) {
2890
        return lastComparison;
2891
      }
2892
      return 0;
2893
    }
2894
 
2895
    public void read(TProtocol iprot) throws TException {
2896
      TField field;
2897
      iprot.readStructBegin();
2898
      while (true)
2899
      {
2900
        field = iprot.readFieldBegin();
2901
        if (field.type == TType.STOP) { 
2902
          break;
2903
        }
2904
        _Fields fieldId = _Fields.findByThriftId(field.id);
2905
        if (fieldId == null) {
2906
          TProtocolUtil.skip(iprot, field.type);
2907
        } else {
2908
          switch (fieldId) {
132 ashish 2909
            case SUCCESS:
2910
              if (field.type == TType.I64) {
2911
                this.success = iprot.readI64();
2912
                setSuccessIsSet(true);
2913
              } else { 
2914
                TProtocolUtil.skip(iprot, field.type);
2915
              }
2916
              break;
68 ashish 2917
            case EX:
2918
              if (field.type == TType.STRUCT) {
2919
                this.ex = new TransactionServiceException();
2920
                this.ex.read(iprot);
2921
              } else { 
2922
                TProtocolUtil.skip(iprot, field.type);
2923
              }
2924
              break;
2925
          }
2926
          iprot.readFieldEnd();
2927
        }
2928
      }
2929
      iprot.readStructEnd();
2930
      validate();
2931
    }
2932
 
2933
    public void write(TProtocol oprot) throws TException {
2934
      oprot.writeStructBegin(STRUCT_DESC);
2935
 
132 ashish 2936
      if (this.isSetSuccess()) {
2937
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2938
        oprot.writeI64(this.success);
2939
        oprot.writeFieldEnd();
2940
      } else if (this.isSetEx()) {
68 ashish 2941
        oprot.writeFieldBegin(EX_FIELD_DESC);
2942
        this.ex.write(oprot);
2943
        oprot.writeFieldEnd();
2944
      }
2945
      oprot.writeFieldStop();
2946
      oprot.writeStructEnd();
2947
    }
2948
 
2949
    @Override
2950
    public String toString() {
2951
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2952
      boolean first = true;
2953
 
132 ashish 2954
      sb.append("success:");
2955
      sb.append(this.success);
2956
      first = false;
2957
      if (!first) sb.append(", ");
68 ashish 2958
      sb.append("ex:");
2959
      if (this.ex == null) {
2960
        sb.append("null");
2961
      } else {
2962
        sb.append(this.ex);
2963
      }
2964
      first = false;
2965
      sb.append(")");
2966
      return sb.toString();
2967
    }
2968
 
2969
    public void validate() throws TException {
2970
      // check for required fields
2971
    }
2972
 
2973
  }
2974
 
2975
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2976
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2977
 
2978
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2979
 
2980
    private long id;
2981
 
2982
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2983
    public enum _Fields implements TFieldIdEnum {
2984
      ID((short)1, "id");
2985
 
2986
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2987
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2988
 
2989
      static {
2990
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2991
          byId.put((int)field._thriftId, field);
2992
          byName.put(field.getFieldName(), field);
2993
        }
2994
      }
2995
 
2996
      /**
2997
       * Find the _Fields constant that matches fieldId, or null if its not found.
2998
       */
2999
      public static _Fields findByThriftId(int fieldId) {
3000
        return byId.get(fieldId);
3001
      }
3002
 
3003
      /**
3004
       * Find the _Fields constant that matches fieldId, throwing an exception
3005
       * if it is not found.
3006
       */
3007
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3008
        _Fields fields = findByThriftId(fieldId);
3009
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3010
        return fields;
3011
      }
3012
 
3013
      /**
3014
       * Find the _Fields constant that matches name, or null if its not found.
3015
       */
3016
      public static _Fields findByName(String name) {
3017
        return byName.get(name);
3018
      }
3019
 
3020
      private final short _thriftId;
3021
      private final String _fieldName;
3022
 
3023
      _Fields(short thriftId, String fieldName) {
3024
        _thriftId = thriftId;
3025
        _fieldName = fieldName;
3026
      }
3027
 
3028
      public short getThriftFieldId() {
3029
        return _thriftId;
3030
      }
3031
 
3032
      public String getFieldName() {
3033
        return _fieldName;
3034
      }
3035
    }
3036
 
3037
    // isset id assignments
3038
    private static final int __ID_ISSET_ID = 0;
3039
    private BitSet __isset_bit_vector = new BitSet(1);
3040
 
3041
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3042
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3043
          new FieldValueMetaData(TType.I64)));
3044
    }});
3045
 
3046
    static {
3047
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3048
    }
3049
 
3050
    public getTransaction_args() {
3051
    }
3052
 
3053
    public getTransaction_args(
3054
      long id)
3055
    {
3056
      this();
3057
      this.id = id;
3058
      setIdIsSet(true);
3059
    }
3060
 
3061
    /**
3062
     * Performs a deep copy on <i>other</i>.
3063
     */
3064
    public getTransaction_args(getTransaction_args other) {
3065
      __isset_bit_vector.clear();
3066
      __isset_bit_vector.or(other.__isset_bit_vector);
3067
      this.id = other.id;
3068
    }
3069
 
3070
    public getTransaction_args deepCopy() {
3071
      return new getTransaction_args(this);
3072
    }
3073
 
3074
    @Deprecated
3075
    public getTransaction_args clone() {
3076
      return new getTransaction_args(this);
3077
    }
3078
 
3079
    public long getId() {
3080
      return this.id;
3081
    }
3082
 
3083
    public getTransaction_args setId(long id) {
3084
      this.id = id;
3085
      setIdIsSet(true);
3086
      return this;
3087
    }
3088
 
3089
    public void unsetId() {
3090
      __isset_bit_vector.clear(__ID_ISSET_ID);
3091
    }
3092
 
3093
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3094
    public boolean isSetId() {
3095
      return __isset_bit_vector.get(__ID_ISSET_ID);
3096
    }
3097
 
3098
    public void setIdIsSet(boolean value) {
3099
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3100
    }
3101
 
3102
    public void setFieldValue(_Fields field, Object value) {
3103
      switch (field) {
3104
      case ID:
3105
        if (value == null) {
3106
          unsetId();
3107
        } else {
3108
          setId((Long)value);
3109
        }
3110
        break;
3111
 
3112
      }
3113
    }
3114
 
3115
    public void setFieldValue(int fieldID, Object value) {
3116
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3117
    }
3118
 
3119
    public Object getFieldValue(_Fields field) {
3120
      switch (field) {
3121
      case ID:
3122
        return new Long(getId());
3123
 
3124
      }
3125
      throw new IllegalStateException();
3126
    }
3127
 
3128
    public Object getFieldValue(int fieldId) {
3129
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3130
    }
3131
 
3132
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3133
    public boolean isSet(_Fields field) {
3134
      switch (field) {
3135
      case ID:
3136
        return isSetId();
3137
      }
3138
      throw new IllegalStateException();
3139
    }
3140
 
3141
    public boolean isSet(int fieldID) {
3142
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3143
    }
3144
 
3145
    @Override
3146
    public boolean equals(Object that) {
3147
      if (that == null)
3148
        return false;
3149
      if (that instanceof getTransaction_args)
3150
        return this.equals((getTransaction_args)that);
3151
      return false;
3152
    }
3153
 
3154
    public boolean equals(getTransaction_args that) {
3155
      if (that == null)
3156
        return false;
3157
 
3158
      boolean this_present_id = true;
3159
      boolean that_present_id = true;
3160
      if (this_present_id || that_present_id) {
3161
        if (!(this_present_id && that_present_id))
3162
          return false;
3163
        if (this.id != that.id)
3164
          return false;
3165
      }
3166
 
3167
      return true;
3168
    }
3169
 
3170
    @Override
3171
    public int hashCode() {
3172
      return 0;
3173
    }
3174
 
3175
    public int compareTo(getTransaction_args other) {
3176
      if (!getClass().equals(other.getClass())) {
3177
        return getClass().getName().compareTo(other.getClass().getName());
3178
      }
3179
 
3180
      int lastComparison = 0;
3181
      getTransaction_args typedOther = (getTransaction_args)other;
3182
 
3183
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3184
      if (lastComparison != 0) {
3185
        return lastComparison;
3186
      }
3187
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3188
      if (lastComparison != 0) {
3189
        return lastComparison;
3190
      }
3191
      return 0;
3192
    }
3193
 
3194
    public void read(TProtocol iprot) throws TException {
3195
      TField field;
3196
      iprot.readStructBegin();
3197
      while (true)
3198
      {
3199
        field = iprot.readFieldBegin();
3200
        if (field.type == TType.STOP) { 
3201
          break;
3202
        }
3203
        _Fields fieldId = _Fields.findByThriftId(field.id);
3204
        if (fieldId == null) {
3205
          TProtocolUtil.skip(iprot, field.type);
3206
        } else {
3207
          switch (fieldId) {
3208
            case ID:
3209
              if (field.type == TType.I64) {
3210
                this.id = iprot.readI64();
3211
                setIdIsSet(true);
3212
              } else { 
3213
                TProtocolUtil.skip(iprot, field.type);
3214
              }
3215
              break;
3216
          }
3217
          iprot.readFieldEnd();
3218
        }
3219
      }
3220
      iprot.readStructEnd();
3221
      validate();
3222
    }
3223
 
3224
    public void write(TProtocol oprot) throws TException {
3225
      validate();
3226
 
3227
      oprot.writeStructBegin(STRUCT_DESC);
3228
      oprot.writeFieldBegin(ID_FIELD_DESC);
3229
      oprot.writeI64(this.id);
3230
      oprot.writeFieldEnd();
3231
      oprot.writeFieldStop();
3232
      oprot.writeStructEnd();
3233
    }
3234
 
3235
    @Override
3236
    public String toString() {
3237
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3238
      boolean first = true;
3239
 
3240
      sb.append("id:");
3241
      sb.append(this.id);
3242
      first = false;
3243
      sb.append(")");
3244
      return sb.toString();
3245
    }
3246
 
3247
    public void validate() throws TException {
3248
      // check for required fields
3249
    }
3250
 
3251
  }
3252
 
684 chandransh 3253
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3254
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3255
 
3256
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3257
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3258
 
3259
    private Transaction success;
3260
    private TransactionServiceException ex;
3261
 
3262
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3263
    public enum _Fields implements TFieldIdEnum {
3264
      SUCCESS((short)0, "success"),
3265
      EX((short)1, "ex");
3266
 
3267
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3268
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3269
 
3270
      static {
3271
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3272
          byId.put((int)field._thriftId, field);
3273
          byName.put(field.getFieldName(), field);
3274
        }
3275
      }
3276
 
3277
      /**
3278
       * Find the _Fields constant that matches fieldId, or null if its not found.
3279
       */
3280
      public static _Fields findByThriftId(int fieldId) {
3281
        return byId.get(fieldId);
3282
      }
3283
 
3284
      /**
3285
       * Find the _Fields constant that matches fieldId, throwing an exception
3286
       * if it is not found.
3287
       */
3288
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3289
        _Fields fields = findByThriftId(fieldId);
3290
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3291
        return fields;
3292
      }
3293
 
3294
      /**
3295
       * Find the _Fields constant that matches name, or null if its not found.
3296
       */
3297
      public static _Fields findByName(String name) {
3298
        return byName.get(name);
3299
      }
3300
 
3301
      private final short _thriftId;
3302
      private final String _fieldName;
3303
 
3304
      _Fields(short thriftId, String fieldName) {
3305
        _thriftId = thriftId;
3306
        _fieldName = fieldName;
3307
      }
3308
 
3309
      public short getThriftFieldId() {
3310
        return _thriftId;
3311
      }
3312
 
3313
      public String getFieldName() {
3314
        return _fieldName;
3315
      }
3316
    }
3317
 
3318
    // isset id assignments
3319
 
3320
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3321
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3322
          new StructMetaData(TType.STRUCT, Transaction.class)));
3323
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3324
          new FieldValueMetaData(TType.STRUCT)));
3325
    }});
3326
 
3327
    static {
3328
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3329
    }
3330
 
3331
    public getTransaction_result() {
3332
    }
3333
 
3334
    public getTransaction_result(
3335
      Transaction success,
3336
      TransactionServiceException ex)
3337
    {
3338
      this();
3339
      this.success = success;
3340
      this.ex = ex;
3341
    }
3342
 
3343
    /**
3344
     * Performs a deep copy on <i>other</i>.
3345
     */
3346
    public getTransaction_result(getTransaction_result other) {
3347
      if (other.isSetSuccess()) {
3348
        this.success = new Transaction(other.success);
3349
      }
3350
      if (other.isSetEx()) {
3351
        this.ex = new TransactionServiceException(other.ex);
3352
      }
3353
    }
3354
 
3355
    public getTransaction_result deepCopy() {
3356
      return new getTransaction_result(this);
3357
    }
3358
 
3359
    @Deprecated
3360
    public getTransaction_result clone() {
3361
      return new getTransaction_result(this);
3362
    }
3363
 
3364
    public Transaction getSuccess() {
3365
      return this.success;
3366
    }
3367
 
3368
    public getTransaction_result setSuccess(Transaction success) {
3369
      this.success = success;
3370
      return this;
3371
    }
3372
 
3373
    public void unsetSuccess() {
3374
      this.success = null;
3375
    }
3376
 
3377
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3378
    public boolean isSetSuccess() {
3379
      return this.success != null;
3380
    }
3381
 
3382
    public void setSuccessIsSet(boolean value) {
3383
      if (!value) {
3384
        this.success = null;
3385
      }
3386
    }
3387
 
3388
    public TransactionServiceException getEx() {
3389
      return this.ex;
3390
    }
3391
 
3392
    public getTransaction_result setEx(TransactionServiceException ex) {
3393
      this.ex = ex;
3394
      return this;
3395
    }
3396
 
3397
    public void unsetEx() {
3398
      this.ex = null;
3399
    }
3400
 
3401
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3402
    public boolean isSetEx() {
3403
      return this.ex != null;
3404
    }
3405
 
3406
    public void setExIsSet(boolean value) {
3407
      if (!value) {
3408
        this.ex = null;
3409
      }
3410
    }
3411
 
3412
    public void setFieldValue(_Fields field, Object value) {
3413
      switch (field) {
3414
      case SUCCESS:
3415
        if (value == null) {
3416
          unsetSuccess();
3417
        } else {
3418
          setSuccess((Transaction)value);
3419
        }
3420
        break;
3421
 
3422
      case EX:
3423
        if (value == null) {
3424
          unsetEx();
3425
        } else {
3426
          setEx((TransactionServiceException)value);
3427
        }
3428
        break;
3429
 
3430
      }
3431
    }
3432
 
3433
    public void setFieldValue(int fieldID, Object value) {
3434
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3435
    }
3436
 
3437
    public Object getFieldValue(_Fields field) {
3438
      switch (field) {
3439
      case SUCCESS:
3440
        return getSuccess();
3441
 
3442
      case EX:
3443
        return getEx();
3444
 
3445
      }
3446
      throw new IllegalStateException();
3447
    }
3448
 
3449
    public Object getFieldValue(int fieldId) {
3450
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3451
    }
3452
 
3453
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3454
    public boolean isSet(_Fields field) {
3455
      switch (field) {
3456
      case SUCCESS:
3457
        return isSetSuccess();
3458
      case EX:
3459
        return isSetEx();
3460
      }
3461
      throw new IllegalStateException();
3462
    }
3463
 
3464
    public boolean isSet(int fieldID) {
3465
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3466
    }
3467
 
3468
    @Override
3469
    public boolean equals(Object that) {
3470
      if (that == null)
3471
        return false;
3472
      if (that instanceof getTransaction_result)
3473
        return this.equals((getTransaction_result)that);
3474
      return false;
3475
    }
3476
 
3477
    public boolean equals(getTransaction_result that) {
3478
      if (that == null)
3479
        return false;
3480
 
3481
      boolean this_present_success = true && this.isSetSuccess();
3482
      boolean that_present_success = true && that.isSetSuccess();
3483
      if (this_present_success || that_present_success) {
3484
        if (!(this_present_success && that_present_success))
3485
          return false;
3486
        if (!this.success.equals(that.success))
3487
          return false;
3488
      }
3489
 
3490
      boolean this_present_ex = true && this.isSetEx();
3491
      boolean that_present_ex = true && that.isSetEx();
3492
      if (this_present_ex || that_present_ex) {
3493
        if (!(this_present_ex && that_present_ex))
3494
          return false;
3495
        if (!this.ex.equals(that.ex))
3496
          return false;
3497
      }
3498
 
3499
      return true;
3500
    }
3501
 
3502
    @Override
3503
    public int hashCode() {
3504
      return 0;
3505
    }
3506
 
684 chandransh 3507
    public int compareTo(getTransaction_result other) {
3508
      if (!getClass().equals(other.getClass())) {
3509
        return getClass().getName().compareTo(other.getClass().getName());
3510
      }
3511
 
3512
      int lastComparison = 0;
3513
      getTransaction_result typedOther = (getTransaction_result)other;
3514
 
3515
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3516
      if (lastComparison != 0) {
3517
        return lastComparison;
3518
      }
3519
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3520
      if (lastComparison != 0) {
3521
        return lastComparison;
3522
      }
3523
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3524
      if (lastComparison != 0) {
3525
        return lastComparison;
3526
      }
3527
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3528
      if (lastComparison != 0) {
3529
        return lastComparison;
3530
      }
3531
      return 0;
3532
    }
3533
 
68 ashish 3534
    public void read(TProtocol iprot) throws TException {
3535
      TField field;
3536
      iprot.readStructBegin();
3537
      while (true)
3538
      {
3539
        field = iprot.readFieldBegin();
3540
        if (field.type == TType.STOP) { 
3541
          break;
3542
        }
3543
        _Fields fieldId = _Fields.findByThriftId(field.id);
3544
        if (fieldId == null) {
3545
          TProtocolUtil.skip(iprot, field.type);
3546
        } else {
3547
          switch (fieldId) {
3548
            case SUCCESS:
3549
              if (field.type == TType.STRUCT) {
3550
                this.success = new Transaction();
3551
                this.success.read(iprot);
3552
              } else { 
3553
                TProtocolUtil.skip(iprot, field.type);
3554
              }
3555
              break;
3556
            case EX:
3557
              if (field.type == TType.STRUCT) {
3558
                this.ex = new TransactionServiceException();
3559
                this.ex.read(iprot);
3560
              } else { 
3561
                TProtocolUtil.skip(iprot, field.type);
3562
              }
3563
              break;
3564
          }
3565
          iprot.readFieldEnd();
3566
        }
3567
      }
3568
      iprot.readStructEnd();
3569
      validate();
3570
    }
3571
 
3572
    public void write(TProtocol oprot) throws TException {
3573
      oprot.writeStructBegin(STRUCT_DESC);
3574
 
3575
      if (this.isSetSuccess()) {
3576
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3577
        this.success.write(oprot);
3578
        oprot.writeFieldEnd();
3579
      } else if (this.isSetEx()) {
3580
        oprot.writeFieldBegin(EX_FIELD_DESC);
3581
        this.ex.write(oprot);
3582
        oprot.writeFieldEnd();
3583
      }
3584
      oprot.writeFieldStop();
3585
      oprot.writeStructEnd();
3586
    }
3587
 
3588
    @Override
3589
    public String toString() {
3590
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3591
      boolean first = true;
3592
 
3593
      sb.append("success:");
3594
      if (this.success == null) {
3595
        sb.append("null");
3596
      } else {
3597
        sb.append(this.success);
3598
      }
3599
      first = false;
3600
      if (!first) sb.append(", ");
3601
      sb.append("ex:");
3602
      if (this.ex == null) {
3603
        sb.append("null");
3604
      } else {
3605
        sb.append(this.ex);
3606
      }
3607
      first = false;
3608
      sb.append(")");
3609
      return sb.toString();
3610
    }
3611
 
3612
    public void validate() throws TException {
3613
      // check for required fields
3614
    }
3615
 
3616
  }
3617
 
3618
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3619
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3620
 
3621
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3622
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3623
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3624
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3625
 
3626
    private long customerId;
132 ashish 3627
    private long from_date;
3628
    private long to_date;
68 ashish 3629
    private TransactionStatus status;
3630
 
3631
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3632
    public enum _Fields implements TFieldIdEnum {
3633
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3634
      FROM_DATE((short)2, "from_date"),
3635
      TO_DATE((short)3, "to_date"),
68 ashish 3636
      /**
3637
       * 
3638
       * @see TransactionStatus
3639
       */
3640
      STATUS((short)4, "status");
3641
 
3642
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3643
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3644
 
3645
      static {
3646
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3647
          byId.put((int)field._thriftId, field);
3648
          byName.put(field.getFieldName(), field);
3649
        }
3650
      }
3651
 
3652
      /**
3653
       * Find the _Fields constant that matches fieldId, or null if its not found.
3654
       */
3655
      public static _Fields findByThriftId(int fieldId) {
3656
        return byId.get(fieldId);
3657
      }
3658
 
3659
      /**
3660
       * Find the _Fields constant that matches fieldId, throwing an exception
3661
       * if it is not found.
3662
       */
3663
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3664
        _Fields fields = findByThriftId(fieldId);
3665
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3666
        return fields;
3667
      }
3668
 
3669
      /**
3670
       * Find the _Fields constant that matches name, or null if its not found.
3671
       */
3672
      public static _Fields findByName(String name) {
3673
        return byName.get(name);
3674
      }
3675
 
3676
      private final short _thriftId;
3677
      private final String _fieldName;
3678
 
3679
      _Fields(short thriftId, String fieldName) {
3680
        _thriftId = thriftId;
3681
        _fieldName = fieldName;
3682
      }
3683
 
3684
      public short getThriftFieldId() {
3685
        return _thriftId;
3686
      }
3687
 
3688
      public String getFieldName() {
3689
        return _fieldName;
3690
      }
3691
    }
3692
 
3693
    // isset id assignments
3694
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3695
    private static final int __FROM_DATE_ISSET_ID = 1;
3696
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3697
    private BitSet __isset_bit_vector = new BitSet(3);
3698
 
3699
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3700
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3701
          new FieldValueMetaData(TType.I64)));
132 ashish 3702
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3703
          new FieldValueMetaData(TType.I64)));
132 ashish 3704
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3705
          new FieldValueMetaData(TType.I64)));
3706
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3707
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3708
    }});
3709
 
3710
    static {
3711
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3712
    }
3713
 
3714
    public getTransactionsForCustomer_args() {
3715
    }
3716
 
3717
    public getTransactionsForCustomer_args(
3718
      long customerId,
132 ashish 3719
      long from_date,
3720
      long to_date,
68 ashish 3721
      TransactionStatus status)
3722
    {
3723
      this();
3724
      this.customerId = customerId;
3725
      setCustomerIdIsSet(true);
132 ashish 3726
      this.from_date = from_date;
3727
      setFrom_dateIsSet(true);
3728
      this.to_date = to_date;
3729
      setTo_dateIsSet(true);
68 ashish 3730
      this.status = status;
3731
    }
3732
 
3733
    /**
3734
     * Performs a deep copy on <i>other</i>.
3735
     */
3736
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3737
      __isset_bit_vector.clear();
3738
      __isset_bit_vector.or(other.__isset_bit_vector);
3739
      this.customerId = other.customerId;
132 ashish 3740
      this.from_date = other.from_date;
3741
      this.to_date = other.to_date;
68 ashish 3742
      if (other.isSetStatus()) {
3743
        this.status = other.status;
3744
      }
3745
    }
3746
 
3747
    public getTransactionsForCustomer_args deepCopy() {
3748
      return new getTransactionsForCustomer_args(this);
3749
    }
3750
 
3751
    @Deprecated
3752
    public getTransactionsForCustomer_args clone() {
3753
      return new getTransactionsForCustomer_args(this);
3754
    }
3755
 
3756
    public long getCustomerId() {
3757
      return this.customerId;
3758
    }
3759
 
3760
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3761
      this.customerId = customerId;
3762
      setCustomerIdIsSet(true);
3763
      return this;
3764
    }
3765
 
3766
    public void unsetCustomerId() {
3767
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3768
    }
3769
 
3770
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3771
    public boolean isSetCustomerId() {
3772
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3773
    }
3774
 
3775
    public void setCustomerIdIsSet(boolean value) {
3776
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3777
    }
3778
 
132 ashish 3779
    public long getFrom_date() {
3780
      return this.from_date;
68 ashish 3781
    }
3782
 
132 ashish 3783
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3784
      this.from_date = from_date;
3785
      setFrom_dateIsSet(true);
68 ashish 3786
      return this;
3787
    }
3788
 
132 ashish 3789
    public void unsetFrom_date() {
3790
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3791
    }
3792
 
132 ashish 3793
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3794
    public boolean isSetFrom_date() {
3795
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3796
    }
3797
 
132 ashish 3798
    public void setFrom_dateIsSet(boolean value) {
3799
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3800
    }
3801
 
132 ashish 3802
    public long getTo_date() {
3803
      return this.to_date;
68 ashish 3804
    }
3805
 
132 ashish 3806
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3807
      this.to_date = to_date;
3808
      setTo_dateIsSet(true);
68 ashish 3809
      return this;
3810
    }
3811
 
132 ashish 3812
    public void unsetTo_date() {
3813
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3814
    }
3815
 
132 ashish 3816
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3817
    public boolean isSetTo_date() {
3818
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3819
    }
3820
 
132 ashish 3821
    public void setTo_dateIsSet(boolean value) {
3822
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3823
    }
3824
 
3825
    /**
3826
     * 
3827
     * @see TransactionStatus
3828
     */
3829
    public TransactionStatus getStatus() {
3830
      return this.status;
3831
    }
3832
 
3833
    /**
3834
     * 
3835
     * @see TransactionStatus
3836
     */
3837
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3838
      this.status = status;
3839
      return this;
3840
    }
3841
 
3842
    public void unsetStatus() {
3843
      this.status = null;
3844
    }
3845
 
3846
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3847
    public boolean isSetStatus() {
3848
      return this.status != null;
3849
    }
3850
 
3851
    public void setStatusIsSet(boolean value) {
3852
      if (!value) {
3853
        this.status = null;
3854
      }
3855
    }
3856
 
3857
    public void setFieldValue(_Fields field, Object value) {
3858
      switch (field) {
3859
      case CUSTOMER_ID:
3860
        if (value == null) {
3861
          unsetCustomerId();
3862
        } else {
3863
          setCustomerId((Long)value);
3864
        }
3865
        break;
3866
 
132 ashish 3867
      case FROM_DATE:
68 ashish 3868
        if (value == null) {
132 ashish 3869
          unsetFrom_date();
68 ashish 3870
        } else {
132 ashish 3871
          setFrom_date((Long)value);
68 ashish 3872
        }
3873
        break;
3874
 
132 ashish 3875
      case TO_DATE:
68 ashish 3876
        if (value == null) {
132 ashish 3877
          unsetTo_date();
68 ashish 3878
        } else {
132 ashish 3879
          setTo_date((Long)value);
68 ashish 3880
        }
3881
        break;
3882
 
3883
      case STATUS:
3884
        if (value == null) {
3885
          unsetStatus();
3886
        } else {
3887
          setStatus((TransactionStatus)value);
3888
        }
3889
        break;
3890
 
3891
      }
3892
    }
3893
 
3894
    public void setFieldValue(int fieldID, Object value) {
3895
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3896
    }
3897
 
3898
    public Object getFieldValue(_Fields field) {
3899
      switch (field) {
3900
      case CUSTOMER_ID:
3901
        return new Long(getCustomerId());
3902
 
132 ashish 3903
      case FROM_DATE:
3904
        return new Long(getFrom_date());
68 ashish 3905
 
132 ashish 3906
      case TO_DATE:
3907
        return new Long(getTo_date());
68 ashish 3908
 
3909
      case STATUS:
3910
        return getStatus();
3911
 
3912
      }
3913
      throw new IllegalStateException();
3914
    }
3915
 
3916
    public Object getFieldValue(int fieldId) {
3917
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3918
    }
3919
 
3920
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3921
    public boolean isSet(_Fields field) {
3922
      switch (field) {
3923
      case CUSTOMER_ID:
3924
        return isSetCustomerId();
132 ashish 3925
      case FROM_DATE:
3926
        return isSetFrom_date();
3927
      case TO_DATE:
3928
        return isSetTo_date();
68 ashish 3929
      case STATUS:
3930
        return isSetStatus();
3931
      }
3932
      throw new IllegalStateException();
3933
    }
3934
 
3935
    public boolean isSet(int fieldID) {
3936
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3937
    }
3938
 
3939
    @Override
3940
    public boolean equals(Object that) {
3941
      if (that == null)
3942
        return false;
3943
      if (that instanceof getTransactionsForCustomer_args)
3944
        return this.equals((getTransactionsForCustomer_args)that);
3945
      return false;
3946
    }
3947
 
3948
    public boolean equals(getTransactionsForCustomer_args that) {
3949
      if (that == null)
3950
        return false;
3951
 
3952
      boolean this_present_customerId = true;
3953
      boolean that_present_customerId = true;
3954
      if (this_present_customerId || that_present_customerId) {
3955
        if (!(this_present_customerId && that_present_customerId))
3956
          return false;
3957
        if (this.customerId != that.customerId)
3958
          return false;
3959
      }
3960
 
132 ashish 3961
      boolean this_present_from_date = true;
3962
      boolean that_present_from_date = true;
3963
      if (this_present_from_date || that_present_from_date) {
3964
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3965
          return false;
132 ashish 3966
        if (this.from_date != that.from_date)
68 ashish 3967
          return false;
3968
      }
3969
 
132 ashish 3970
      boolean this_present_to_date = true;
3971
      boolean that_present_to_date = true;
3972
      if (this_present_to_date || that_present_to_date) {
3973
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3974
          return false;
132 ashish 3975
        if (this.to_date != that.to_date)
68 ashish 3976
          return false;
3977
      }
3978
 
3979
      boolean this_present_status = true && this.isSetStatus();
3980
      boolean that_present_status = true && that.isSetStatus();
3981
      if (this_present_status || that_present_status) {
3982
        if (!(this_present_status && that_present_status))
3983
          return false;
3984
        if (!this.status.equals(that.status))
3985
          return false;
3986
      }
3987
 
3988
      return true;
3989
    }
3990
 
3991
    @Override
3992
    public int hashCode() {
3993
      return 0;
3994
    }
3995
 
3996
    public int compareTo(getTransactionsForCustomer_args other) {
3997
      if (!getClass().equals(other.getClass())) {
3998
        return getClass().getName().compareTo(other.getClass().getName());
3999
      }
4000
 
4001
      int lastComparison = 0;
4002
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4003
 
4004
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4005
      if (lastComparison != 0) {
4006
        return lastComparison;
4007
      }
4008
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4009
      if (lastComparison != 0) {
4010
        return lastComparison;
4011
      }
132 ashish 4012
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4013
      if (lastComparison != 0) {
4014
        return lastComparison;
4015
      }
132 ashish 4016
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4017
      if (lastComparison != 0) {
4018
        return lastComparison;
4019
      }
132 ashish 4020
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4021
      if (lastComparison != 0) {
4022
        return lastComparison;
4023
      }
132 ashish 4024
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4025
      if (lastComparison != 0) {
4026
        return lastComparison;
4027
      }
4028
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4029
      if (lastComparison != 0) {
4030
        return lastComparison;
4031
      }
4032
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4033
      if (lastComparison != 0) {
4034
        return lastComparison;
4035
      }
4036
      return 0;
4037
    }
4038
 
4039
    public void read(TProtocol iprot) throws TException {
4040
      TField field;
4041
      iprot.readStructBegin();
4042
      while (true)
4043
      {
4044
        field = iprot.readFieldBegin();
4045
        if (field.type == TType.STOP) { 
4046
          break;
4047
        }
4048
        _Fields fieldId = _Fields.findByThriftId(field.id);
4049
        if (fieldId == null) {
4050
          TProtocolUtil.skip(iprot, field.type);
4051
        } else {
4052
          switch (fieldId) {
4053
            case CUSTOMER_ID:
4054
              if (field.type == TType.I64) {
4055
                this.customerId = iprot.readI64();
4056
                setCustomerIdIsSet(true);
4057
              } else { 
4058
                TProtocolUtil.skip(iprot, field.type);
4059
              }
4060
              break;
132 ashish 4061
            case FROM_DATE:
68 ashish 4062
              if (field.type == TType.I64) {
132 ashish 4063
                this.from_date = iprot.readI64();
4064
                setFrom_dateIsSet(true);
68 ashish 4065
              } else { 
4066
                TProtocolUtil.skip(iprot, field.type);
4067
              }
4068
              break;
132 ashish 4069
            case TO_DATE:
68 ashish 4070
              if (field.type == TType.I64) {
132 ashish 4071
                this.to_date = iprot.readI64();
4072
                setTo_dateIsSet(true);
68 ashish 4073
              } else { 
4074
                TProtocolUtil.skip(iprot, field.type);
4075
              }
4076
              break;
4077
            case STATUS:
4078
              if (field.type == TType.I32) {
4079
                this.status = TransactionStatus.findByValue(iprot.readI32());
4080
              } else { 
4081
                TProtocolUtil.skip(iprot, field.type);
4082
              }
4083
              break;
4084
          }
4085
          iprot.readFieldEnd();
4086
        }
4087
      }
4088
      iprot.readStructEnd();
4089
      validate();
4090
    }
4091
 
4092
    public void write(TProtocol oprot) throws TException {
4093
      validate();
4094
 
4095
      oprot.writeStructBegin(STRUCT_DESC);
4096
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4097
      oprot.writeI64(this.customerId);
4098
      oprot.writeFieldEnd();
132 ashish 4099
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4100
      oprot.writeI64(this.from_date);
68 ashish 4101
      oprot.writeFieldEnd();
132 ashish 4102
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4103
      oprot.writeI64(this.to_date);
68 ashish 4104
      oprot.writeFieldEnd();
4105
      if (this.status != null) {
4106
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4107
        oprot.writeI32(this.status.getValue());
4108
        oprot.writeFieldEnd();
4109
      }
4110
      oprot.writeFieldStop();
4111
      oprot.writeStructEnd();
4112
    }
4113
 
4114
    @Override
4115
    public String toString() {
4116
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4117
      boolean first = true;
4118
 
4119
      sb.append("customerId:");
4120
      sb.append(this.customerId);
4121
      first = false;
4122
      if (!first) sb.append(", ");
132 ashish 4123
      sb.append("from_date:");
4124
      sb.append(this.from_date);
68 ashish 4125
      first = false;
4126
      if (!first) sb.append(", ");
132 ashish 4127
      sb.append("to_date:");
4128
      sb.append(this.to_date);
68 ashish 4129
      first = false;
4130
      if (!first) sb.append(", ");
4131
      sb.append("status:");
4132
      if (this.status == null) {
4133
        sb.append("null");
4134
      } else {
4135
        String status_name = status.name();
4136
        if (status_name != null) {
4137
          sb.append(status_name);
4138
          sb.append(" (");
4139
        }
4140
        sb.append(this.status);
4141
        if (status_name != null) {
4142
          sb.append(")");
4143
        }
4144
      }
4145
      first = false;
4146
      sb.append(")");
4147
      return sb.toString();
4148
    }
4149
 
4150
    public void validate() throws TException {
4151
      // check for required fields
4152
    }
4153
 
4154
  }
4155
 
684 chandransh 4156
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4157
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4158
 
4159
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4160
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4161
 
4162
    private List<Transaction> success;
4163
    private TransactionServiceException ex;
4164
 
4165
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4166
    public enum _Fields implements TFieldIdEnum {
4167
      SUCCESS((short)0, "success"),
4168
      EX((short)1, "ex");
4169
 
4170
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4171
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4172
 
4173
      static {
4174
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4175
          byId.put((int)field._thriftId, field);
4176
          byName.put(field.getFieldName(), field);
4177
        }
4178
      }
4179
 
4180
      /**
4181
       * Find the _Fields constant that matches fieldId, or null if its not found.
4182
       */
4183
      public static _Fields findByThriftId(int fieldId) {
4184
        return byId.get(fieldId);
4185
      }
4186
 
4187
      /**
4188
       * Find the _Fields constant that matches fieldId, throwing an exception
4189
       * if it is not found.
4190
       */
4191
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4192
        _Fields fields = findByThriftId(fieldId);
4193
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4194
        return fields;
4195
      }
4196
 
4197
      /**
4198
       * Find the _Fields constant that matches name, or null if its not found.
4199
       */
4200
      public static _Fields findByName(String name) {
4201
        return byName.get(name);
4202
      }
4203
 
4204
      private final short _thriftId;
4205
      private final String _fieldName;
4206
 
4207
      _Fields(short thriftId, String fieldName) {
4208
        _thriftId = thriftId;
4209
        _fieldName = fieldName;
4210
      }
4211
 
4212
      public short getThriftFieldId() {
4213
        return _thriftId;
4214
      }
4215
 
4216
      public String getFieldName() {
4217
        return _fieldName;
4218
      }
4219
    }
4220
 
4221
    // isset id assignments
4222
 
4223
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4224
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4225
          new ListMetaData(TType.LIST, 
4226
              new StructMetaData(TType.STRUCT, Transaction.class))));
4227
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4228
          new FieldValueMetaData(TType.STRUCT)));
4229
    }});
4230
 
4231
    static {
4232
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4233
    }
4234
 
4235
    public getTransactionsForCustomer_result() {
4236
    }
4237
 
4238
    public getTransactionsForCustomer_result(
4239
      List<Transaction> success,
4240
      TransactionServiceException ex)
4241
    {
4242
      this();
4243
      this.success = success;
4244
      this.ex = ex;
4245
    }
4246
 
4247
    /**
4248
     * Performs a deep copy on <i>other</i>.
4249
     */
4250
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4251
      if (other.isSetSuccess()) {
4252
        List<Transaction> __this__success = new ArrayList<Transaction>();
4253
        for (Transaction other_element : other.success) {
4254
          __this__success.add(new Transaction(other_element));
4255
        }
4256
        this.success = __this__success;
4257
      }
4258
      if (other.isSetEx()) {
4259
        this.ex = new TransactionServiceException(other.ex);
4260
      }
4261
    }
4262
 
4263
    public getTransactionsForCustomer_result deepCopy() {
4264
      return new getTransactionsForCustomer_result(this);
4265
    }
4266
 
4267
    @Deprecated
4268
    public getTransactionsForCustomer_result clone() {
4269
      return new getTransactionsForCustomer_result(this);
4270
    }
4271
 
4272
    public int getSuccessSize() {
4273
      return (this.success == null) ? 0 : this.success.size();
4274
    }
4275
 
4276
    public java.util.Iterator<Transaction> getSuccessIterator() {
4277
      return (this.success == null) ? null : this.success.iterator();
4278
    }
4279
 
4280
    public void addToSuccess(Transaction elem) {
4281
      if (this.success == null) {
4282
        this.success = new ArrayList<Transaction>();
4283
      }
4284
      this.success.add(elem);
4285
    }
4286
 
4287
    public List<Transaction> getSuccess() {
4288
      return this.success;
4289
    }
4290
 
4291
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4292
      this.success = success;
4293
      return this;
4294
    }
4295
 
4296
    public void unsetSuccess() {
4297
      this.success = null;
4298
    }
4299
 
4300
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4301
    public boolean isSetSuccess() {
4302
      return this.success != null;
4303
    }
4304
 
4305
    public void setSuccessIsSet(boolean value) {
4306
      if (!value) {
4307
        this.success = null;
4308
      }
4309
    }
4310
 
4311
    public TransactionServiceException getEx() {
4312
      return this.ex;
4313
    }
4314
 
4315
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4316
      this.ex = ex;
4317
      return this;
4318
    }
4319
 
4320
    public void unsetEx() {
4321
      this.ex = null;
4322
    }
4323
 
4324
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4325
    public boolean isSetEx() {
4326
      return this.ex != null;
4327
    }
4328
 
4329
    public void setExIsSet(boolean value) {
4330
      if (!value) {
4331
        this.ex = null;
4332
      }
4333
    }
4334
 
4335
    public void setFieldValue(_Fields field, Object value) {
4336
      switch (field) {
4337
      case SUCCESS:
4338
        if (value == null) {
4339
          unsetSuccess();
4340
        } else {
4341
          setSuccess((List<Transaction>)value);
4342
        }
4343
        break;
4344
 
4345
      case EX:
4346
        if (value == null) {
4347
          unsetEx();
4348
        } else {
4349
          setEx((TransactionServiceException)value);
4350
        }
4351
        break;
4352
 
4353
      }
4354
    }
4355
 
4356
    public void setFieldValue(int fieldID, Object value) {
4357
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4358
    }
4359
 
4360
    public Object getFieldValue(_Fields field) {
4361
      switch (field) {
4362
      case SUCCESS:
4363
        return getSuccess();
4364
 
4365
      case EX:
4366
        return getEx();
4367
 
4368
      }
4369
      throw new IllegalStateException();
4370
    }
4371
 
4372
    public Object getFieldValue(int fieldId) {
4373
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4374
    }
4375
 
4376
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4377
    public boolean isSet(_Fields field) {
4378
      switch (field) {
4379
      case SUCCESS:
4380
        return isSetSuccess();
4381
      case EX:
4382
        return isSetEx();
4383
      }
4384
      throw new IllegalStateException();
4385
    }
4386
 
4387
    public boolean isSet(int fieldID) {
4388
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4389
    }
4390
 
4391
    @Override
4392
    public boolean equals(Object that) {
4393
      if (that == null)
4394
        return false;
4395
      if (that instanceof getTransactionsForCustomer_result)
4396
        return this.equals((getTransactionsForCustomer_result)that);
4397
      return false;
4398
    }
4399
 
4400
    public boolean equals(getTransactionsForCustomer_result that) {
4401
      if (that == null)
4402
        return false;
4403
 
4404
      boolean this_present_success = true && this.isSetSuccess();
4405
      boolean that_present_success = true && that.isSetSuccess();
4406
      if (this_present_success || that_present_success) {
4407
        if (!(this_present_success && that_present_success))
4408
          return false;
4409
        if (!this.success.equals(that.success))
4410
          return false;
4411
      }
4412
 
4413
      boolean this_present_ex = true && this.isSetEx();
4414
      boolean that_present_ex = true && that.isSetEx();
4415
      if (this_present_ex || that_present_ex) {
4416
        if (!(this_present_ex && that_present_ex))
4417
          return false;
4418
        if (!this.ex.equals(that.ex))
4419
          return false;
4420
      }
4421
 
4422
      return true;
4423
    }
4424
 
4425
    @Override
4426
    public int hashCode() {
4427
      return 0;
4428
    }
4429
 
684 chandransh 4430
    public int compareTo(getTransactionsForCustomer_result other) {
4431
      if (!getClass().equals(other.getClass())) {
4432
        return getClass().getName().compareTo(other.getClass().getName());
4433
      }
4434
 
4435
      int lastComparison = 0;
4436
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4437
 
4438
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4439
      if (lastComparison != 0) {
4440
        return lastComparison;
4441
      }
4442
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4443
      if (lastComparison != 0) {
4444
        return lastComparison;
4445
      }
4446
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4447
      if (lastComparison != 0) {
4448
        return lastComparison;
4449
      }
4450
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4451
      if (lastComparison != 0) {
4452
        return lastComparison;
4453
      }
4454
      return 0;
4455
    }
4456
 
68 ashish 4457
    public void read(TProtocol iprot) throws TException {
4458
      TField field;
4459
      iprot.readStructBegin();
4460
      while (true)
4461
      {
4462
        field = iprot.readFieldBegin();
4463
        if (field.type == TType.STOP) { 
4464
          break;
4465
        }
4466
        _Fields fieldId = _Fields.findByThriftId(field.id);
4467
        if (fieldId == null) {
4468
          TProtocolUtil.skip(iprot, field.type);
4469
        } else {
4470
          switch (fieldId) {
4471
            case SUCCESS:
4472
              if (field.type == TType.LIST) {
4473
                {
684 chandransh 4474
                  TList _list8 = iprot.readListBegin();
4475
                  this.success = new ArrayList<Transaction>(_list8.size);
4476
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4477
                  {
684 chandransh 4478
                    Transaction _elem10;
4479
                    _elem10 = new Transaction();
4480
                    _elem10.read(iprot);
4481
                    this.success.add(_elem10);
68 ashish 4482
                  }
4483
                  iprot.readListEnd();
4484
                }
4485
              } else { 
4486
                TProtocolUtil.skip(iprot, field.type);
4487
              }
4488
              break;
4489
            case EX:
4490
              if (field.type == TType.STRUCT) {
4491
                this.ex = new TransactionServiceException();
4492
                this.ex.read(iprot);
4493
              } else { 
4494
                TProtocolUtil.skip(iprot, field.type);
4495
              }
4496
              break;
4497
          }
4498
          iprot.readFieldEnd();
4499
        }
4500
      }
4501
      iprot.readStructEnd();
4502
      validate();
4503
    }
4504
 
4505
    public void write(TProtocol oprot) throws TException {
4506
      oprot.writeStructBegin(STRUCT_DESC);
4507
 
4508
      if (this.isSetSuccess()) {
4509
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4510
        {
4511
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4512
          for (Transaction _iter11 : this.success)
68 ashish 4513
          {
684 chandransh 4514
            _iter11.write(oprot);
68 ashish 4515
          }
4516
          oprot.writeListEnd();
4517
        }
4518
        oprot.writeFieldEnd();
4519
      } else if (this.isSetEx()) {
4520
        oprot.writeFieldBegin(EX_FIELD_DESC);
4521
        this.ex.write(oprot);
4522
        oprot.writeFieldEnd();
4523
      }
4524
      oprot.writeFieldStop();
4525
      oprot.writeStructEnd();
4526
    }
4527
 
4528
    @Override
4529
    public String toString() {
4530
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4531
      boolean first = true;
4532
 
4533
      sb.append("success:");
4534
      if (this.success == null) {
4535
        sb.append("null");
4536
      } else {
4537
        sb.append(this.success);
4538
      }
4539
      first = false;
4540
      if (!first) sb.append(", ");
4541
      sb.append("ex:");
4542
      if (this.ex == null) {
4543
        sb.append("null");
4544
      } else {
4545
        sb.append(this.ex);
4546
      }
4547
      first = false;
4548
      sb.append(")");
4549
      return sb.toString();
4550
    }
4551
 
4552
    public void validate() throws TException {
4553
      // check for required fields
4554
    }
4555
 
4556
  }
4557
 
132 ashish 4558
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4559
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4560
 
4561
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4562
 
4563
    private long shoppingCartId;
4564
 
4565
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4566
    public enum _Fields implements TFieldIdEnum {
4567
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4568
 
4569
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4570
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4571
 
4572
      static {
4573
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4574
          byId.put((int)field._thriftId, field);
4575
          byName.put(field.getFieldName(), field);
4576
        }
4577
      }
4578
 
4579
      /**
4580
       * Find the _Fields constant that matches fieldId, or null if its not found.
4581
       */
4582
      public static _Fields findByThriftId(int fieldId) {
4583
        return byId.get(fieldId);
4584
      }
4585
 
4586
      /**
4587
       * Find the _Fields constant that matches fieldId, throwing an exception
4588
       * if it is not found.
4589
       */
4590
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4591
        _Fields fields = findByThriftId(fieldId);
4592
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4593
        return fields;
4594
      }
4595
 
4596
      /**
4597
       * Find the _Fields constant that matches name, or null if its not found.
4598
       */
4599
      public static _Fields findByName(String name) {
4600
        return byName.get(name);
4601
      }
4602
 
4603
      private final short _thriftId;
4604
      private final String _fieldName;
4605
 
4606
      _Fields(short thriftId, String fieldName) {
4607
        _thriftId = thriftId;
4608
        _fieldName = fieldName;
4609
      }
4610
 
4611
      public short getThriftFieldId() {
4612
        return _thriftId;
4613
      }
4614
 
4615
      public String getFieldName() {
4616
        return _fieldName;
4617
      }
4618
    }
4619
 
4620
    // isset id assignments
4621
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4622
    private BitSet __isset_bit_vector = new BitSet(1);
4623
 
4624
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4625
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4626
          new FieldValueMetaData(TType.I64)));
4627
    }});
4628
 
4629
    static {
4630
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4631
    }
4632
 
4633
    public getTransactionsForShoppingCartId_args() {
4634
    }
4635
 
4636
    public getTransactionsForShoppingCartId_args(
4637
      long shoppingCartId)
4638
    {
4639
      this();
4640
      this.shoppingCartId = shoppingCartId;
4641
      setShoppingCartIdIsSet(true);
4642
    }
4643
 
4644
    /**
4645
     * Performs a deep copy on <i>other</i>.
4646
     */
4647
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4648
      __isset_bit_vector.clear();
4649
      __isset_bit_vector.or(other.__isset_bit_vector);
4650
      this.shoppingCartId = other.shoppingCartId;
4651
    }
4652
 
4653
    public getTransactionsForShoppingCartId_args deepCopy() {
4654
      return new getTransactionsForShoppingCartId_args(this);
4655
    }
4656
 
4657
    @Deprecated
4658
    public getTransactionsForShoppingCartId_args clone() {
4659
      return new getTransactionsForShoppingCartId_args(this);
4660
    }
4661
 
4662
    public long getShoppingCartId() {
4663
      return this.shoppingCartId;
4664
    }
4665
 
4666
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4667
      this.shoppingCartId = shoppingCartId;
4668
      setShoppingCartIdIsSet(true);
4669
      return this;
4670
    }
4671
 
4672
    public void unsetShoppingCartId() {
4673
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4674
    }
4675
 
4676
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4677
    public boolean isSetShoppingCartId() {
4678
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4679
    }
4680
 
4681
    public void setShoppingCartIdIsSet(boolean value) {
4682
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4683
    }
4684
 
4685
    public void setFieldValue(_Fields field, Object value) {
4686
      switch (field) {
4687
      case SHOPPING_CART_ID:
4688
        if (value == null) {
4689
          unsetShoppingCartId();
4690
        } else {
4691
          setShoppingCartId((Long)value);
4692
        }
4693
        break;
4694
 
4695
      }
4696
    }
4697
 
4698
    public void setFieldValue(int fieldID, Object value) {
4699
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4700
    }
4701
 
4702
    public Object getFieldValue(_Fields field) {
4703
      switch (field) {
4704
      case SHOPPING_CART_ID:
4705
        return new Long(getShoppingCartId());
4706
 
4707
      }
4708
      throw new IllegalStateException();
4709
    }
4710
 
4711
    public Object getFieldValue(int fieldId) {
4712
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4713
    }
4714
 
4715
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4716
    public boolean isSet(_Fields field) {
4717
      switch (field) {
4718
      case SHOPPING_CART_ID:
4719
        return isSetShoppingCartId();
4720
      }
4721
      throw new IllegalStateException();
4722
    }
4723
 
4724
    public boolean isSet(int fieldID) {
4725
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4726
    }
4727
 
4728
    @Override
4729
    public boolean equals(Object that) {
4730
      if (that == null)
4731
        return false;
4732
      if (that instanceof getTransactionsForShoppingCartId_args)
4733
        return this.equals((getTransactionsForShoppingCartId_args)that);
4734
      return false;
4735
    }
4736
 
4737
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4738
      if (that == null)
4739
        return false;
4740
 
4741
      boolean this_present_shoppingCartId = true;
4742
      boolean that_present_shoppingCartId = true;
4743
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4744
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4745
          return false;
4746
        if (this.shoppingCartId != that.shoppingCartId)
4747
          return false;
4748
      }
4749
 
4750
      return true;
4751
    }
4752
 
4753
    @Override
4754
    public int hashCode() {
4755
      return 0;
4756
    }
4757
 
4758
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4759
      if (!getClass().equals(other.getClass())) {
4760
        return getClass().getName().compareTo(other.getClass().getName());
4761
      }
4762
 
4763
      int lastComparison = 0;
4764
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4765
 
4766
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4767
      if (lastComparison != 0) {
4768
        return lastComparison;
4769
      }
4770
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4771
      if (lastComparison != 0) {
4772
        return lastComparison;
4773
      }
4774
      return 0;
4775
    }
4776
 
4777
    public void read(TProtocol iprot) throws TException {
4778
      TField field;
4779
      iprot.readStructBegin();
4780
      while (true)
4781
      {
4782
        field = iprot.readFieldBegin();
4783
        if (field.type == TType.STOP) { 
4784
          break;
4785
        }
4786
        _Fields fieldId = _Fields.findByThriftId(field.id);
4787
        if (fieldId == null) {
4788
          TProtocolUtil.skip(iprot, field.type);
4789
        } else {
4790
          switch (fieldId) {
4791
            case SHOPPING_CART_ID:
4792
              if (field.type == TType.I64) {
4793
                this.shoppingCartId = iprot.readI64();
4794
                setShoppingCartIdIsSet(true);
4795
              } else { 
4796
                TProtocolUtil.skip(iprot, field.type);
4797
              }
4798
              break;
4799
          }
4800
          iprot.readFieldEnd();
4801
        }
4802
      }
4803
      iprot.readStructEnd();
4804
      validate();
4805
    }
4806
 
4807
    public void write(TProtocol oprot) throws TException {
4808
      validate();
4809
 
4810
      oprot.writeStructBegin(STRUCT_DESC);
4811
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4812
      oprot.writeI64(this.shoppingCartId);
4813
      oprot.writeFieldEnd();
4814
      oprot.writeFieldStop();
4815
      oprot.writeStructEnd();
4816
    }
4817
 
4818
    @Override
4819
    public String toString() {
4820
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4821
      boolean first = true;
4822
 
4823
      sb.append("shoppingCartId:");
4824
      sb.append(this.shoppingCartId);
4825
      first = false;
4826
      sb.append(")");
4827
      return sb.toString();
4828
    }
4829
 
4830
    public void validate() throws TException {
4831
      // check for required fields
4832
    }
4833
 
4834
  }
4835
 
684 chandransh 4836
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4837
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4838
 
4839
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4840
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4841
 
4842
    private List<Transaction> success;
4843
    private TransactionServiceException ex;
4844
 
4845
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4846
    public enum _Fields implements TFieldIdEnum {
4847
      SUCCESS((short)0, "success"),
4848
      EX((short)1, "ex");
4849
 
4850
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4851
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4852
 
4853
      static {
4854
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4855
          byId.put((int)field._thriftId, field);
4856
          byName.put(field.getFieldName(), field);
4857
        }
4858
      }
4859
 
4860
      /**
4861
       * Find the _Fields constant that matches fieldId, or null if its not found.
4862
       */
4863
      public static _Fields findByThriftId(int fieldId) {
4864
        return byId.get(fieldId);
4865
      }
4866
 
4867
      /**
4868
       * Find the _Fields constant that matches fieldId, throwing an exception
4869
       * if it is not found.
4870
       */
4871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4872
        _Fields fields = findByThriftId(fieldId);
4873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4874
        return fields;
4875
      }
4876
 
4877
      /**
4878
       * Find the _Fields constant that matches name, or null if its not found.
4879
       */
4880
      public static _Fields findByName(String name) {
4881
        return byName.get(name);
4882
      }
4883
 
4884
      private final short _thriftId;
4885
      private final String _fieldName;
4886
 
4887
      _Fields(short thriftId, String fieldName) {
4888
        _thriftId = thriftId;
4889
        _fieldName = fieldName;
4890
      }
4891
 
4892
      public short getThriftFieldId() {
4893
        return _thriftId;
4894
      }
4895
 
4896
      public String getFieldName() {
4897
        return _fieldName;
4898
      }
4899
    }
4900
 
4901
    // isset id assignments
4902
 
4903
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4904
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4905
          new ListMetaData(TType.LIST, 
4906
              new StructMetaData(TType.STRUCT, Transaction.class))));
4907
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4908
          new FieldValueMetaData(TType.STRUCT)));
4909
    }});
4910
 
4911
    static {
4912
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4913
    }
4914
 
4915
    public getTransactionsForShoppingCartId_result() {
4916
    }
4917
 
4918
    public getTransactionsForShoppingCartId_result(
4919
      List<Transaction> success,
4920
      TransactionServiceException ex)
4921
    {
4922
      this();
4923
      this.success = success;
4924
      this.ex = ex;
4925
    }
4926
 
4927
    /**
4928
     * Performs a deep copy on <i>other</i>.
4929
     */
4930
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
4931
      if (other.isSetSuccess()) {
4932
        List<Transaction> __this__success = new ArrayList<Transaction>();
4933
        for (Transaction other_element : other.success) {
4934
          __this__success.add(new Transaction(other_element));
4935
        }
4936
        this.success = __this__success;
4937
      }
4938
      if (other.isSetEx()) {
4939
        this.ex = new TransactionServiceException(other.ex);
4940
      }
4941
    }
4942
 
4943
    public getTransactionsForShoppingCartId_result deepCopy() {
4944
      return new getTransactionsForShoppingCartId_result(this);
4945
    }
4946
 
4947
    @Deprecated
4948
    public getTransactionsForShoppingCartId_result clone() {
4949
      return new getTransactionsForShoppingCartId_result(this);
4950
    }
4951
 
4952
    public int getSuccessSize() {
4953
      return (this.success == null) ? 0 : this.success.size();
4954
    }
4955
 
4956
    public java.util.Iterator<Transaction> getSuccessIterator() {
4957
      return (this.success == null) ? null : this.success.iterator();
4958
    }
4959
 
4960
    public void addToSuccess(Transaction elem) {
4961
      if (this.success == null) {
4962
        this.success = new ArrayList<Transaction>();
4963
      }
4964
      this.success.add(elem);
4965
    }
4966
 
4967
    public List<Transaction> getSuccess() {
4968
      return this.success;
4969
    }
4970
 
4971
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
4972
      this.success = success;
4973
      return this;
4974
    }
4975
 
4976
    public void unsetSuccess() {
4977
      this.success = null;
4978
    }
4979
 
4980
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4981
    public boolean isSetSuccess() {
4982
      return this.success != null;
4983
    }
4984
 
4985
    public void setSuccessIsSet(boolean value) {
4986
      if (!value) {
4987
        this.success = null;
4988
      }
4989
    }
4990
 
4991
    public TransactionServiceException getEx() {
4992
      return this.ex;
4993
    }
4994
 
4995
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
4996
      this.ex = ex;
4997
      return this;
4998
    }
4999
 
5000
    public void unsetEx() {
5001
      this.ex = null;
5002
    }
5003
 
5004
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5005
    public boolean isSetEx() {
5006
      return this.ex != null;
5007
    }
5008
 
5009
    public void setExIsSet(boolean value) {
5010
      if (!value) {
5011
        this.ex = null;
5012
      }
5013
    }
5014
 
5015
    public void setFieldValue(_Fields field, Object value) {
5016
      switch (field) {
5017
      case SUCCESS:
5018
        if (value == null) {
5019
          unsetSuccess();
5020
        } else {
5021
          setSuccess((List<Transaction>)value);
5022
        }
5023
        break;
5024
 
5025
      case EX:
5026
        if (value == null) {
5027
          unsetEx();
5028
        } else {
5029
          setEx((TransactionServiceException)value);
5030
        }
5031
        break;
5032
 
5033
      }
5034
    }
5035
 
5036
    public void setFieldValue(int fieldID, Object value) {
5037
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5038
    }
5039
 
5040
    public Object getFieldValue(_Fields field) {
5041
      switch (field) {
5042
      case SUCCESS:
5043
        return getSuccess();
5044
 
5045
      case EX:
5046
        return getEx();
5047
 
5048
      }
5049
      throw new IllegalStateException();
5050
    }
5051
 
5052
    public Object getFieldValue(int fieldId) {
5053
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5054
    }
5055
 
5056
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5057
    public boolean isSet(_Fields field) {
5058
      switch (field) {
5059
      case SUCCESS:
5060
        return isSetSuccess();
5061
      case EX:
5062
        return isSetEx();
5063
      }
5064
      throw new IllegalStateException();
5065
    }
5066
 
5067
    public boolean isSet(int fieldID) {
5068
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5069
    }
5070
 
5071
    @Override
5072
    public boolean equals(Object that) {
5073
      if (that == null)
5074
        return false;
5075
      if (that instanceof getTransactionsForShoppingCartId_result)
5076
        return this.equals((getTransactionsForShoppingCartId_result)that);
5077
      return false;
5078
    }
5079
 
5080
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5081
      if (that == null)
5082
        return false;
5083
 
5084
      boolean this_present_success = true && this.isSetSuccess();
5085
      boolean that_present_success = true && that.isSetSuccess();
5086
      if (this_present_success || that_present_success) {
5087
        if (!(this_present_success && that_present_success))
5088
          return false;
5089
        if (!this.success.equals(that.success))
5090
          return false;
5091
      }
5092
 
5093
      boolean this_present_ex = true && this.isSetEx();
5094
      boolean that_present_ex = true && that.isSetEx();
5095
      if (this_present_ex || that_present_ex) {
5096
        if (!(this_present_ex && that_present_ex))
5097
          return false;
5098
        if (!this.ex.equals(that.ex))
5099
          return false;
5100
      }
5101
 
5102
      return true;
5103
    }
5104
 
5105
    @Override
5106
    public int hashCode() {
5107
      return 0;
5108
    }
5109
 
684 chandransh 5110
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5111
      if (!getClass().equals(other.getClass())) {
5112
        return getClass().getName().compareTo(other.getClass().getName());
5113
      }
5114
 
5115
      int lastComparison = 0;
5116
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5117
 
5118
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5119
      if (lastComparison != 0) {
5120
        return lastComparison;
5121
      }
5122
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5123
      if (lastComparison != 0) {
5124
        return lastComparison;
5125
      }
5126
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5127
      if (lastComparison != 0) {
5128
        return lastComparison;
5129
      }
5130
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5131
      if (lastComparison != 0) {
5132
        return lastComparison;
5133
      }
5134
      return 0;
5135
    }
5136
 
132 ashish 5137
    public void read(TProtocol iprot) throws TException {
5138
      TField field;
5139
      iprot.readStructBegin();
5140
      while (true)
5141
      {
5142
        field = iprot.readFieldBegin();
5143
        if (field.type == TType.STOP) { 
5144
          break;
5145
        }
5146
        _Fields fieldId = _Fields.findByThriftId(field.id);
5147
        if (fieldId == null) {
5148
          TProtocolUtil.skip(iprot, field.type);
5149
        } else {
5150
          switch (fieldId) {
5151
            case SUCCESS:
5152
              if (field.type == TType.LIST) {
5153
                {
684 chandransh 5154
                  TList _list12 = iprot.readListBegin();
5155
                  this.success = new ArrayList<Transaction>(_list12.size);
5156
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5157
                  {
684 chandransh 5158
                    Transaction _elem14;
5159
                    _elem14 = new Transaction();
5160
                    _elem14.read(iprot);
5161
                    this.success.add(_elem14);
132 ashish 5162
                  }
5163
                  iprot.readListEnd();
5164
                }
5165
              } else { 
5166
                TProtocolUtil.skip(iprot, field.type);
5167
              }
5168
              break;
5169
            case EX:
5170
              if (field.type == TType.STRUCT) {
5171
                this.ex = new TransactionServiceException();
5172
                this.ex.read(iprot);
5173
              } else { 
5174
                TProtocolUtil.skip(iprot, field.type);
5175
              }
5176
              break;
5177
          }
5178
          iprot.readFieldEnd();
5179
        }
5180
      }
5181
      iprot.readStructEnd();
5182
      validate();
5183
    }
5184
 
5185
    public void write(TProtocol oprot) throws TException {
5186
      oprot.writeStructBegin(STRUCT_DESC);
5187
 
5188
      if (this.isSetSuccess()) {
5189
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5190
        {
5191
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5192
          for (Transaction _iter15 : this.success)
132 ashish 5193
          {
684 chandransh 5194
            _iter15.write(oprot);
132 ashish 5195
          }
5196
          oprot.writeListEnd();
5197
        }
5198
        oprot.writeFieldEnd();
5199
      } else if (this.isSetEx()) {
5200
        oprot.writeFieldBegin(EX_FIELD_DESC);
5201
        this.ex.write(oprot);
5202
        oprot.writeFieldEnd();
5203
      }
5204
      oprot.writeFieldStop();
5205
      oprot.writeStructEnd();
5206
    }
5207
 
5208
    @Override
5209
    public String toString() {
5210
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5211
      boolean first = true;
5212
 
5213
      sb.append("success:");
5214
      if (this.success == null) {
5215
        sb.append("null");
5216
      } else {
5217
        sb.append(this.success);
5218
      }
5219
      first = false;
5220
      if (!first) sb.append(", ");
5221
      sb.append("ex:");
5222
      if (this.ex == null) {
5223
        sb.append("null");
5224
      } else {
5225
        sb.append(this.ex);
5226
      }
5227
      first = false;
5228
      sb.append(")");
5229
      return sb.toString();
5230
    }
5231
 
5232
    public void validate() throws TException {
5233
      // check for required fields
5234
    }
5235
 
5236
  }
5237
 
68 ashish 5238
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5239
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5240
 
5241
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5242
 
5243
    private long transactionId;
5244
 
5245
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5246
    public enum _Fields implements TFieldIdEnum {
5247
      TRANSACTION_ID((short)1, "transactionId");
5248
 
5249
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5250
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5251
 
5252
      static {
5253
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5254
          byId.put((int)field._thriftId, field);
5255
          byName.put(field.getFieldName(), field);
5256
        }
5257
      }
5258
 
5259
      /**
5260
       * Find the _Fields constant that matches fieldId, or null if its not found.
5261
       */
5262
      public static _Fields findByThriftId(int fieldId) {
5263
        return byId.get(fieldId);
5264
      }
5265
 
5266
      /**
5267
       * Find the _Fields constant that matches fieldId, throwing an exception
5268
       * if it is not found.
5269
       */
5270
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5271
        _Fields fields = findByThriftId(fieldId);
5272
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5273
        return fields;
5274
      }
5275
 
5276
      /**
5277
       * Find the _Fields constant that matches name, or null if its not found.
5278
       */
5279
      public static _Fields findByName(String name) {
5280
        return byName.get(name);
5281
      }
5282
 
5283
      private final short _thriftId;
5284
      private final String _fieldName;
5285
 
5286
      _Fields(short thriftId, String fieldName) {
5287
        _thriftId = thriftId;
5288
        _fieldName = fieldName;
5289
      }
5290
 
5291
      public short getThriftFieldId() {
5292
        return _thriftId;
5293
      }
5294
 
5295
      public String getFieldName() {
5296
        return _fieldName;
5297
      }
5298
    }
5299
 
5300
    // isset id assignments
5301
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5302
    private BitSet __isset_bit_vector = new BitSet(1);
5303
 
5304
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5305
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5306
          new FieldValueMetaData(TType.I64)));
5307
    }});
5308
 
5309
    static {
5310
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5311
    }
5312
 
5313
    public getTransactionStatus_args() {
5314
    }
5315
 
5316
    public getTransactionStatus_args(
5317
      long transactionId)
5318
    {
5319
      this();
5320
      this.transactionId = transactionId;
5321
      setTransactionIdIsSet(true);
5322
    }
5323
 
5324
    /**
5325
     * Performs a deep copy on <i>other</i>.
5326
     */
5327
    public getTransactionStatus_args(getTransactionStatus_args other) {
5328
      __isset_bit_vector.clear();
5329
      __isset_bit_vector.or(other.__isset_bit_vector);
5330
      this.transactionId = other.transactionId;
5331
    }
5332
 
5333
    public getTransactionStatus_args deepCopy() {
5334
      return new getTransactionStatus_args(this);
5335
    }
5336
 
5337
    @Deprecated
5338
    public getTransactionStatus_args clone() {
5339
      return new getTransactionStatus_args(this);
5340
    }
5341
 
5342
    public long getTransactionId() {
5343
      return this.transactionId;
5344
    }
5345
 
5346
    public getTransactionStatus_args setTransactionId(long transactionId) {
5347
      this.transactionId = transactionId;
5348
      setTransactionIdIsSet(true);
5349
      return this;
5350
    }
5351
 
5352
    public void unsetTransactionId() {
5353
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5354
    }
5355
 
5356
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5357
    public boolean isSetTransactionId() {
5358
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5359
    }
5360
 
5361
    public void setTransactionIdIsSet(boolean value) {
5362
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5363
    }
5364
 
5365
    public void setFieldValue(_Fields field, Object value) {
5366
      switch (field) {
5367
      case TRANSACTION_ID:
5368
        if (value == null) {
5369
          unsetTransactionId();
5370
        } else {
5371
          setTransactionId((Long)value);
5372
        }
5373
        break;
5374
 
5375
      }
5376
    }
5377
 
5378
    public void setFieldValue(int fieldID, Object value) {
5379
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5380
    }
5381
 
5382
    public Object getFieldValue(_Fields field) {
5383
      switch (field) {
5384
      case TRANSACTION_ID:
5385
        return new Long(getTransactionId());
5386
 
5387
      }
5388
      throw new IllegalStateException();
5389
    }
5390
 
5391
    public Object getFieldValue(int fieldId) {
5392
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5393
    }
5394
 
5395
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5396
    public boolean isSet(_Fields field) {
5397
      switch (field) {
5398
      case TRANSACTION_ID:
5399
        return isSetTransactionId();
5400
      }
5401
      throw new IllegalStateException();
5402
    }
5403
 
5404
    public boolean isSet(int fieldID) {
5405
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5406
    }
5407
 
5408
    @Override
5409
    public boolean equals(Object that) {
5410
      if (that == null)
5411
        return false;
5412
      if (that instanceof getTransactionStatus_args)
5413
        return this.equals((getTransactionStatus_args)that);
5414
      return false;
5415
    }
5416
 
5417
    public boolean equals(getTransactionStatus_args that) {
5418
      if (that == null)
5419
        return false;
5420
 
5421
      boolean this_present_transactionId = true;
5422
      boolean that_present_transactionId = true;
5423
      if (this_present_transactionId || that_present_transactionId) {
5424
        if (!(this_present_transactionId && that_present_transactionId))
5425
          return false;
5426
        if (this.transactionId != that.transactionId)
5427
          return false;
5428
      }
5429
 
5430
      return true;
5431
    }
5432
 
5433
    @Override
5434
    public int hashCode() {
5435
      return 0;
5436
    }
5437
 
5438
    public int compareTo(getTransactionStatus_args other) {
5439
      if (!getClass().equals(other.getClass())) {
5440
        return getClass().getName().compareTo(other.getClass().getName());
5441
      }
5442
 
5443
      int lastComparison = 0;
5444
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5445
 
5446
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5447
      if (lastComparison != 0) {
5448
        return lastComparison;
5449
      }
5450
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5451
      if (lastComparison != 0) {
5452
        return lastComparison;
5453
      }
5454
      return 0;
5455
    }
5456
 
5457
    public void read(TProtocol iprot) throws TException {
5458
      TField field;
5459
      iprot.readStructBegin();
5460
      while (true)
5461
      {
5462
        field = iprot.readFieldBegin();
5463
        if (field.type == TType.STOP) { 
5464
          break;
5465
        }
5466
        _Fields fieldId = _Fields.findByThriftId(field.id);
5467
        if (fieldId == null) {
5468
          TProtocolUtil.skip(iprot, field.type);
5469
        } else {
5470
          switch (fieldId) {
5471
            case TRANSACTION_ID:
5472
              if (field.type == TType.I64) {
5473
                this.transactionId = iprot.readI64();
5474
                setTransactionIdIsSet(true);
5475
              } else { 
5476
                TProtocolUtil.skip(iprot, field.type);
5477
              }
5478
              break;
5479
          }
5480
          iprot.readFieldEnd();
5481
        }
5482
      }
5483
      iprot.readStructEnd();
5484
      validate();
5485
    }
5486
 
5487
    public void write(TProtocol oprot) throws TException {
5488
      validate();
5489
 
5490
      oprot.writeStructBegin(STRUCT_DESC);
5491
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5492
      oprot.writeI64(this.transactionId);
5493
      oprot.writeFieldEnd();
5494
      oprot.writeFieldStop();
5495
      oprot.writeStructEnd();
5496
    }
5497
 
5498
    @Override
5499
    public String toString() {
5500
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5501
      boolean first = true;
5502
 
5503
      sb.append("transactionId:");
5504
      sb.append(this.transactionId);
5505
      first = false;
5506
      sb.append(")");
5507
      return sb.toString();
5508
    }
5509
 
5510
    public void validate() throws TException {
5511
      // check for required fields
5512
    }
5513
 
5514
  }
5515
 
5516
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5517
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5518
 
5519
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5520
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5521
 
5522
    private TransactionStatus success;
5523
    private TransactionServiceException ex;
5524
 
5525
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5526
    public enum _Fields implements TFieldIdEnum {
5527
      /**
5528
       * 
5529
       * @see TransactionStatus
5530
       */
5531
      SUCCESS((short)0, "success"),
5532
      EX((short)1, "ex");
5533
 
5534
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5535
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5536
 
5537
      static {
5538
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5539
          byId.put((int)field._thriftId, field);
5540
          byName.put(field.getFieldName(), field);
5541
        }
5542
      }
5543
 
5544
      /**
5545
       * Find the _Fields constant that matches fieldId, or null if its not found.
5546
       */
5547
      public static _Fields findByThriftId(int fieldId) {
5548
        return byId.get(fieldId);
5549
      }
5550
 
5551
      /**
5552
       * Find the _Fields constant that matches fieldId, throwing an exception
5553
       * if it is not found.
5554
       */
5555
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5556
        _Fields fields = findByThriftId(fieldId);
5557
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5558
        return fields;
5559
      }
5560
 
5561
      /**
5562
       * Find the _Fields constant that matches name, or null if its not found.
5563
       */
5564
      public static _Fields findByName(String name) {
5565
        return byName.get(name);
5566
      }
5567
 
5568
      private final short _thriftId;
5569
      private final String _fieldName;
5570
 
5571
      _Fields(short thriftId, String fieldName) {
5572
        _thriftId = thriftId;
5573
        _fieldName = fieldName;
5574
      }
5575
 
5576
      public short getThriftFieldId() {
5577
        return _thriftId;
5578
      }
5579
 
5580
      public String getFieldName() {
5581
        return _fieldName;
5582
      }
5583
    }
5584
 
5585
    // isset id assignments
5586
 
5587
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5588
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5589
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5590
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5591
          new FieldValueMetaData(TType.STRUCT)));
5592
    }});
5593
 
5594
    static {
5595
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5596
    }
5597
 
5598
    public getTransactionStatus_result() {
5599
    }
5600
 
5601
    public getTransactionStatus_result(
5602
      TransactionStatus success,
5603
      TransactionServiceException ex)
5604
    {
5605
      this();
5606
      this.success = success;
5607
      this.ex = ex;
5608
    }
5609
 
5610
    /**
5611
     * Performs a deep copy on <i>other</i>.
5612
     */
5613
    public getTransactionStatus_result(getTransactionStatus_result other) {
5614
      if (other.isSetSuccess()) {
5615
        this.success = other.success;
5616
      }
5617
      if (other.isSetEx()) {
5618
        this.ex = new TransactionServiceException(other.ex);
5619
      }
5620
    }
5621
 
5622
    public getTransactionStatus_result deepCopy() {
5623
      return new getTransactionStatus_result(this);
5624
    }
5625
 
5626
    @Deprecated
5627
    public getTransactionStatus_result clone() {
5628
      return new getTransactionStatus_result(this);
5629
    }
5630
 
5631
    /**
5632
     * 
5633
     * @see TransactionStatus
5634
     */
5635
    public TransactionStatus getSuccess() {
5636
      return this.success;
5637
    }
5638
 
5639
    /**
5640
     * 
5641
     * @see TransactionStatus
5642
     */
5643
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5644
      this.success = success;
5645
      return this;
5646
    }
5647
 
5648
    public void unsetSuccess() {
5649
      this.success = null;
5650
    }
5651
 
5652
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5653
    public boolean isSetSuccess() {
5654
      return this.success != null;
5655
    }
5656
 
5657
    public void setSuccessIsSet(boolean value) {
5658
      if (!value) {
5659
        this.success = null;
5660
      }
5661
    }
5662
 
5663
    public TransactionServiceException getEx() {
5664
      return this.ex;
5665
    }
5666
 
5667
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5668
      this.ex = ex;
5669
      return this;
5670
    }
5671
 
5672
    public void unsetEx() {
5673
      this.ex = null;
5674
    }
5675
 
5676
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5677
    public boolean isSetEx() {
5678
      return this.ex != null;
5679
    }
5680
 
5681
    public void setExIsSet(boolean value) {
5682
      if (!value) {
5683
        this.ex = null;
5684
      }
5685
    }
5686
 
5687
    public void setFieldValue(_Fields field, Object value) {
5688
      switch (field) {
5689
      case SUCCESS:
5690
        if (value == null) {
5691
          unsetSuccess();
5692
        } else {
5693
          setSuccess((TransactionStatus)value);
5694
        }
5695
        break;
5696
 
5697
      case EX:
5698
        if (value == null) {
5699
          unsetEx();
5700
        } else {
5701
          setEx((TransactionServiceException)value);
5702
        }
5703
        break;
5704
 
5705
      }
5706
    }
5707
 
5708
    public void setFieldValue(int fieldID, Object value) {
5709
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5710
    }
5711
 
5712
    public Object getFieldValue(_Fields field) {
5713
      switch (field) {
5714
      case SUCCESS:
5715
        return getSuccess();
5716
 
5717
      case EX:
5718
        return getEx();
5719
 
5720
      }
5721
      throw new IllegalStateException();
5722
    }
5723
 
5724
    public Object getFieldValue(int fieldId) {
5725
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5726
    }
5727
 
5728
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5729
    public boolean isSet(_Fields field) {
5730
      switch (field) {
5731
      case SUCCESS:
5732
        return isSetSuccess();
5733
      case EX:
5734
        return isSetEx();
5735
      }
5736
      throw new IllegalStateException();
5737
    }
5738
 
5739
    public boolean isSet(int fieldID) {
5740
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5741
    }
5742
 
5743
    @Override
5744
    public boolean equals(Object that) {
5745
      if (that == null)
5746
        return false;
5747
      if (that instanceof getTransactionStatus_result)
5748
        return this.equals((getTransactionStatus_result)that);
5749
      return false;
5750
    }
5751
 
5752
    public boolean equals(getTransactionStatus_result that) {
5753
      if (that == null)
5754
        return false;
5755
 
5756
      boolean this_present_success = true && this.isSetSuccess();
5757
      boolean that_present_success = true && that.isSetSuccess();
5758
      if (this_present_success || that_present_success) {
5759
        if (!(this_present_success && that_present_success))
5760
          return false;
5761
        if (!this.success.equals(that.success))
5762
          return false;
5763
      }
5764
 
5765
      boolean this_present_ex = true && this.isSetEx();
5766
      boolean that_present_ex = true && that.isSetEx();
5767
      if (this_present_ex || that_present_ex) {
5768
        if (!(this_present_ex && that_present_ex))
5769
          return false;
5770
        if (!this.ex.equals(that.ex))
5771
          return false;
5772
      }
5773
 
5774
      return true;
5775
    }
5776
 
5777
    @Override
5778
    public int hashCode() {
5779
      return 0;
5780
    }
5781
 
5782
    public int compareTo(getTransactionStatus_result other) {
5783
      if (!getClass().equals(other.getClass())) {
5784
        return getClass().getName().compareTo(other.getClass().getName());
5785
      }
5786
 
5787
      int lastComparison = 0;
5788
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5789
 
5790
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5791
      if (lastComparison != 0) {
5792
        return lastComparison;
5793
      }
5794
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5795
      if (lastComparison != 0) {
5796
        return lastComparison;
5797
      }
5798
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5799
      if (lastComparison != 0) {
5800
        return lastComparison;
5801
      }
5802
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5803
      if (lastComparison != 0) {
5804
        return lastComparison;
5805
      }
5806
      return 0;
5807
    }
5808
 
5809
    public void read(TProtocol iprot) throws TException {
5810
      TField field;
5811
      iprot.readStructBegin();
5812
      while (true)
5813
      {
5814
        field = iprot.readFieldBegin();
5815
        if (field.type == TType.STOP) { 
5816
          break;
5817
        }
5818
        _Fields fieldId = _Fields.findByThriftId(field.id);
5819
        if (fieldId == null) {
5820
          TProtocolUtil.skip(iprot, field.type);
5821
        } else {
5822
          switch (fieldId) {
5823
            case SUCCESS:
5824
              if (field.type == TType.I32) {
5825
                this.success = TransactionStatus.findByValue(iprot.readI32());
5826
              } else { 
5827
                TProtocolUtil.skip(iprot, field.type);
5828
              }
5829
              break;
5830
            case EX:
5831
              if (field.type == TType.STRUCT) {
5832
                this.ex = new TransactionServiceException();
5833
                this.ex.read(iprot);
5834
              } else { 
5835
                TProtocolUtil.skip(iprot, field.type);
5836
              }
5837
              break;
5838
          }
5839
          iprot.readFieldEnd();
5840
        }
5841
      }
5842
      iprot.readStructEnd();
5843
      validate();
5844
    }
5845
 
5846
    public void write(TProtocol oprot) throws TException {
5847
      oprot.writeStructBegin(STRUCT_DESC);
5848
 
5849
      if (this.isSetSuccess()) {
5850
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5851
        oprot.writeI32(this.success.getValue());
5852
        oprot.writeFieldEnd();
5853
      } else if (this.isSetEx()) {
5854
        oprot.writeFieldBegin(EX_FIELD_DESC);
5855
        this.ex.write(oprot);
5856
        oprot.writeFieldEnd();
5857
      }
5858
      oprot.writeFieldStop();
5859
      oprot.writeStructEnd();
5860
    }
5861
 
5862
    @Override
5863
    public String toString() {
5864
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5865
      boolean first = true;
5866
 
5867
      sb.append("success:");
5868
      if (this.success == null) {
5869
        sb.append("null");
5870
      } else {
5871
        String success_name = success.name();
5872
        if (success_name != null) {
5873
          sb.append(success_name);
5874
          sb.append(" (");
5875
        }
5876
        sb.append(this.success);
5877
        if (success_name != null) {
5878
          sb.append(")");
5879
        }
5880
      }
5881
      first = false;
5882
      if (!first) sb.append(", ");
5883
      sb.append("ex:");
5884
      if (this.ex == null) {
5885
        sb.append("null");
5886
      } else {
5887
        sb.append(this.ex);
5888
      }
5889
      first = false;
5890
      sb.append(")");
5891
      return sb.toString();
5892
    }
5893
 
5894
    public void validate() throws TException {
5895
      // check for required fields
5896
    }
5897
 
5898
  }
5899
 
5900
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5901
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5902
 
5903
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5904
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5905
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5906
 
5907
    private long transactionId;
5908
    private TransactionStatus status;
5909
    private String description;
5910
 
5911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5912
    public enum _Fields implements TFieldIdEnum {
5913
      TRANSACTION_ID((short)1, "transactionId"),
5914
      /**
5915
       * 
5916
       * @see TransactionStatus
5917
       */
5918
      STATUS((short)2, "status"),
5919
      DESCRIPTION((short)3, "description");
5920
 
5921
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5922
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5923
 
5924
      static {
5925
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5926
          byId.put((int)field._thriftId, field);
5927
          byName.put(field.getFieldName(), field);
5928
        }
5929
      }
5930
 
5931
      /**
5932
       * Find the _Fields constant that matches fieldId, or null if its not found.
5933
       */
5934
      public static _Fields findByThriftId(int fieldId) {
5935
        return byId.get(fieldId);
5936
      }
5937
 
5938
      /**
5939
       * Find the _Fields constant that matches fieldId, throwing an exception
5940
       * if it is not found.
5941
       */
5942
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5943
        _Fields fields = findByThriftId(fieldId);
5944
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5945
        return fields;
5946
      }
5947
 
5948
      /**
5949
       * Find the _Fields constant that matches name, or null if its not found.
5950
       */
5951
      public static _Fields findByName(String name) {
5952
        return byName.get(name);
5953
      }
5954
 
5955
      private final short _thriftId;
5956
      private final String _fieldName;
5957
 
5958
      _Fields(short thriftId, String fieldName) {
5959
        _thriftId = thriftId;
5960
        _fieldName = fieldName;
5961
      }
5962
 
5963
      public short getThriftFieldId() {
5964
        return _thriftId;
5965
      }
5966
 
5967
      public String getFieldName() {
5968
        return _fieldName;
5969
      }
5970
    }
5971
 
5972
    // isset id assignments
5973
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5974
    private BitSet __isset_bit_vector = new BitSet(1);
5975
 
5976
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5977
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5978
          new FieldValueMetaData(TType.I64)));
5979
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5980
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5981
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
5982
          new FieldValueMetaData(TType.STRING)));
5983
    }});
5984
 
5985
    static {
5986
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
5987
    }
5988
 
5989
    public changeTransactionStatus_args() {
5990
    }
5991
 
5992
    public changeTransactionStatus_args(
5993
      long transactionId,
5994
      TransactionStatus status,
5995
      String description)
5996
    {
5997
      this();
5998
      this.transactionId = transactionId;
5999
      setTransactionIdIsSet(true);
6000
      this.status = status;
6001
      this.description = description;
6002
    }
6003
 
6004
    /**
6005
     * Performs a deep copy on <i>other</i>.
6006
     */
6007
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6008
      __isset_bit_vector.clear();
6009
      __isset_bit_vector.or(other.__isset_bit_vector);
6010
      this.transactionId = other.transactionId;
6011
      if (other.isSetStatus()) {
6012
        this.status = other.status;
6013
      }
6014
      if (other.isSetDescription()) {
6015
        this.description = other.description;
6016
      }
6017
    }
6018
 
6019
    public changeTransactionStatus_args deepCopy() {
6020
      return new changeTransactionStatus_args(this);
6021
    }
6022
 
6023
    @Deprecated
6024
    public changeTransactionStatus_args clone() {
6025
      return new changeTransactionStatus_args(this);
6026
    }
6027
 
6028
    public long getTransactionId() {
6029
      return this.transactionId;
6030
    }
6031
 
6032
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6033
      this.transactionId = transactionId;
6034
      setTransactionIdIsSet(true);
6035
      return this;
6036
    }
6037
 
6038
    public void unsetTransactionId() {
6039
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6040
    }
6041
 
6042
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6043
    public boolean isSetTransactionId() {
6044
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6045
    }
6046
 
6047
    public void setTransactionIdIsSet(boolean value) {
6048
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6049
    }
6050
 
6051
    /**
6052
     * 
6053
     * @see TransactionStatus
6054
     */
6055
    public TransactionStatus getStatus() {
6056
      return this.status;
6057
    }
6058
 
6059
    /**
6060
     * 
6061
     * @see TransactionStatus
6062
     */
6063
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6064
      this.status = status;
6065
      return this;
6066
    }
6067
 
6068
    public void unsetStatus() {
6069
      this.status = null;
6070
    }
6071
 
6072
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6073
    public boolean isSetStatus() {
6074
      return this.status != null;
6075
    }
6076
 
6077
    public void setStatusIsSet(boolean value) {
6078
      if (!value) {
6079
        this.status = null;
6080
      }
6081
    }
6082
 
6083
    public String getDescription() {
6084
      return this.description;
6085
    }
6086
 
6087
    public changeTransactionStatus_args setDescription(String description) {
6088
      this.description = description;
6089
      return this;
6090
    }
6091
 
6092
    public void unsetDescription() {
6093
      this.description = null;
6094
    }
6095
 
6096
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6097
    public boolean isSetDescription() {
6098
      return this.description != null;
6099
    }
6100
 
6101
    public void setDescriptionIsSet(boolean value) {
6102
      if (!value) {
6103
        this.description = null;
6104
      }
6105
    }
6106
 
6107
    public void setFieldValue(_Fields field, Object value) {
6108
      switch (field) {
6109
      case TRANSACTION_ID:
6110
        if (value == null) {
6111
          unsetTransactionId();
6112
        } else {
6113
          setTransactionId((Long)value);
6114
        }
6115
        break;
6116
 
6117
      case STATUS:
6118
        if (value == null) {
6119
          unsetStatus();
6120
        } else {
6121
          setStatus((TransactionStatus)value);
6122
        }
6123
        break;
6124
 
6125
      case DESCRIPTION:
6126
        if (value == null) {
6127
          unsetDescription();
6128
        } else {
6129
          setDescription((String)value);
6130
        }
6131
        break;
6132
 
6133
      }
6134
    }
6135
 
6136
    public void setFieldValue(int fieldID, Object value) {
6137
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6138
    }
6139
 
6140
    public Object getFieldValue(_Fields field) {
6141
      switch (field) {
6142
      case TRANSACTION_ID:
6143
        return new Long(getTransactionId());
6144
 
6145
      case STATUS:
6146
        return getStatus();
6147
 
6148
      case DESCRIPTION:
6149
        return getDescription();
6150
 
6151
      }
6152
      throw new IllegalStateException();
6153
    }
6154
 
6155
    public Object getFieldValue(int fieldId) {
6156
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6157
    }
6158
 
6159
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6160
    public boolean isSet(_Fields field) {
6161
      switch (field) {
6162
      case TRANSACTION_ID:
6163
        return isSetTransactionId();
6164
      case STATUS:
6165
        return isSetStatus();
6166
      case DESCRIPTION:
6167
        return isSetDescription();
6168
      }
6169
      throw new IllegalStateException();
6170
    }
6171
 
6172
    public boolean isSet(int fieldID) {
6173
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6174
    }
6175
 
6176
    @Override
6177
    public boolean equals(Object that) {
6178
      if (that == null)
6179
        return false;
6180
      if (that instanceof changeTransactionStatus_args)
6181
        return this.equals((changeTransactionStatus_args)that);
6182
      return false;
6183
    }
6184
 
6185
    public boolean equals(changeTransactionStatus_args that) {
6186
      if (that == null)
6187
        return false;
6188
 
6189
      boolean this_present_transactionId = true;
6190
      boolean that_present_transactionId = true;
6191
      if (this_present_transactionId || that_present_transactionId) {
6192
        if (!(this_present_transactionId && that_present_transactionId))
6193
          return false;
6194
        if (this.transactionId != that.transactionId)
6195
          return false;
6196
      }
6197
 
6198
      boolean this_present_status = true && this.isSetStatus();
6199
      boolean that_present_status = true && that.isSetStatus();
6200
      if (this_present_status || that_present_status) {
6201
        if (!(this_present_status && that_present_status))
6202
          return false;
6203
        if (!this.status.equals(that.status))
6204
          return false;
6205
      }
6206
 
6207
      boolean this_present_description = true && this.isSetDescription();
6208
      boolean that_present_description = true && that.isSetDescription();
6209
      if (this_present_description || that_present_description) {
6210
        if (!(this_present_description && that_present_description))
6211
          return false;
6212
        if (!this.description.equals(that.description))
6213
          return false;
6214
      }
6215
 
6216
      return true;
6217
    }
6218
 
6219
    @Override
6220
    public int hashCode() {
6221
      return 0;
6222
    }
6223
 
6224
    public int compareTo(changeTransactionStatus_args other) {
6225
      if (!getClass().equals(other.getClass())) {
6226
        return getClass().getName().compareTo(other.getClass().getName());
6227
      }
6228
 
6229
      int lastComparison = 0;
6230
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6231
 
6232
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6233
      if (lastComparison != 0) {
6234
        return lastComparison;
6235
      }
6236
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6237
      if (lastComparison != 0) {
6238
        return lastComparison;
6239
      }
6240
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6241
      if (lastComparison != 0) {
6242
        return lastComparison;
6243
      }
6244
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6245
      if (lastComparison != 0) {
6246
        return lastComparison;
6247
      }
6248
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6249
      if (lastComparison != 0) {
6250
        return lastComparison;
6251
      }
6252
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6253
      if (lastComparison != 0) {
6254
        return lastComparison;
6255
      }
6256
      return 0;
6257
    }
6258
 
6259
    public void read(TProtocol iprot) throws TException {
6260
      TField field;
6261
      iprot.readStructBegin();
6262
      while (true)
6263
      {
6264
        field = iprot.readFieldBegin();
6265
        if (field.type == TType.STOP) { 
6266
          break;
6267
        }
6268
        _Fields fieldId = _Fields.findByThriftId(field.id);
6269
        if (fieldId == null) {
6270
          TProtocolUtil.skip(iprot, field.type);
6271
        } else {
6272
          switch (fieldId) {
6273
            case TRANSACTION_ID:
6274
              if (field.type == TType.I64) {
6275
                this.transactionId = iprot.readI64();
6276
                setTransactionIdIsSet(true);
6277
              } else { 
6278
                TProtocolUtil.skip(iprot, field.type);
6279
              }
6280
              break;
6281
            case STATUS:
6282
              if (field.type == TType.I32) {
6283
                this.status = TransactionStatus.findByValue(iprot.readI32());
6284
              } else { 
6285
                TProtocolUtil.skip(iprot, field.type);
6286
              }
6287
              break;
6288
            case DESCRIPTION:
6289
              if (field.type == TType.STRING) {
6290
                this.description = iprot.readString();
6291
              } else { 
6292
                TProtocolUtil.skip(iprot, field.type);
6293
              }
6294
              break;
6295
          }
6296
          iprot.readFieldEnd();
6297
        }
6298
      }
6299
      iprot.readStructEnd();
6300
      validate();
6301
    }
6302
 
6303
    public void write(TProtocol oprot) throws TException {
6304
      validate();
6305
 
6306
      oprot.writeStructBegin(STRUCT_DESC);
6307
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6308
      oprot.writeI64(this.transactionId);
6309
      oprot.writeFieldEnd();
6310
      if (this.status != null) {
6311
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6312
        oprot.writeI32(this.status.getValue());
6313
        oprot.writeFieldEnd();
6314
      }
6315
      if (this.description != null) {
6316
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6317
        oprot.writeString(this.description);
6318
        oprot.writeFieldEnd();
6319
      }
6320
      oprot.writeFieldStop();
6321
      oprot.writeStructEnd();
6322
    }
6323
 
6324
    @Override
6325
    public String toString() {
6326
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6327
      boolean first = true;
6328
 
6329
      sb.append("transactionId:");
6330
      sb.append(this.transactionId);
6331
      first = false;
6332
      if (!first) sb.append(", ");
6333
      sb.append("status:");
6334
      if (this.status == null) {
6335
        sb.append("null");
6336
      } else {
6337
        String status_name = status.name();
6338
        if (status_name != null) {
6339
          sb.append(status_name);
6340
          sb.append(" (");
6341
        }
6342
        sb.append(this.status);
6343
        if (status_name != null) {
6344
          sb.append(")");
6345
        }
6346
      }
6347
      first = false;
6348
      if (!first) sb.append(", ");
6349
      sb.append("description:");
6350
      if (this.description == null) {
6351
        sb.append("null");
6352
      } else {
6353
        sb.append(this.description);
6354
      }
6355
      first = false;
6356
      sb.append(")");
6357
      return sb.toString();
6358
    }
6359
 
6360
    public void validate() throws TException {
6361
      // check for required fields
6362
    }
6363
 
6364
  }
6365
 
6366
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6367
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6368
 
6369
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6370
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6371
 
6372
    private boolean success;
6373
    private TransactionServiceException ex;
6374
 
6375
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6376
    public enum _Fields implements TFieldIdEnum {
6377
      SUCCESS((short)0, "success"),
6378
      EX((short)1, "ex");
6379
 
6380
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6381
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6382
 
6383
      static {
6384
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6385
          byId.put((int)field._thriftId, field);
6386
          byName.put(field.getFieldName(), field);
6387
        }
6388
      }
6389
 
6390
      /**
6391
       * Find the _Fields constant that matches fieldId, or null if its not found.
6392
       */
6393
      public static _Fields findByThriftId(int fieldId) {
6394
        return byId.get(fieldId);
6395
      }
6396
 
6397
      /**
6398
       * Find the _Fields constant that matches fieldId, throwing an exception
6399
       * if it is not found.
6400
       */
6401
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6402
        _Fields fields = findByThriftId(fieldId);
6403
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6404
        return fields;
6405
      }
6406
 
6407
      /**
6408
       * Find the _Fields constant that matches name, or null if its not found.
6409
       */
6410
      public static _Fields findByName(String name) {
6411
        return byName.get(name);
6412
      }
6413
 
6414
      private final short _thriftId;
6415
      private final String _fieldName;
6416
 
6417
      _Fields(short thriftId, String fieldName) {
6418
        _thriftId = thriftId;
6419
        _fieldName = fieldName;
6420
      }
6421
 
6422
      public short getThriftFieldId() {
6423
        return _thriftId;
6424
      }
6425
 
6426
      public String getFieldName() {
6427
        return _fieldName;
6428
      }
6429
    }
6430
 
6431
    // isset id assignments
6432
    private static final int __SUCCESS_ISSET_ID = 0;
6433
    private BitSet __isset_bit_vector = new BitSet(1);
6434
 
6435
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6436
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6437
          new FieldValueMetaData(TType.BOOL)));
6438
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6439
          new FieldValueMetaData(TType.STRUCT)));
6440
    }});
6441
 
6442
    static {
6443
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6444
    }
6445
 
6446
    public changeTransactionStatus_result() {
6447
    }
6448
 
6449
    public changeTransactionStatus_result(
6450
      boolean success,
6451
      TransactionServiceException ex)
6452
    {
6453
      this();
6454
      this.success = success;
6455
      setSuccessIsSet(true);
6456
      this.ex = ex;
6457
    }
6458
 
6459
    /**
6460
     * Performs a deep copy on <i>other</i>.
6461
     */
6462
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6463
      __isset_bit_vector.clear();
6464
      __isset_bit_vector.or(other.__isset_bit_vector);
6465
      this.success = other.success;
6466
      if (other.isSetEx()) {
6467
        this.ex = new TransactionServiceException(other.ex);
6468
      }
6469
    }
6470
 
6471
    public changeTransactionStatus_result deepCopy() {
6472
      return new changeTransactionStatus_result(this);
6473
    }
6474
 
6475
    @Deprecated
6476
    public changeTransactionStatus_result clone() {
6477
      return new changeTransactionStatus_result(this);
6478
    }
6479
 
6480
    public boolean isSuccess() {
6481
      return this.success;
6482
    }
6483
 
6484
    public changeTransactionStatus_result setSuccess(boolean success) {
6485
      this.success = success;
6486
      setSuccessIsSet(true);
6487
      return this;
6488
    }
6489
 
6490
    public void unsetSuccess() {
6491
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6492
    }
6493
 
6494
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6495
    public boolean isSetSuccess() {
6496
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6497
    }
6498
 
6499
    public void setSuccessIsSet(boolean value) {
6500
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6501
    }
6502
 
6503
    public TransactionServiceException getEx() {
6504
      return this.ex;
6505
    }
6506
 
6507
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6508
      this.ex = ex;
6509
      return this;
6510
    }
6511
 
6512
    public void unsetEx() {
6513
      this.ex = null;
6514
    }
6515
 
6516
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6517
    public boolean isSetEx() {
6518
      return this.ex != null;
6519
    }
6520
 
6521
    public void setExIsSet(boolean value) {
6522
      if (!value) {
6523
        this.ex = null;
6524
      }
6525
    }
6526
 
6527
    public void setFieldValue(_Fields field, Object value) {
6528
      switch (field) {
6529
      case SUCCESS:
6530
        if (value == null) {
6531
          unsetSuccess();
6532
        } else {
6533
          setSuccess((Boolean)value);
6534
        }
6535
        break;
6536
 
6537
      case EX:
6538
        if (value == null) {
6539
          unsetEx();
6540
        } else {
6541
          setEx((TransactionServiceException)value);
6542
        }
6543
        break;
6544
 
6545
      }
6546
    }
6547
 
6548
    public void setFieldValue(int fieldID, Object value) {
6549
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6550
    }
6551
 
6552
    public Object getFieldValue(_Fields field) {
6553
      switch (field) {
6554
      case SUCCESS:
6555
        return new Boolean(isSuccess());
6556
 
6557
      case EX:
6558
        return getEx();
6559
 
6560
      }
6561
      throw new IllegalStateException();
6562
    }
6563
 
6564
    public Object getFieldValue(int fieldId) {
6565
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6566
    }
6567
 
6568
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6569
    public boolean isSet(_Fields field) {
6570
      switch (field) {
6571
      case SUCCESS:
6572
        return isSetSuccess();
6573
      case EX:
6574
        return isSetEx();
6575
      }
6576
      throw new IllegalStateException();
6577
    }
6578
 
6579
    public boolean isSet(int fieldID) {
6580
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6581
    }
6582
 
6583
    @Override
6584
    public boolean equals(Object that) {
6585
      if (that == null)
6586
        return false;
6587
      if (that instanceof changeTransactionStatus_result)
6588
        return this.equals((changeTransactionStatus_result)that);
6589
      return false;
6590
    }
6591
 
6592
    public boolean equals(changeTransactionStatus_result that) {
6593
      if (that == null)
6594
        return false;
6595
 
6596
      boolean this_present_success = true;
6597
      boolean that_present_success = true;
6598
      if (this_present_success || that_present_success) {
6599
        if (!(this_present_success && that_present_success))
6600
          return false;
6601
        if (this.success != that.success)
6602
          return false;
6603
      }
6604
 
6605
      boolean this_present_ex = true && this.isSetEx();
6606
      boolean that_present_ex = true && that.isSetEx();
6607
      if (this_present_ex || that_present_ex) {
6608
        if (!(this_present_ex && that_present_ex))
6609
          return false;
6610
        if (!this.ex.equals(that.ex))
6611
          return false;
6612
      }
6613
 
6614
      return true;
6615
    }
6616
 
6617
    @Override
6618
    public int hashCode() {
6619
      return 0;
6620
    }
6621
 
6622
    public int compareTo(changeTransactionStatus_result other) {
6623
      if (!getClass().equals(other.getClass())) {
6624
        return getClass().getName().compareTo(other.getClass().getName());
6625
      }
6626
 
6627
      int lastComparison = 0;
6628
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6629
 
6630
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6631
      if (lastComparison != 0) {
6632
        return lastComparison;
6633
      }
6634
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6635
      if (lastComparison != 0) {
6636
        return lastComparison;
6637
      }
6638
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6639
      if (lastComparison != 0) {
6640
        return lastComparison;
6641
      }
6642
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6643
      if (lastComparison != 0) {
6644
        return lastComparison;
6645
      }
6646
      return 0;
6647
    }
6648
 
6649
    public void read(TProtocol iprot) throws TException {
6650
      TField field;
6651
      iprot.readStructBegin();
6652
      while (true)
6653
      {
6654
        field = iprot.readFieldBegin();
6655
        if (field.type == TType.STOP) { 
6656
          break;
6657
        }
6658
        _Fields fieldId = _Fields.findByThriftId(field.id);
6659
        if (fieldId == null) {
6660
          TProtocolUtil.skip(iprot, field.type);
6661
        } else {
6662
          switch (fieldId) {
6663
            case SUCCESS:
6664
              if (field.type == TType.BOOL) {
6665
                this.success = iprot.readBool();
6666
                setSuccessIsSet(true);
6667
              } else { 
6668
                TProtocolUtil.skip(iprot, field.type);
6669
              }
6670
              break;
6671
            case EX:
6672
              if (field.type == TType.STRUCT) {
6673
                this.ex = new TransactionServiceException();
6674
                this.ex.read(iprot);
6675
              } else { 
6676
                TProtocolUtil.skip(iprot, field.type);
6677
              }
6678
              break;
6679
          }
6680
          iprot.readFieldEnd();
6681
        }
6682
      }
6683
      iprot.readStructEnd();
6684
      validate();
6685
    }
6686
 
6687
    public void write(TProtocol oprot) throws TException {
6688
      oprot.writeStructBegin(STRUCT_DESC);
6689
 
6690
      if (this.isSetSuccess()) {
6691
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6692
        oprot.writeBool(this.success);
6693
        oprot.writeFieldEnd();
6694
      } else if (this.isSetEx()) {
6695
        oprot.writeFieldBegin(EX_FIELD_DESC);
6696
        this.ex.write(oprot);
6697
        oprot.writeFieldEnd();
6698
      }
6699
      oprot.writeFieldStop();
6700
      oprot.writeStructEnd();
6701
    }
6702
 
6703
    @Override
6704
    public String toString() {
6705
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6706
      boolean first = true;
6707
 
6708
      sb.append("success:");
6709
      sb.append(this.success);
6710
      first = false;
6711
      if (!first) sb.append(", ");
6712
      sb.append("ex:");
6713
      if (this.ex == null) {
6714
        sb.append("null");
6715
      } else {
6716
        sb.append(this.ex);
6717
      }
6718
      first = false;
6719
      sb.append(")");
6720
      return sb.toString();
6721
    }
6722
 
6723
    public void validate() throws TException {
6724
      // check for required fields
6725
    }
6726
 
6727
  }
6728
 
483 rajveer 6729
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6730
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6731
 
483 rajveer 6732
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6733
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6734
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6735
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6736
 
483 rajveer 6737
    private OrderStatus status;
6738
    private long from_date;
6739
    private long to_date;
6740
    private long warehouse_id;
68 ashish 6741
 
6742
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6743
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6744
      /**
6745
       * 
6746
       * @see OrderStatus
6747
       */
6748
      STATUS((short)1, "status"),
6749
      FROM_DATE((short)2, "from_date"),
6750
      TO_DATE((short)3, "to_date"),
6751
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6752
 
6753
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6754
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6755
 
6756
      static {
6757
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6758
          byId.put((int)field._thriftId, field);
6759
          byName.put(field.getFieldName(), field);
6760
        }
6761
      }
6762
 
6763
      /**
6764
       * Find the _Fields constant that matches fieldId, or null if its not found.
6765
       */
6766
      public static _Fields findByThriftId(int fieldId) {
6767
        return byId.get(fieldId);
6768
      }
6769
 
6770
      /**
6771
       * Find the _Fields constant that matches fieldId, throwing an exception
6772
       * if it is not found.
6773
       */
6774
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6775
        _Fields fields = findByThriftId(fieldId);
6776
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6777
        return fields;
6778
      }
6779
 
6780
      /**
6781
       * Find the _Fields constant that matches name, or null if its not found.
6782
       */
6783
      public static _Fields findByName(String name) {
6784
        return byName.get(name);
6785
      }
6786
 
6787
      private final short _thriftId;
6788
      private final String _fieldName;
6789
 
6790
      _Fields(short thriftId, String fieldName) {
6791
        _thriftId = thriftId;
6792
        _fieldName = fieldName;
6793
      }
6794
 
6795
      public short getThriftFieldId() {
6796
        return _thriftId;
6797
      }
6798
 
6799
      public String getFieldName() {
6800
        return _fieldName;
6801
      }
6802
    }
6803
 
6804
    // isset id assignments
483 rajveer 6805
    private static final int __FROM_DATE_ISSET_ID = 0;
6806
    private static final int __TO_DATE_ISSET_ID = 1;
6807
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6808
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6809
 
6810
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6811
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6812
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6813
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6814
          new FieldValueMetaData(TType.I64)));
483 rajveer 6815
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6816
          new FieldValueMetaData(TType.I64)));
6817
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6818
          new FieldValueMetaData(TType.I64)));
68 ashish 6819
    }});
6820
 
6821
    static {
483 rajveer 6822
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6823
    }
6824
 
483 rajveer 6825
    public getAllOrders_args() {
68 ashish 6826
    }
6827
 
483 rajveer 6828
    public getAllOrders_args(
6829
      OrderStatus status,
6830
      long from_date,
6831
      long to_date,
6832
      long warehouse_id)
68 ashish 6833
    {
6834
      this();
483 rajveer 6835
      this.status = status;
6836
      this.from_date = from_date;
6837
      setFrom_dateIsSet(true);
6838
      this.to_date = to_date;
6839
      setTo_dateIsSet(true);
6840
      this.warehouse_id = warehouse_id;
6841
      setWarehouse_idIsSet(true);
68 ashish 6842
    }
6843
 
6844
    /**
6845
     * Performs a deep copy on <i>other</i>.
6846
     */
483 rajveer 6847
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6848
      __isset_bit_vector.clear();
6849
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6850
      if (other.isSetStatus()) {
6851
        this.status = other.status;
6852
      }
6853
      this.from_date = other.from_date;
6854
      this.to_date = other.to_date;
6855
      this.warehouse_id = other.warehouse_id;
68 ashish 6856
    }
6857
 
483 rajveer 6858
    public getAllOrders_args deepCopy() {
6859
      return new getAllOrders_args(this);
68 ashish 6860
    }
6861
 
6862
    @Deprecated
483 rajveer 6863
    public getAllOrders_args clone() {
6864
      return new getAllOrders_args(this);
68 ashish 6865
    }
6866
 
483 rajveer 6867
    /**
6868
     * 
6869
     * @see OrderStatus
6870
     */
6871
    public OrderStatus getStatus() {
6872
      return this.status;
68 ashish 6873
    }
6874
 
483 rajveer 6875
    /**
6876
     * 
6877
     * @see OrderStatus
6878
     */
6879
    public getAllOrders_args setStatus(OrderStatus status) {
6880
      this.status = status;
68 ashish 6881
      return this;
6882
    }
6883
 
483 rajveer 6884
    public void unsetStatus() {
6885
      this.status = null;
68 ashish 6886
    }
6887
 
483 rajveer 6888
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6889
    public boolean isSetStatus() {
6890
      return this.status != null;
68 ashish 6891
    }
6892
 
483 rajveer 6893
    public void setStatusIsSet(boolean value) {
6894
      if (!value) {
6895
        this.status = null;
68 ashish 6896
      }
6897
    }
6898
 
483 rajveer 6899
    public long getFrom_date() {
6900
      return this.from_date;
68 ashish 6901
    }
6902
 
483 rajveer 6903
    public getAllOrders_args setFrom_date(long from_date) {
6904
      this.from_date = from_date;
6905
      setFrom_dateIsSet(true);
6906
      return this;
68 ashish 6907
    }
6908
 
483 rajveer 6909
    public void unsetFrom_date() {
6910
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6911
    }
6912
 
483 rajveer 6913
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6914
    public boolean isSetFrom_date() {
6915
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6916
    }
6917
 
483 rajveer 6918
    public void setFrom_dateIsSet(boolean value) {
6919
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6920
    }
6921
 
483 rajveer 6922
    public long getTo_date() {
6923
      return this.to_date;
68 ashish 6924
    }
6925
 
483 rajveer 6926
    public getAllOrders_args setTo_date(long to_date) {
6927
      this.to_date = to_date;
6928
      setTo_dateIsSet(true);
68 ashish 6929
      return this;
6930
    }
6931
 
483 rajveer 6932
    public void unsetTo_date() {
6933
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 6934
    }
6935
 
483 rajveer 6936
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
6937
    public boolean isSetTo_date() {
6938
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 6939
    }
6940
 
483 rajveer 6941
    public void setTo_dateIsSet(boolean value) {
6942
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 6943
    }
6944
 
483 rajveer 6945
    public long getWarehouse_id() {
6946
      return this.warehouse_id;
68 ashish 6947
    }
6948
 
483 rajveer 6949
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
6950
      this.warehouse_id = warehouse_id;
6951
      setWarehouse_idIsSet(true);
68 ashish 6952
      return this;
6953
    }
6954
 
483 rajveer 6955
    public void unsetWarehouse_id() {
6956
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6957
    }
6958
 
483 rajveer 6959
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
6960
    public boolean isSetWarehouse_id() {
6961
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6962
    }
6963
 
483 rajveer 6964
    public void setWarehouse_idIsSet(boolean value) {
6965
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 6966
    }
6967
 
6968
    public void setFieldValue(_Fields field, Object value) {
6969
      switch (field) {
483 rajveer 6970
      case STATUS:
68 ashish 6971
        if (value == null) {
483 rajveer 6972
          unsetStatus();
68 ashish 6973
        } else {
483 rajveer 6974
          setStatus((OrderStatus)value);
68 ashish 6975
        }
6976
        break;
6977
 
483 rajveer 6978
      case FROM_DATE:
68 ashish 6979
        if (value == null) {
483 rajveer 6980
          unsetFrom_date();
68 ashish 6981
        } else {
483 rajveer 6982
          setFrom_date((Long)value);
68 ashish 6983
        }
6984
        break;
6985
 
483 rajveer 6986
      case TO_DATE:
6987
        if (value == null) {
6988
          unsetTo_date();
6989
        } else {
6990
          setTo_date((Long)value);
6991
        }
6992
        break;
6993
 
6994
      case WAREHOUSE_ID:
6995
        if (value == null) {
6996
          unsetWarehouse_id();
6997
        } else {
6998
          setWarehouse_id((Long)value);
6999
        }
7000
        break;
7001
 
68 ashish 7002
      }
7003
    }
7004
 
7005
    public void setFieldValue(int fieldID, Object value) {
7006
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7007
    }
7008
 
7009
    public Object getFieldValue(_Fields field) {
7010
      switch (field) {
483 rajveer 7011
      case STATUS:
7012
        return getStatus();
68 ashish 7013
 
483 rajveer 7014
      case FROM_DATE:
7015
        return new Long(getFrom_date());
68 ashish 7016
 
483 rajveer 7017
      case TO_DATE:
7018
        return new Long(getTo_date());
7019
 
7020
      case WAREHOUSE_ID:
7021
        return new Long(getWarehouse_id());
7022
 
68 ashish 7023
      }
7024
      throw new IllegalStateException();
7025
    }
7026
 
7027
    public Object getFieldValue(int fieldId) {
7028
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7029
    }
7030
 
7031
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7032
    public boolean isSet(_Fields field) {
7033
      switch (field) {
483 rajveer 7034
      case STATUS:
7035
        return isSetStatus();
7036
      case FROM_DATE:
7037
        return isSetFrom_date();
7038
      case TO_DATE:
7039
        return isSetTo_date();
7040
      case WAREHOUSE_ID:
7041
        return isSetWarehouse_id();
68 ashish 7042
      }
7043
      throw new IllegalStateException();
7044
    }
7045
 
7046
    public boolean isSet(int fieldID) {
7047
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7048
    }
7049
 
7050
    @Override
7051
    public boolean equals(Object that) {
7052
      if (that == null)
7053
        return false;
483 rajveer 7054
      if (that instanceof getAllOrders_args)
7055
        return this.equals((getAllOrders_args)that);
68 ashish 7056
      return false;
7057
    }
7058
 
483 rajveer 7059
    public boolean equals(getAllOrders_args that) {
68 ashish 7060
      if (that == null)
7061
        return false;
7062
 
483 rajveer 7063
      boolean this_present_status = true && this.isSetStatus();
7064
      boolean that_present_status = true && that.isSetStatus();
7065
      if (this_present_status || that_present_status) {
7066
        if (!(this_present_status && that_present_status))
68 ashish 7067
          return false;
483 rajveer 7068
        if (!this.status.equals(that.status))
68 ashish 7069
          return false;
7070
      }
7071
 
483 rajveer 7072
      boolean this_present_from_date = true;
7073
      boolean that_present_from_date = true;
7074
      if (this_present_from_date || that_present_from_date) {
7075
        if (!(this_present_from_date && that_present_from_date))
68 ashish 7076
          return false;
483 rajveer 7077
        if (this.from_date != that.from_date)
68 ashish 7078
          return false;
7079
      }
7080
 
483 rajveer 7081
      boolean this_present_to_date = true;
7082
      boolean that_present_to_date = true;
7083
      if (this_present_to_date || that_present_to_date) {
7084
        if (!(this_present_to_date && that_present_to_date))
7085
          return false;
7086
        if (this.to_date != that.to_date)
7087
          return false;
68 ashish 7088
      }
7089
 
483 rajveer 7090
      boolean this_present_warehouse_id = true;
7091
      boolean that_present_warehouse_id = true;
7092
      if (this_present_warehouse_id || that_present_warehouse_id) {
7093
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 7094
          return false;
483 rajveer 7095
        if (this.warehouse_id != that.warehouse_id)
68 ashish 7096
          return false;
7097
      }
7098
 
7099
      return true;
7100
    }
7101
 
7102
    @Override
7103
    public int hashCode() {
7104
      return 0;
7105
    }
7106
 
483 rajveer 7107
    public int compareTo(getAllOrders_args other) {
68 ashish 7108
      if (!getClass().equals(other.getClass())) {
7109
        return getClass().getName().compareTo(other.getClass().getName());
7110
      }
7111
 
7112
      int lastComparison = 0;
483 rajveer 7113
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 7114
 
483 rajveer 7115
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 7116
      if (lastComparison != 0) {
7117
        return lastComparison;
7118
      }
483 rajveer 7119
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 7120
      if (lastComparison != 0) {
7121
        return lastComparison;
7122
      }
483 rajveer 7123
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
7124
      if (lastComparison != 0) {
7125
        return lastComparison;
7126
      }
7127
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
7128
      if (lastComparison != 0) {
7129
        return lastComparison;
7130
      }
7131
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
7132
      if (lastComparison != 0) {
7133
        return lastComparison;
7134
      }
7135
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
7136
      if (lastComparison != 0) {
7137
        return lastComparison;
7138
      }
7139
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
7140
      if (lastComparison != 0) {
7141
        return lastComparison;
7142
      }
7143
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
7144
      if (lastComparison != 0) {
7145
        return lastComparison;
7146
      }
68 ashish 7147
      return 0;
7148
    }
7149
 
7150
    public void read(TProtocol iprot) throws TException {
7151
      TField field;
7152
      iprot.readStructBegin();
7153
      while (true)
7154
      {
7155
        field = iprot.readFieldBegin();
7156
        if (field.type == TType.STOP) { 
7157
          break;
7158
        }
7159
        _Fields fieldId = _Fields.findByThriftId(field.id);
7160
        if (fieldId == null) {
7161
          TProtocolUtil.skip(iprot, field.type);
7162
        } else {
7163
          switch (fieldId) {
483 rajveer 7164
            case STATUS:
7165
              if (field.type == TType.I32) {
7166
                this.status = OrderStatus.findByValue(iprot.readI32());
7167
              } else { 
7168
                TProtocolUtil.skip(iprot, field.type);
7169
              }
7170
              break;
7171
            case FROM_DATE:
68 ashish 7172
              if (field.type == TType.I64) {
483 rajveer 7173
                this.from_date = iprot.readI64();
7174
                setFrom_dateIsSet(true);
68 ashish 7175
              } else { 
7176
                TProtocolUtil.skip(iprot, field.type);
7177
              }
7178
              break;
483 rajveer 7179
            case TO_DATE:
7180
              if (field.type == TType.I64) {
7181
                this.to_date = iprot.readI64();
7182
                setTo_dateIsSet(true);
7183
              } else { 
7184
                TProtocolUtil.skip(iprot, field.type);
7185
              }
7186
              break;
7187
            case WAREHOUSE_ID:
7188
              if (field.type == TType.I64) {
7189
                this.warehouse_id = iprot.readI64();
7190
                setWarehouse_idIsSet(true);
7191
              } else { 
7192
                TProtocolUtil.skip(iprot, field.type);
7193
              }
7194
              break;
68 ashish 7195
          }
7196
          iprot.readFieldEnd();
7197
        }
7198
      }
7199
      iprot.readStructEnd();
7200
      validate();
7201
    }
7202
 
7203
    public void write(TProtocol oprot) throws TException {
7204
      validate();
7205
 
7206
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 7207
      if (this.status != null) {
7208
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7209
        oprot.writeI32(this.status.getValue());
7210
        oprot.writeFieldEnd();
7211
      }
7212
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
7213
      oprot.writeI64(this.from_date);
68 ashish 7214
      oprot.writeFieldEnd();
483 rajveer 7215
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
7216
      oprot.writeI64(this.to_date);
7217
      oprot.writeFieldEnd();
7218
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7219
      oprot.writeI64(this.warehouse_id);
7220
      oprot.writeFieldEnd();
68 ashish 7221
      oprot.writeFieldStop();
7222
      oprot.writeStructEnd();
7223
    }
7224
 
7225
    @Override
7226
    public String toString() {
483 rajveer 7227
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 7228
      boolean first = true;
7229
 
483 rajveer 7230
      sb.append("status:");
7231
      if (this.status == null) {
7232
        sb.append("null");
7233
      } else {
7234
        String status_name = status.name();
7235
        if (status_name != null) {
7236
          sb.append(status_name);
7237
          sb.append(" (");
7238
        }
7239
        sb.append(this.status);
7240
        if (status_name != null) {
7241
          sb.append(")");
7242
        }
7243
      }
68 ashish 7244
      first = false;
483 rajveer 7245
      if (!first) sb.append(", ");
7246
      sb.append("from_date:");
7247
      sb.append(this.from_date);
7248
      first = false;
7249
      if (!first) sb.append(", ");
7250
      sb.append("to_date:");
7251
      sb.append(this.to_date);
7252
      first = false;
7253
      if (!first) sb.append(", ");
7254
      sb.append("warehouse_id:");
7255
      sb.append(this.warehouse_id);
7256
      first = false;
68 ashish 7257
      sb.append(")");
7258
      return sb.toString();
7259
    }
7260
 
7261
    public void validate() throws TException {
7262
      // check for required fields
7263
    }
7264
 
7265
  }
7266
 
483 rajveer 7267
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
7268
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 7269
 
483 rajveer 7270
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 7271
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7272
 
483 rajveer 7273
    private List<Order> success;
68 ashish 7274
    private TransactionServiceException ex;
7275
 
7276
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7277
    public enum _Fields implements TFieldIdEnum {
7278
      SUCCESS((short)0, "success"),
7279
      EX((short)1, "ex");
7280
 
7281
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7282
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7283
 
7284
      static {
7285
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7286
          byId.put((int)field._thriftId, field);
7287
          byName.put(field.getFieldName(), field);
7288
        }
7289
      }
7290
 
7291
      /**
7292
       * Find the _Fields constant that matches fieldId, or null if its not found.
7293
       */
7294
      public static _Fields findByThriftId(int fieldId) {
7295
        return byId.get(fieldId);
7296
      }
7297
 
7298
      /**
7299
       * Find the _Fields constant that matches fieldId, throwing an exception
7300
       * if it is not found.
7301
       */
7302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7303
        _Fields fields = findByThriftId(fieldId);
7304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7305
        return fields;
7306
      }
7307
 
7308
      /**
7309
       * Find the _Fields constant that matches name, or null if its not found.
7310
       */
7311
      public static _Fields findByName(String name) {
7312
        return byName.get(name);
7313
      }
7314
 
7315
      private final short _thriftId;
7316
      private final String _fieldName;
7317
 
7318
      _Fields(short thriftId, String fieldName) {
7319
        _thriftId = thriftId;
7320
        _fieldName = fieldName;
7321
      }
7322
 
7323
      public short getThriftFieldId() {
7324
        return _thriftId;
7325
      }
7326
 
7327
      public String getFieldName() {
7328
        return _fieldName;
7329
      }
7330
    }
7331
 
7332
    // isset id assignments
7333
 
7334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7335
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 7336
          new ListMetaData(TType.LIST, 
7337
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 7338
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7339
          new FieldValueMetaData(TType.STRUCT)));
7340
    }});
7341
 
7342
    static {
483 rajveer 7343
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 7344
    }
7345
 
483 rajveer 7346
    public getAllOrders_result() {
68 ashish 7347
    }
7348
 
483 rajveer 7349
    public getAllOrders_result(
7350
      List<Order> success,
68 ashish 7351
      TransactionServiceException ex)
7352
    {
7353
      this();
7354
      this.success = success;
7355
      this.ex = ex;
7356
    }
7357
 
7358
    /**
7359
     * Performs a deep copy on <i>other</i>.
7360
     */
483 rajveer 7361
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 7362
      if (other.isSetSuccess()) {
483 rajveer 7363
        List<Order> __this__success = new ArrayList<Order>();
7364
        for (Order other_element : other.success) {
7365
          __this__success.add(new Order(other_element));
7366
        }
7367
        this.success = __this__success;
68 ashish 7368
      }
7369
      if (other.isSetEx()) {
7370
        this.ex = new TransactionServiceException(other.ex);
7371
      }
7372
    }
7373
 
483 rajveer 7374
    public getAllOrders_result deepCopy() {
7375
      return new getAllOrders_result(this);
68 ashish 7376
    }
7377
 
7378
    @Deprecated
483 rajveer 7379
    public getAllOrders_result clone() {
7380
      return new getAllOrders_result(this);
68 ashish 7381
    }
7382
 
483 rajveer 7383
    public int getSuccessSize() {
7384
      return (this.success == null) ? 0 : this.success.size();
7385
    }
7386
 
7387
    public java.util.Iterator<Order> getSuccessIterator() {
7388
      return (this.success == null) ? null : this.success.iterator();
7389
    }
7390
 
7391
    public void addToSuccess(Order elem) {
7392
      if (this.success == null) {
7393
        this.success = new ArrayList<Order>();
7394
      }
7395
      this.success.add(elem);
7396
    }
7397
 
7398
    public List<Order> getSuccess() {
68 ashish 7399
      return this.success;
7400
    }
7401
 
483 rajveer 7402
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 7403
      this.success = success;
7404
      return this;
7405
    }
7406
 
7407
    public void unsetSuccess() {
7408
      this.success = null;
7409
    }
7410
 
7411
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7412
    public boolean isSetSuccess() {
7413
      return this.success != null;
7414
    }
7415
 
7416
    public void setSuccessIsSet(boolean value) {
7417
      if (!value) {
7418
        this.success = null;
7419
      }
7420
    }
7421
 
7422
    public TransactionServiceException getEx() {
7423
      return this.ex;
7424
    }
7425
 
483 rajveer 7426
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 7427
      this.ex = ex;
7428
      return this;
7429
    }
7430
 
7431
    public void unsetEx() {
7432
      this.ex = null;
7433
    }
7434
 
7435
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7436
    public boolean isSetEx() {
7437
      return this.ex != null;
7438
    }
7439
 
7440
    public void setExIsSet(boolean value) {
7441
      if (!value) {
7442
        this.ex = null;
7443
      }
7444
    }
7445
 
7446
    public void setFieldValue(_Fields field, Object value) {
7447
      switch (field) {
7448
      case SUCCESS:
7449
        if (value == null) {
7450
          unsetSuccess();
7451
        } else {
483 rajveer 7452
          setSuccess((List<Order>)value);
68 ashish 7453
        }
7454
        break;
7455
 
7456
      case EX:
7457
        if (value == null) {
7458
          unsetEx();
7459
        } else {
7460
          setEx((TransactionServiceException)value);
7461
        }
7462
        break;
7463
 
7464
      }
7465
    }
7466
 
7467
    public void setFieldValue(int fieldID, Object value) {
7468
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7469
    }
7470
 
7471
    public Object getFieldValue(_Fields field) {
7472
      switch (field) {
7473
      case SUCCESS:
7474
        return getSuccess();
7475
 
7476
      case EX:
7477
        return getEx();
7478
 
7479
      }
7480
      throw new IllegalStateException();
7481
    }
7482
 
7483
    public Object getFieldValue(int fieldId) {
7484
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7485
    }
7486
 
7487
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7488
    public boolean isSet(_Fields field) {
7489
      switch (field) {
7490
      case SUCCESS:
7491
        return isSetSuccess();
7492
      case EX:
7493
        return isSetEx();
7494
      }
7495
      throw new IllegalStateException();
7496
    }
7497
 
7498
    public boolean isSet(int fieldID) {
7499
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7500
    }
7501
 
7502
    @Override
7503
    public boolean equals(Object that) {
7504
      if (that == null)
7505
        return false;
483 rajveer 7506
      if (that instanceof getAllOrders_result)
7507
        return this.equals((getAllOrders_result)that);
68 ashish 7508
      return false;
7509
    }
7510
 
483 rajveer 7511
    public boolean equals(getAllOrders_result that) {
68 ashish 7512
      if (that == null)
7513
        return false;
7514
 
7515
      boolean this_present_success = true && this.isSetSuccess();
7516
      boolean that_present_success = true && that.isSetSuccess();
7517
      if (this_present_success || that_present_success) {
7518
        if (!(this_present_success && that_present_success))
7519
          return false;
7520
        if (!this.success.equals(that.success))
7521
          return false;
7522
      }
7523
 
7524
      boolean this_present_ex = true && this.isSetEx();
7525
      boolean that_present_ex = true && that.isSetEx();
7526
      if (this_present_ex || that_present_ex) {
7527
        if (!(this_present_ex && that_present_ex))
7528
          return false;
7529
        if (!this.ex.equals(that.ex))
7530
          return false;
7531
      }
7532
 
7533
      return true;
7534
    }
7535
 
7536
    @Override
7537
    public int hashCode() {
7538
      return 0;
7539
    }
7540
 
483 rajveer 7541
    public int compareTo(getAllOrders_result other) {
7542
      if (!getClass().equals(other.getClass())) {
7543
        return getClass().getName().compareTo(other.getClass().getName());
7544
      }
7545
 
7546
      int lastComparison = 0;
7547
      getAllOrders_result typedOther = (getAllOrders_result)other;
7548
 
7549
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7550
      if (lastComparison != 0) {
7551
        return lastComparison;
7552
      }
7553
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7554
      if (lastComparison != 0) {
7555
        return lastComparison;
7556
      }
7557
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7558
      if (lastComparison != 0) {
7559
        return lastComparison;
7560
      }
7561
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7562
      if (lastComparison != 0) {
7563
        return lastComparison;
7564
      }
7565
      return 0;
7566
    }
7567
 
68 ashish 7568
    public void read(TProtocol iprot) throws TException {
7569
      TField field;
7570
      iprot.readStructBegin();
7571
      while (true)
7572
      {
7573
        field = iprot.readFieldBegin();
7574
        if (field.type == TType.STOP) { 
7575
          break;
7576
        }
7577
        _Fields fieldId = _Fields.findByThriftId(field.id);
7578
        if (fieldId == null) {
7579
          TProtocolUtil.skip(iprot, field.type);
7580
        } else {
7581
          switch (fieldId) {
7582
            case SUCCESS:
483 rajveer 7583
              if (field.type == TType.LIST) {
7584
                {
684 chandransh 7585
                  TList _list16 = iprot.readListBegin();
7586
                  this.success = new ArrayList<Order>(_list16.size);
7587
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7588
                  {
684 chandransh 7589
                    Order _elem18;
7590
                    _elem18 = new Order();
7591
                    _elem18.read(iprot);
7592
                    this.success.add(_elem18);
483 rajveer 7593
                  }
7594
                  iprot.readListEnd();
7595
                }
68 ashish 7596
              } else { 
7597
                TProtocolUtil.skip(iprot, field.type);
7598
              }
7599
              break;
7600
            case EX:
7601
              if (field.type == TType.STRUCT) {
7602
                this.ex = new TransactionServiceException();
7603
                this.ex.read(iprot);
7604
              } else { 
7605
                TProtocolUtil.skip(iprot, field.type);
7606
              }
7607
              break;
7608
          }
7609
          iprot.readFieldEnd();
7610
        }
7611
      }
7612
      iprot.readStructEnd();
7613
      validate();
7614
    }
7615
 
7616
    public void write(TProtocol oprot) throws TException {
7617
      oprot.writeStructBegin(STRUCT_DESC);
7618
 
7619
      if (this.isSetSuccess()) {
7620
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7621
        {
7622
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7623
          for (Order _iter19 : this.success)
483 rajveer 7624
          {
684 chandransh 7625
            _iter19.write(oprot);
483 rajveer 7626
          }
7627
          oprot.writeListEnd();
7628
        }
68 ashish 7629
        oprot.writeFieldEnd();
7630
      } else if (this.isSetEx()) {
7631
        oprot.writeFieldBegin(EX_FIELD_DESC);
7632
        this.ex.write(oprot);
7633
        oprot.writeFieldEnd();
7634
      }
7635
      oprot.writeFieldStop();
7636
      oprot.writeStructEnd();
7637
    }
7638
 
7639
    @Override
7640
    public String toString() {
483 rajveer 7641
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7642
      boolean first = true;
7643
 
7644
      sb.append("success:");
7645
      if (this.success == null) {
7646
        sb.append("null");
7647
      } else {
7648
        sb.append(this.success);
7649
      }
7650
      first = false;
7651
      if (!first) sb.append(", ");
7652
      sb.append("ex:");
7653
      if (this.ex == null) {
7654
        sb.append("null");
7655
      } else {
7656
        sb.append(this.ex);
7657
      }
7658
      first = false;
7659
      sb.append(")");
7660
      return sb.toString();
7661
    }
7662
 
7663
    public void validate() throws TException {
7664
      // check for required fields
7665
    }
7666
 
7667
  }
7668
 
1022 varun.gupt 7669
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
7670
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
7671
 
7672
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7673
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
7674
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
7675
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
7676
 
7677
    private OrderStatus status;
7678
    private long start_billing_date;
7679
    private long end_billing_date;
7680
    private long warehouse_id;
7681
 
7682
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7683
    public enum _Fields implements TFieldIdEnum {
7684
      /**
7685
       * 
7686
       * @see OrderStatus
7687
       */
7688
      STATUS((short)1, "status"),
7689
      START_BILLING_DATE((short)2, "start_billing_date"),
7690
      END_BILLING_DATE((short)3, "end_billing_date"),
7691
      WAREHOUSE_ID((short)4, "warehouse_id");
7692
 
7693
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7694
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7695
 
7696
      static {
7697
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7698
          byId.put((int)field._thriftId, field);
7699
          byName.put(field.getFieldName(), field);
7700
        }
7701
      }
7702
 
7703
      /**
7704
       * Find the _Fields constant that matches fieldId, or null if its not found.
7705
       */
7706
      public static _Fields findByThriftId(int fieldId) {
7707
        return byId.get(fieldId);
7708
      }
7709
 
7710
      /**
7711
       * Find the _Fields constant that matches fieldId, throwing an exception
7712
       * if it is not found.
7713
       */
7714
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7715
        _Fields fields = findByThriftId(fieldId);
7716
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7717
        return fields;
7718
      }
7719
 
7720
      /**
7721
       * Find the _Fields constant that matches name, or null if its not found.
7722
       */
7723
      public static _Fields findByName(String name) {
7724
        return byName.get(name);
7725
      }
7726
 
7727
      private final short _thriftId;
7728
      private final String _fieldName;
7729
 
7730
      _Fields(short thriftId, String fieldName) {
7731
        _thriftId = thriftId;
7732
        _fieldName = fieldName;
7733
      }
7734
 
7735
      public short getThriftFieldId() {
7736
        return _thriftId;
7737
      }
7738
 
7739
      public String getFieldName() {
7740
        return _fieldName;
7741
      }
7742
    }
7743
 
7744
    // isset id assignments
7745
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
7746
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
7747
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7748
    private BitSet __isset_bit_vector = new BitSet(3);
7749
 
7750
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7751
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7752
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7753
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
7754
          new FieldValueMetaData(TType.I64)));
7755
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
7756
          new FieldValueMetaData(TType.I64)));
7757
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7758
          new FieldValueMetaData(TType.I64)));
7759
    }});
7760
 
7761
    static {
7762
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
7763
    }
7764
 
7765
    public getOrdersByBillingDate_args() {
7766
    }
7767
 
7768
    public getOrdersByBillingDate_args(
7769
      OrderStatus status,
7770
      long start_billing_date,
7771
      long end_billing_date,
7772
      long warehouse_id)
7773
    {
7774
      this();
7775
      this.status = status;
7776
      this.start_billing_date = start_billing_date;
7777
      setStart_billing_dateIsSet(true);
7778
      this.end_billing_date = end_billing_date;
7779
      setEnd_billing_dateIsSet(true);
7780
      this.warehouse_id = warehouse_id;
7781
      setWarehouse_idIsSet(true);
7782
    }
7783
 
7784
    /**
7785
     * Performs a deep copy on <i>other</i>.
7786
     */
7787
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
7788
      __isset_bit_vector.clear();
7789
      __isset_bit_vector.or(other.__isset_bit_vector);
7790
      if (other.isSetStatus()) {
7791
        this.status = other.status;
7792
      }
7793
      this.start_billing_date = other.start_billing_date;
7794
      this.end_billing_date = other.end_billing_date;
7795
      this.warehouse_id = other.warehouse_id;
7796
    }
7797
 
7798
    public getOrdersByBillingDate_args deepCopy() {
7799
      return new getOrdersByBillingDate_args(this);
7800
    }
7801
 
7802
    @Deprecated
7803
    public getOrdersByBillingDate_args clone() {
7804
      return new getOrdersByBillingDate_args(this);
7805
    }
7806
 
7807
    /**
7808
     * 
7809
     * @see OrderStatus
7810
     */
7811
    public OrderStatus getStatus() {
7812
      return this.status;
7813
    }
7814
 
7815
    /**
7816
     * 
7817
     * @see OrderStatus
7818
     */
7819
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
7820
      this.status = status;
7821
      return this;
7822
    }
7823
 
7824
    public void unsetStatus() {
7825
      this.status = null;
7826
    }
7827
 
7828
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7829
    public boolean isSetStatus() {
7830
      return this.status != null;
7831
    }
7832
 
7833
    public void setStatusIsSet(boolean value) {
7834
      if (!value) {
7835
        this.status = null;
7836
      }
7837
    }
7838
 
7839
    public long getStart_billing_date() {
7840
      return this.start_billing_date;
7841
    }
7842
 
7843
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
7844
      this.start_billing_date = start_billing_date;
7845
      setStart_billing_dateIsSet(true);
7846
      return this;
7847
    }
7848
 
7849
    public void unsetStart_billing_date() {
7850
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
7851
    }
7852
 
7853
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
7854
    public boolean isSetStart_billing_date() {
7855
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
7856
    }
7857
 
7858
    public void setStart_billing_dateIsSet(boolean value) {
7859
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
7860
    }
7861
 
7862
    public long getEnd_billing_date() {
7863
      return this.end_billing_date;
7864
    }
7865
 
7866
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
7867
      this.end_billing_date = end_billing_date;
7868
      setEnd_billing_dateIsSet(true);
7869
      return this;
7870
    }
7871
 
7872
    public void unsetEnd_billing_date() {
7873
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
7874
    }
7875
 
7876
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
7877
    public boolean isSetEnd_billing_date() {
7878
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
7879
    }
7880
 
7881
    public void setEnd_billing_dateIsSet(boolean value) {
7882
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
7883
    }
7884
 
7885
    public long getWarehouse_id() {
7886
      return this.warehouse_id;
7887
    }
7888
 
7889
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
7890
      this.warehouse_id = warehouse_id;
7891
      setWarehouse_idIsSet(true);
7892
      return this;
7893
    }
7894
 
7895
    public void unsetWarehouse_id() {
7896
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
7897
    }
7898
 
7899
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7900
    public boolean isSetWarehouse_id() {
7901
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
7902
    }
7903
 
7904
    public void setWarehouse_idIsSet(boolean value) {
7905
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
7906
    }
7907
 
7908
    public void setFieldValue(_Fields field, Object value) {
7909
      switch (field) {
7910
      case STATUS:
7911
        if (value == null) {
7912
          unsetStatus();
7913
        } else {
7914
          setStatus((OrderStatus)value);
7915
        }
7916
        break;
7917
 
7918
      case START_BILLING_DATE:
7919
        if (value == null) {
7920
          unsetStart_billing_date();
7921
        } else {
7922
          setStart_billing_date((Long)value);
7923
        }
7924
        break;
7925
 
7926
      case END_BILLING_DATE:
7927
        if (value == null) {
7928
          unsetEnd_billing_date();
7929
        } else {
7930
          setEnd_billing_date((Long)value);
7931
        }
7932
        break;
7933
 
7934
      case WAREHOUSE_ID:
7935
        if (value == null) {
7936
          unsetWarehouse_id();
7937
        } else {
7938
          setWarehouse_id((Long)value);
7939
        }
7940
        break;
7941
 
7942
      }
7943
    }
7944
 
7945
    public void setFieldValue(int fieldID, Object value) {
7946
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7947
    }
7948
 
7949
    public Object getFieldValue(_Fields field) {
7950
      switch (field) {
7951
      case STATUS:
7952
        return getStatus();
7953
 
7954
      case START_BILLING_DATE:
7955
        return new Long(getStart_billing_date());
7956
 
7957
      case END_BILLING_DATE:
7958
        return new Long(getEnd_billing_date());
7959
 
7960
      case WAREHOUSE_ID:
7961
        return new Long(getWarehouse_id());
7962
 
7963
      }
7964
      throw new IllegalStateException();
7965
    }
7966
 
7967
    public Object getFieldValue(int fieldId) {
7968
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7969
    }
7970
 
7971
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7972
    public boolean isSet(_Fields field) {
7973
      switch (field) {
7974
      case STATUS:
7975
        return isSetStatus();
7976
      case START_BILLING_DATE:
7977
        return isSetStart_billing_date();
7978
      case END_BILLING_DATE:
7979
        return isSetEnd_billing_date();
7980
      case WAREHOUSE_ID:
7981
        return isSetWarehouse_id();
7982
      }
7983
      throw new IllegalStateException();
7984
    }
7985
 
7986
    public boolean isSet(int fieldID) {
7987
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7988
    }
7989
 
7990
    @Override
7991
    public boolean equals(Object that) {
7992
      if (that == null)
7993
        return false;
7994
      if (that instanceof getOrdersByBillingDate_args)
7995
        return this.equals((getOrdersByBillingDate_args)that);
7996
      return false;
7997
    }
7998
 
7999
    public boolean equals(getOrdersByBillingDate_args that) {
8000
      if (that == null)
8001
        return false;
8002
 
8003
      boolean this_present_status = true && this.isSetStatus();
8004
      boolean that_present_status = true && that.isSetStatus();
8005
      if (this_present_status || that_present_status) {
8006
        if (!(this_present_status && that_present_status))
8007
          return false;
8008
        if (!this.status.equals(that.status))
8009
          return false;
8010
      }
8011
 
8012
      boolean this_present_start_billing_date = true;
8013
      boolean that_present_start_billing_date = true;
8014
      if (this_present_start_billing_date || that_present_start_billing_date) {
8015
        if (!(this_present_start_billing_date && that_present_start_billing_date))
8016
          return false;
8017
        if (this.start_billing_date != that.start_billing_date)
8018
          return false;
8019
      }
8020
 
8021
      boolean this_present_end_billing_date = true;
8022
      boolean that_present_end_billing_date = true;
8023
      if (this_present_end_billing_date || that_present_end_billing_date) {
8024
        if (!(this_present_end_billing_date && that_present_end_billing_date))
8025
          return false;
8026
        if (this.end_billing_date != that.end_billing_date)
8027
          return false;
8028
      }
8029
 
8030
      boolean this_present_warehouse_id = true;
8031
      boolean that_present_warehouse_id = true;
8032
      if (this_present_warehouse_id || that_present_warehouse_id) {
8033
        if (!(this_present_warehouse_id && that_present_warehouse_id))
8034
          return false;
8035
        if (this.warehouse_id != that.warehouse_id)
8036
          return false;
8037
      }
8038
 
8039
      return true;
8040
    }
8041
 
8042
    @Override
8043
    public int hashCode() {
8044
      return 0;
8045
    }
8046
 
8047
    public int compareTo(getOrdersByBillingDate_args other) {
8048
      if (!getClass().equals(other.getClass())) {
8049
        return getClass().getName().compareTo(other.getClass().getName());
8050
      }
8051
 
8052
      int lastComparison = 0;
8053
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
8054
 
8055
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8056
      if (lastComparison != 0) {
8057
        return lastComparison;
8058
      }
8059
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8060
      if (lastComparison != 0) {
8061
        return lastComparison;
8062
      }
8063
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
8064
      if (lastComparison != 0) {
8065
        return lastComparison;
8066
      }
8067
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
8068
      if (lastComparison != 0) {
8069
        return lastComparison;
8070
      }
8071
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
8072
      if (lastComparison != 0) {
8073
        return lastComparison;
8074
      }
8075
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
8076
      if (lastComparison != 0) {
8077
        return lastComparison;
8078
      }
8079
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8080
      if (lastComparison != 0) {
8081
        return lastComparison;
8082
      }
8083
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8084
      if (lastComparison != 0) {
8085
        return lastComparison;
8086
      }
8087
      return 0;
8088
    }
8089
 
8090
    public void read(TProtocol iprot) throws TException {
8091
      TField field;
8092
      iprot.readStructBegin();
8093
      while (true)
8094
      {
8095
        field = iprot.readFieldBegin();
8096
        if (field.type == TType.STOP) { 
8097
          break;
8098
        }
8099
        _Fields fieldId = _Fields.findByThriftId(field.id);
8100
        if (fieldId == null) {
8101
          TProtocolUtil.skip(iprot, field.type);
8102
        } else {
8103
          switch (fieldId) {
8104
            case STATUS:
8105
              if (field.type == TType.I32) {
8106
                this.status = OrderStatus.findByValue(iprot.readI32());
8107
              } else { 
8108
                TProtocolUtil.skip(iprot, field.type);
8109
              }
8110
              break;
8111
            case START_BILLING_DATE:
8112
              if (field.type == TType.I64) {
8113
                this.start_billing_date = iprot.readI64();
8114
                setStart_billing_dateIsSet(true);
8115
              } else { 
8116
                TProtocolUtil.skip(iprot, field.type);
8117
              }
8118
              break;
8119
            case END_BILLING_DATE:
8120
              if (field.type == TType.I64) {
8121
                this.end_billing_date = iprot.readI64();
8122
                setEnd_billing_dateIsSet(true);
8123
              } else { 
8124
                TProtocolUtil.skip(iprot, field.type);
8125
              }
8126
              break;
8127
            case WAREHOUSE_ID:
8128
              if (field.type == TType.I64) {
8129
                this.warehouse_id = iprot.readI64();
8130
                setWarehouse_idIsSet(true);
8131
              } else { 
8132
                TProtocolUtil.skip(iprot, field.type);
8133
              }
8134
              break;
8135
          }
8136
          iprot.readFieldEnd();
8137
        }
8138
      }
8139
      iprot.readStructEnd();
8140
      validate();
8141
    }
8142
 
8143
    public void write(TProtocol oprot) throws TException {
8144
      validate();
8145
 
8146
      oprot.writeStructBegin(STRUCT_DESC);
8147
      if (this.status != null) {
8148
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8149
        oprot.writeI32(this.status.getValue());
8150
        oprot.writeFieldEnd();
8151
      }
8152
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
8153
      oprot.writeI64(this.start_billing_date);
8154
      oprot.writeFieldEnd();
8155
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
8156
      oprot.writeI64(this.end_billing_date);
8157
      oprot.writeFieldEnd();
8158
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8159
      oprot.writeI64(this.warehouse_id);
8160
      oprot.writeFieldEnd();
8161
      oprot.writeFieldStop();
8162
      oprot.writeStructEnd();
8163
    }
8164
 
8165
    @Override
8166
    public String toString() {
8167
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
8168
      boolean first = true;
8169
 
8170
      sb.append("status:");
8171
      if (this.status == null) {
8172
        sb.append("null");
8173
      } else {
8174
        String status_name = status.name();
8175
        if (status_name != null) {
8176
          sb.append(status_name);
8177
          sb.append(" (");
8178
        }
8179
        sb.append(this.status);
8180
        if (status_name != null) {
8181
          sb.append(")");
8182
        }
8183
      }
8184
      first = false;
8185
      if (!first) sb.append(", ");
8186
      sb.append("start_billing_date:");
8187
      sb.append(this.start_billing_date);
8188
      first = false;
8189
      if (!first) sb.append(", ");
8190
      sb.append("end_billing_date:");
8191
      sb.append(this.end_billing_date);
8192
      first = false;
8193
      if (!first) sb.append(", ");
8194
      sb.append("warehouse_id:");
8195
      sb.append(this.warehouse_id);
8196
      first = false;
8197
      sb.append(")");
8198
      return sb.toString();
8199
    }
8200
 
8201
    public void validate() throws TException {
8202
      // check for required fields
8203
    }
8204
 
8205
  }
8206
 
8207
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
8208
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
8209
 
8210
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
8211
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8212
 
8213
    private List<Order> success;
8214
    private TransactionServiceException ex;
8215
 
8216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8217
    public enum _Fields implements TFieldIdEnum {
8218
      SUCCESS((short)0, "success"),
8219
      EX((short)1, "ex");
8220
 
8221
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8222
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8223
 
8224
      static {
8225
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8226
          byId.put((int)field._thriftId, field);
8227
          byName.put(field.getFieldName(), field);
8228
        }
8229
      }
8230
 
8231
      /**
8232
       * Find the _Fields constant that matches fieldId, or null if its not found.
8233
       */
8234
      public static _Fields findByThriftId(int fieldId) {
8235
        return byId.get(fieldId);
8236
      }
8237
 
8238
      /**
8239
       * Find the _Fields constant that matches fieldId, throwing an exception
8240
       * if it is not found.
8241
       */
8242
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8243
        _Fields fields = findByThriftId(fieldId);
8244
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8245
        return fields;
8246
      }
8247
 
8248
      /**
8249
       * Find the _Fields constant that matches name, or null if its not found.
8250
       */
8251
      public static _Fields findByName(String name) {
8252
        return byName.get(name);
8253
      }
8254
 
8255
      private final short _thriftId;
8256
      private final String _fieldName;
8257
 
8258
      _Fields(short thriftId, String fieldName) {
8259
        _thriftId = thriftId;
8260
        _fieldName = fieldName;
8261
      }
8262
 
8263
      public short getThriftFieldId() {
8264
        return _thriftId;
8265
      }
8266
 
8267
      public String getFieldName() {
8268
        return _fieldName;
8269
      }
8270
    }
8271
 
8272
    // isset id assignments
8273
 
8274
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8275
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8276
          new ListMetaData(TType.LIST, 
8277
              new StructMetaData(TType.STRUCT, Order.class))));
8278
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8279
          new FieldValueMetaData(TType.STRUCT)));
8280
    }});
8281
 
8282
    static {
8283
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
8284
    }
8285
 
8286
    public getOrdersByBillingDate_result() {
8287
    }
8288
 
8289
    public getOrdersByBillingDate_result(
8290
      List<Order> success,
8291
      TransactionServiceException ex)
8292
    {
8293
      this();
8294
      this.success = success;
8295
      this.ex = ex;
8296
    }
8297
 
8298
    /**
8299
     * Performs a deep copy on <i>other</i>.
8300
     */
8301
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
8302
      if (other.isSetSuccess()) {
8303
        List<Order> __this__success = new ArrayList<Order>();
8304
        for (Order other_element : other.success) {
8305
          __this__success.add(new Order(other_element));
8306
        }
8307
        this.success = __this__success;
8308
      }
8309
      if (other.isSetEx()) {
8310
        this.ex = new TransactionServiceException(other.ex);
8311
      }
8312
    }
8313
 
8314
    public getOrdersByBillingDate_result deepCopy() {
8315
      return new getOrdersByBillingDate_result(this);
8316
    }
8317
 
8318
    @Deprecated
8319
    public getOrdersByBillingDate_result clone() {
8320
      return new getOrdersByBillingDate_result(this);
8321
    }
8322
 
8323
    public int getSuccessSize() {
8324
      return (this.success == null) ? 0 : this.success.size();
8325
    }
8326
 
8327
    public java.util.Iterator<Order> getSuccessIterator() {
8328
      return (this.success == null) ? null : this.success.iterator();
8329
    }
8330
 
8331
    public void addToSuccess(Order elem) {
8332
      if (this.success == null) {
8333
        this.success = new ArrayList<Order>();
8334
      }
8335
      this.success.add(elem);
8336
    }
8337
 
8338
    public List<Order> getSuccess() {
8339
      return this.success;
8340
    }
8341
 
8342
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
8343
      this.success = success;
8344
      return this;
8345
    }
8346
 
8347
    public void unsetSuccess() {
8348
      this.success = null;
8349
    }
8350
 
8351
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8352
    public boolean isSetSuccess() {
8353
      return this.success != null;
8354
    }
8355
 
8356
    public void setSuccessIsSet(boolean value) {
8357
      if (!value) {
8358
        this.success = null;
8359
      }
8360
    }
8361
 
8362
    public TransactionServiceException getEx() {
8363
      return this.ex;
8364
    }
8365
 
8366
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
8367
      this.ex = ex;
8368
      return this;
8369
    }
8370
 
8371
    public void unsetEx() {
8372
      this.ex = null;
8373
    }
8374
 
8375
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8376
    public boolean isSetEx() {
8377
      return this.ex != null;
8378
    }
8379
 
8380
    public void setExIsSet(boolean value) {
8381
      if (!value) {
8382
        this.ex = null;
8383
      }
8384
    }
8385
 
8386
    public void setFieldValue(_Fields field, Object value) {
8387
      switch (field) {
8388
      case SUCCESS:
8389
        if (value == null) {
8390
          unsetSuccess();
8391
        } else {
8392
          setSuccess((List<Order>)value);
8393
        }
8394
        break;
8395
 
8396
      case EX:
8397
        if (value == null) {
8398
          unsetEx();
8399
        } else {
8400
          setEx((TransactionServiceException)value);
8401
        }
8402
        break;
8403
 
8404
      }
8405
    }
8406
 
8407
    public void setFieldValue(int fieldID, Object value) {
8408
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8409
    }
8410
 
8411
    public Object getFieldValue(_Fields field) {
8412
      switch (field) {
8413
      case SUCCESS:
8414
        return getSuccess();
8415
 
8416
      case EX:
8417
        return getEx();
8418
 
8419
      }
8420
      throw new IllegalStateException();
8421
    }
8422
 
8423
    public Object getFieldValue(int fieldId) {
8424
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8425
    }
8426
 
8427
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8428
    public boolean isSet(_Fields field) {
8429
      switch (field) {
8430
      case SUCCESS:
8431
        return isSetSuccess();
8432
      case EX:
8433
        return isSetEx();
8434
      }
8435
      throw new IllegalStateException();
8436
    }
8437
 
8438
    public boolean isSet(int fieldID) {
8439
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8440
    }
8441
 
8442
    @Override
8443
    public boolean equals(Object that) {
8444
      if (that == null)
8445
        return false;
8446
      if (that instanceof getOrdersByBillingDate_result)
8447
        return this.equals((getOrdersByBillingDate_result)that);
8448
      return false;
8449
    }
8450
 
8451
    public boolean equals(getOrdersByBillingDate_result that) {
8452
      if (that == null)
8453
        return false;
8454
 
8455
      boolean this_present_success = true && this.isSetSuccess();
8456
      boolean that_present_success = true && that.isSetSuccess();
8457
      if (this_present_success || that_present_success) {
8458
        if (!(this_present_success && that_present_success))
8459
          return false;
8460
        if (!this.success.equals(that.success))
8461
          return false;
8462
      }
8463
 
8464
      boolean this_present_ex = true && this.isSetEx();
8465
      boolean that_present_ex = true && that.isSetEx();
8466
      if (this_present_ex || that_present_ex) {
8467
        if (!(this_present_ex && that_present_ex))
8468
          return false;
8469
        if (!this.ex.equals(that.ex))
8470
          return false;
8471
      }
8472
 
8473
      return true;
8474
    }
8475
 
8476
    @Override
8477
    public int hashCode() {
8478
      return 0;
8479
    }
8480
 
8481
    public int compareTo(getOrdersByBillingDate_result other) {
8482
      if (!getClass().equals(other.getClass())) {
8483
        return getClass().getName().compareTo(other.getClass().getName());
8484
      }
8485
 
8486
      int lastComparison = 0;
8487
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
8488
 
8489
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8490
      if (lastComparison != 0) {
8491
        return lastComparison;
8492
      }
8493
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8494
      if (lastComparison != 0) {
8495
        return lastComparison;
8496
      }
8497
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8498
      if (lastComparison != 0) {
8499
        return lastComparison;
8500
      }
8501
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8502
      if (lastComparison != 0) {
8503
        return lastComparison;
8504
      }
8505
      return 0;
8506
    }
8507
 
8508
    public void read(TProtocol iprot) throws TException {
8509
      TField field;
8510
      iprot.readStructBegin();
8511
      while (true)
8512
      {
8513
        field = iprot.readFieldBegin();
8514
        if (field.type == TType.STOP) { 
8515
          break;
8516
        }
8517
        _Fields fieldId = _Fields.findByThriftId(field.id);
8518
        if (fieldId == null) {
8519
          TProtocolUtil.skip(iprot, field.type);
8520
        } else {
8521
          switch (fieldId) {
8522
            case SUCCESS:
8523
              if (field.type == TType.LIST) {
8524
                {
8525
                  TList _list20 = iprot.readListBegin();
8526
                  this.success = new ArrayList<Order>(_list20.size);
8527
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
8528
                  {
8529
                    Order _elem22;
8530
                    _elem22 = new Order();
8531
                    _elem22.read(iprot);
8532
                    this.success.add(_elem22);
8533
                  }
8534
                  iprot.readListEnd();
8535
                }
8536
              } else { 
8537
                TProtocolUtil.skip(iprot, field.type);
8538
              }
8539
              break;
8540
            case EX:
8541
              if (field.type == TType.STRUCT) {
8542
                this.ex = new TransactionServiceException();
8543
                this.ex.read(iprot);
8544
              } else { 
8545
                TProtocolUtil.skip(iprot, field.type);
8546
              }
8547
              break;
8548
          }
8549
          iprot.readFieldEnd();
8550
        }
8551
      }
8552
      iprot.readStructEnd();
8553
      validate();
8554
    }
8555
 
8556
    public void write(TProtocol oprot) throws TException {
8557
      oprot.writeStructBegin(STRUCT_DESC);
8558
 
8559
      if (this.isSetSuccess()) {
8560
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8561
        {
8562
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
8563
          for (Order _iter23 : this.success)
8564
          {
8565
            _iter23.write(oprot);
8566
          }
8567
          oprot.writeListEnd();
8568
        }
8569
        oprot.writeFieldEnd();
8570
      } else if (this.isSetEx()) {
8571
        oprot.writeFieldBegin(EX_FIELD_DESC);
8572
        this.ex.write(oprot);
8573
        oprot.writeFieldEnd();
8574
      }
8575
      oprot.writeFieldStop();
8576
      oprot.writeStructEnd();
8577
    }
8578
 
8579
    @Override
8580
    public String toString() {
8581
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
8582
      boolean first = true;
8583
 
8584
      sb.append("success:");
8585
      if (this.success == null) {
8586
        sb.append("null");
8587
      } else {
8588
        sb.append(this.success);
8589
      }
8590
      first = false;
8591
      if (!first) sb.append(", ");
8592
      sb.append("ex:");
8593
      if (this.ex == null) {
8594
        sb.append("null");
8595
      } else {
8596
        sb.append(this.ex);
8597
      }
8598
      first = false;
8599
      sb.append(")");
8600
      return sb.toString();
8601
    }
8602
 
8603
    public void validate() throws TException {
8604
      // check for required fields
8605
    }
8606
 
8607
  }
8608
 
483 rajveer 8609
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
8610
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 8611
 
483 rajveer 8612
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8613
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
8614
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 8615
 
483 rajveer 8616
    private long orderId;
8617
    private OrderStatus status;
8618
    private String description;
68 ashish 8619
 
8620
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8621
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8622
      ORDER_ID((short)1, "orderId"),
8623
      /**
8624
       * 
8625
       * @see OrderStatus
8626
       */
8627
      STATUS((short)2, "status"),
8628
      DESCRIPTION((short)3, "description");
68 ashish 8629
 
8630
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8631
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8632
 
8633
      static {
8634
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8635
          byId.put((int)field._thriftId, field);
8636
          byName.put(field.getFieldName(), field);
8637
        }
8638
      }
8639
 
8640
      /**
8641
       * Find the _Fields constant that matches fieldId, or null if its not found.
8642
       */
8643
      public static _Fields findByThriftId(int fieldId) {
8644
        return byId.get(fieldId);
8645
      }
8646
 
8647
      /**
8648
       * Find the _Fields constant that matches fieldId, throwing an exception
8649
       * if it is not found.
8650
       */
8651
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8652
        _Fields fields = findByThriftId(fieldId);
8653
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8654
        return fields;
8655
      }
8656
 
8657
      /**
8658
       * Find the _Fields constant that matches name, or null if its not found.
8659
       */
8660
      public static _Fields findByName(String name) {
8661
        return byName.get(name);
8662
      }
8663
 
8664
      private final short _thriftId;
8665
      private final String _fieldName;
8666
 
8667
      _Fields(short thriftId, String fieldName) {
8668
        _thriftId = thriftId;
8669
        _fieldName = fieldName;
8670
      }
8671
 
8672
      public short getThriftFieldId() {
8673
        return _thriftId;
8674
      }
8675
 
8676
      public String getFieldName() {
8677
        return _fieldName;
8678
      }
8679
    }
8680
 
8681
    // isset id assignments
483 rajveer 8682
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 8683
    private BitSet __isset_bit_vector = new BitSet(1);
8684
 
8685
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8686
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 8687
          new FieldValueMetaData(TType.I64)));
483 rajveer 8688
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8689
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8690
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
8691
          new FieldValueMetaData(TType.STRING)));
68 ashish 8692
    }});
8693
 
8694
    static {
483 rajveer 8695
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 8696
    }
8697
 
483 rajveer 8698
    public changeOrderStatus_args() {
68 ashish 8699
    }
8700
 
483 rajveer 8701
    public changeOrderStatus_args(
8702
      long orderId,
8703
      OrderStatus status,
8704
      String description)
68 ashish 8705
    {
8706
      this();
483 rajveer 8707
      this.orderId = orderId;
8708
      setOrderIdIsSet(true);
8709
      this.status = status;
8710
      this.description = description;
68 ashish 8711
    }
8712
 
8713
    /**
8714
     * Performs a deep copy on <i>other</i>.
8715
     */
483 rajveer 8716
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 8717
      __isset_bit_vector.clear();
8718
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8719
      this.orderId = other.orderId;
8720
      if (other.isSetStatus()) {
8721
        this.status = other.status;
8722
      }
8723
      if (other.isSetDescription()) {
8724
        this.description = other.description;
8725
      }
68 ashish 8726
    }
8727
 
483 rajveer 8728
    public changeOrderStatus_args deepCopy() {
8729
      return new changeOrderStatus_args(this);
68 ashish 8730
    }
8731
 
8732
    @Deprecated
483 rajveer 8733
    public changeOrderStatus_args clone() {
8734
      return new changeOrderStatus_args(this);
68 ashish 8735
    }
8736
 
483 rajveer 8737
    public long getOrderId() {
8738
      return this.orderId;
68 ashish 8739
    }
8740
 
483 rajveer 8741
    public changeOrderStatus_args setOrderId(long orderId) {
8742
      this.orderId = orderId;
8743
      setOrderIdIsSet(true);
68 ashish 8744
      return this;
8745
    }
8746
 
483 rajveer 8747
    public void unsetOrderId() {
8748
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 8749
    }
8750
 
483 rajveer 8751
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8752
    public boolean isSetOrderId() {
8753
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 8754
    }
8755
 
483 rajveer 8756
    public void setOrderIdIsSet(boolean value) {
8757
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 8758
    }
8759
 
483 rajveer 8760
    /**
8761
     * 
8762
     * @see OrderStatus
8763
     */
8764
    public OrderStatus getStatus() {
8765
      return this.status;
68 ashish 8766
    }
8767
 
8768
    /**
483 rajveer 8769
     * 
8770
     * @see OrderStatus
68 ashish 8771
     */
483 rajveer 8772
    public changeOrderStatus_args setStatus(OrderStatus status) {
8773
      this.status = status;
68 ashish 8774
      return this;
8775
    }
8776
 
483 rajveer 8777
    public void unsetStatus() {
8778
      this.status = null;
68 ashish 8779
    }
8780
 
483 rajveer 8781
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8782
    public boolean isSetStatus() {
8783
      return this.status != null;
68 ashish 8784
    }
8785
 
483 rajveer 8786
    public void setStatusIsSet(boolean value) {
68 ashish 8787
      if (!value) {
483 rajveer 8788
        this.status = null;
68 ashish 8789
      }
8790
    }
8791
 
483 rajveer 8792
    public String getDescription() {
8793
      return this.description;
68 ashish 8794
    }
8795
 
483 rajveer 8796
    public changeOrderStatus_args setDescription(String description) {
8797
      this.description = description;
68 ashish 8798
      return this;
8799
    }
8800
 
483 rajveer 8801
    public void unsetDescription() {
8802
      this.description = null;
68 ashish 8803
    }
8804
 
483 rajveer 8805
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
8806
    public boolean isSetDescription() {
8807
      return this.description != null;
68 ashish 8808
    }
8809
 
483 rajveer 8810
    public void setDescriptionIsSet(boolean value) {
68 ashish 8811
      if (!value) {
483 rajveer 8812
        this.description = null;
68 ashish 8813
      }
8814
    }
8815
 
8816
    public void setFieldValue(_Fields field, Object value) {
8817
      switch (field) {
483 rajveer 8818
      case ORDER_ID:
68 ashish 8819
        if (value == null) {
483 rajveer 8820
          unsetOrderId();
68 ashish 8821
        } else {
483 rajveer 8822
          setOrderId((Long)value);
68 ashish 8823
        }
8824
        break;
8825
 
483 rajveer 8826
      case STATUS:
68 ashish 8827
        if (value == null) {
483 rajveer 8828
          unsetStatus();
68 ashish 8829
        } else {
483 rajveer 8830
          setStatus((OrderStatus)value);
68 ashish 8831
        }
8832
        break;
8833
 
483 rajveer 8834
      case DESCRIPTION:
8835
        if (value == null) {
8836
          unsetDescription();
8837
        } else {
8838
          setDescription((String)value);
8839
        }
8840
        break;
8841
 
68 ashish 8842
      }
8843
    }
8844
 
8845
    public void setFieldValue(int fieldID, Object value) {
8846
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8847
    }
8848
 
8849
    public Object getFieldValue(_Fields field) {
8850
      switch (field) {
483 rajveer 8851
      case ORDER_ID:
8852
        return new Long(getOrderId());
68 ashish 8853
 
483 rajveer 8854
      case STATUS:
8855
        return getStatus();
68 ashish 8856
 
483 rajveer 8857
      case DESCRIPTION:
8858
        return getDescription();
8859
 
68 ashish 8860
      }
8861
      throw new IllegalStateException();
8862
    }
8863
 
8864
    public Object getFieldValue(int fieldId) {
8865
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8866
    }
8867
 
8868
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8869
    public boolean isSet(_Fields field) {
8870
      switch (field) {
483 rajveer 8871
      case ORDER_ID:
8872
        return isSetOrderId();
8873
      case STATUS:
8874
        return isSetStatus();
8875
      case DESCRIPTION:
8876
        return isSetDescription();
68 ashish 8877
      }
8878
      throw new IllegalStateException();
8879
    }
8880
 
8881
    public boolean isSet(int fieldID) {
8882
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8883
    }
8884
 
8885
    @Override
8886
    public boolean equals(Object that) {
8887
      if (that == null)
8888
        return false;
483 rajveer 8889
      if (that instanceof changeOrderStatus_args)
8890
        return this.equals((changeOrderStatus_args)that);
68 ashish 8891
      return false;
8892
    }
8893
 
483 rajveer 8894
    public boolean equals(changeOrderStatus_args that) {
68 ashish 8895
      if (that == null)
8896
        return false;
8897
 
483 rajveer 8898
      boolean this_present_orderId = true;
8899
      boolean that_present_orderId = true;
8900
      if (this_present_orderId || that_present_orderId) {
8901
        if (!(this_present_orderId && that_present_orderId))
68 ashish 8902
          return false;
483 rajveer 8903
        if (this.orderId != that.orderId)
68 ashish 8904
          return false;
8905
      }
8906
 
483 rajveer 8907
      boolean this_present_status = true && this.isSetStatus();
8908
      boolean that_present_status = true && that.isSetStatus();
8909
      if (this_present_status || that_present_status) {
8910
        if (!(this_present_status && that_present_status))
68 ashish 8911
          return false;
483 rajveer 8912
        if (!this.status.equals(that.status))
68 ashish 8913
          return false;
8914
      }
8915
 
483 rajveer 8916
      boolean this_present_description = true && this.isSetDescription();
8917
      boolean that_present_description = true && that.isSetDescription();
8918
      if (this_present_description || that_present_description) {
8919
        if (!(this_present_description && that_present_description))
8920
          return false;
8921
        if (!this.description.equals(that.description))
8922
          return false;
8923
      }
8924
 
68 ashish 8925
      return true;
8926
    }
8927
 
8928
    @Override
8929
    public int hashCode() {
8930
      return 0;
8931
    }
8932
 
483 rajveer 8933
    public int compareTo(changeOrderStatus_args other) {
8934
      if (!getClass().equals(other.getClass())) {
8935
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 8936
      }
8937
 
483 rajveer 8938
      int lastComparison = 0;
8939
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 8940
 
483 rajveer 8941
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
8942
      if (lastComparison != 0) {
8943
        return lastComparison;
68 ashish 8944
      }
483 rajveer 8945
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
8946
      if (lastComparison != 0) {
8947
        return lastComparison;
68 ashish 8948
      }
483 rajveer 8949
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8950
      if (lastComparison != 0) {
8951
        return lastComparison;
68 ashish 8952
      }
483 rajveer 8953
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8954
      if (lastComparison != 0) {
8955
        return lastComparison;
68 ashish 8956
      }
483 rajveer 8957
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
8958
      if (lastComparison != 0) {
8959
        return lastComparison;
68 ashish 8960
      }
483 rajveer 8961
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
8962
      if (lastComparison != 0) {
8963
        return lastComparison;
68 ashish 8964
      }
8965
      return 0;
8966
    }
8967
 
8968
    public void read(TProtocol iprot) throws TException {
8969
      TField field;
8970
      iprot.readStructBegin();
8971
      while (true)
8972
      {
8973
        field = iprot.readFieldBegin();
8974
        if (field.type == TType.STOP) { 
8975
          break;
8976
        }
8977
        _Fields fieldId = _Fields.findByThriftId(field.id);
8978
        if (fieldId == null) {
8979
          TProtocolUtil.skip(iprot, field.type);
8980
        } else {
8981
          switch (fieldId) {
483 rajveer 8982
            case ORDER_ID:
68 ashish 8983
              if (field.type == TType.I64) {
483 rajveer 8984
                this.orderId = iprot.readI64();
8985
                setOrderIdIsSet(true);
68 ashish 8986
              } else { 
8987
                TProtocolUtil.skip(iprot, field.type);
8988
              }
8989
              break;
483 rajveer 8990
            case STATUS:
8991
              if (field.type == TType.I32) {
8992
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 8993
              } else { 
8994
                TProtocolUtil.skip(iprot, field.type);
8995
              }
8996
              break;
483 rajveer 8997
            case DESCRIPTION:
8998
              if (field.type == TType.STRING) {
8999
                this.description = iprot.readString();
9000
              } else { 
9001
                TProtocolUtil.skip(iprot, field.type);
9002
              }
9003
              break;
68 ashish 9004
          }
9005
          iprot.readFieldEnd();
9006
        }
9007
      }
9008
      iprot.readStructEnd();
9009
      validate();
9010
    }
9011
 
9012
    public void write(TProtocol oprot) throws TException {
9013
      validate();
9014
 
9015
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 9016
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9017
      oprot.writeI64(this.orderId);
68 ashish 9018
      oprot.writeFieldEnd();
483 rajveer 9019
      if (this.status != null) {
9020
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9021
        oprot.writeI32(this.status.getValue());
68 ashish 9022
        oprot.writeFieldEnd();
9023
      }
483 rajveer 9024
      if (this.description != null) {
9025
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
9026
        oprot.writeString(this.description);
9027
        oprot.writeFieldEnd();
9028
      }
68 ashish 9029
      oprot.writeFieldStop();
9030
      oprot.writeStructEnd();
9031
    }
9032
 
9033
    @Override
9034
    public String toString() {
483 rajveer 9035
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 9036
      boolean first = true;
9037
 
483 rajveer 9038
      sb.append("orderId:");
9039
      sb.append(this.orderId);
68 ashish 9040
      first = false;
9041
      if (!first) sb.append(", ");
483 rajveer 9042
      sb.append("status:");
9043
      if (this.status == null) {
68 ashish 9044
        sb.append("null");
9045
      } else {
483 rajveer 9046
        String status_name = status.name();
9047
        if (status_name != null) {
9048
          sb.append(status_name);
9049
          sb.append(" (");
9050
        }
9051
        sb.append(this.status);
9052
        if (status_name != null) {
9053
          sb.append(")");
9054
        }
68 ashish 9055
      }
9056
      first = false;
483 rajveer 9057
      if (!first) sb.append(", ");
9058
      sb.append("description:");
9059
      if (this.description == null) {
9060
        sb.append("null");
9061
      } else {
9062
        sb.append(this.description);
9063
      }
9064
      first = false;
68 ashish 9065
      sb.append(")");
9066
      return sb.toString();
9067
    }
9068
 
9069
    public void validate() throws TException {
9070
      // check for required fields
9071
    }
9072
 
9073
  }
9074
 
483 rajveer 9075
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
9076
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 9077
 
9078
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9079
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9080
 
9081
    private boolean success;
9082
    private TransactionServiceException ex;
9083
 
9084
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9085
    public enum _Fields implements TFieldIdEnum {
9086
      SUCCESS((short)0, "success"),
9087
      EX((short)1, "ex");
9088
 
9089
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9090
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9091
 
9092
      static {
9093
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9094
          byId.put((int)field._thriftId, field);
9095
          byName.put(field.getFieldName(), field);
9096
        }
9097
      }
9098
 
9099
      /**
9100
       * Find the _Fields constant that matches fieldId, or null if its not found.
9101
       */
9102
      public static _Fields findByThriftId(int fieldId) {
9103
        return byId.get(fieldId);
9104
      }
9105
 
9106
      /**
9107
       * Find the _Fields constant that matches fieldId, throwing an exception
9108
       * if it is not found.
9109
       */
9110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9111
        _Fields fields = findByThriftId(fieldId);
9112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9113
        return fields;
9114
      }
9115
 
9116
      /**
9117
       * Find the _Fields constant that matches name, or null if its not found.
9118
       */
9119
      public static _Fields findByName(String name) {
9120
        return byName.get(name);
9121
      }
9122
 
9123
      private final short _thriftId;
9124
      private final String _fieldName;
9125
 
9126
      _Fields(short thriftId, String fieldName) {
9127
        _thriftId = thriftId;
9128
        _fieldName = fieldName;
9129
      }
9130
 
9131
      public short getThriftFieldId() {
9132
        return _thriftId;
9133
      }
9134
 
9135
      public String getFieldName() {
9136
        return _fieldName;
9137
      }
9138
    }
9139
 
9140
    // isset id assignments
9141
    private static final int __SUCCESS_ISSET_ID = 0;
9142
    private BitSet __isset_bit_vector = new BitSet(1);
9143
 
9144
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9145
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9146
          new FieldValueMetaData(TType.BOOL)));
9147
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9148
          new FieldValueMetaData(TType.STRUCT)));
9149
    }});
9150
 
9151
    static {
483 rajveer 9152
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 9153
    }
9154
 
483 rajveer 9155
    public changeOrderStatus_result() {
68 ashish 9156
    }
9157
 
483 rajveer 9158
    public changeOrderStatus_result(
68 ashish 9159
      boolean success,
9160
      TransactionServiceException ex)
9161
    {
9162
      this();
9163
      this.success = success;
9164
      setSuccessIsSet(true);
9165
      this.ex = ex;
9166
    }
9167
 
9168
    /**
9169
     * Performs a deep copy on <i>other</i>.
9170
     */
483 rajveer 9171
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 9172
      __isset_bit_vector.clear();
9173
      __isset_bit_vector.or(other.__isset_bit_vector);
9174
      this.success = other.success;
9175
      if (other.isSetEx()) {
9176
        this.ex = new TransactionServiceException(other.ex);
9177
      }
9178
    }
9179
 
483 rajveer 9180
    public changeOrderStatus_result deepCopy() {
9181
      return new changeOrderStatus_result(this);
68 ashish 9182
    }
9183
 
9184
    @Deprecated
483 rajveer 9185
    public changeOrderStatus_result clone() {
9186
      return new changeOrderStatus_result(this);
68 ashish 9187
    }
9188
 
9189
    public boolean isSuccess() {
9190
      return this.success;
9191
    }
9192
 
483 rajveer 9193
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 9194
      this.success = success;
9195
      setSuccessIsSet(true);
9196
      return this;
9197
    }
9198
 
9199
    public void unsetSuccess() {
9200
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9201
    }
9202
 
9203
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9204
    public boolean isSetSuccess() {
9205
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9206
    }
9207
 
9208
    public void setSuccessIsSet(boolean value) {
9209
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9210
    }
9211
 
9212
    public TransactionServiceException getEx() {
9213
      return this.ex;
9214
    }
9215
 
483 rajveer 9216
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 9217
      this.ex = ex;
9218
      return this;
9219
    }
9220
 
9221
    public void unsetEx() {
9222
      this.ex = null;
9223
    }
9224
 
9225
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9226
    public boolean isSetEx() {
9227
      return this.ex != null;
9228
    }
9229
 
9230
    public void setExIsSet(boolean value) {
9231
      if (!value) {
9232
        this.ex = null;
9233
      }
9234
    }
9235
 
9236
    public void setFieldValue(_Fields field, Object value) {
9237
      switch (field) {
9238
      case SUCCESS:
9239
        if (value == null) {
9240
          unsetSuccess();
9241
        } else {
9242
          setSuccess((Boolean)value);
9243
        }
9244
        break;
9245
 
9246
      case EX:
9247
        if (value == null) {
9248
          unsetEx();
9249
        } else {
9250
          setEx((TransactionServiceException)value);
9251
        }
9252
        break;
9253
 
9254
      }
9255
    }
9256
 
9257
    public void setFieldValue(int fieldID, Object value) {
9258
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9259
    }
9260
 
9261
    public Object getFieldValue(_Fields field) {
9262
      switch (field) {
9263
      case SUCCESS:
9264
        return new Boolean(isSuccess());
9265
 
9266
      case EX:
9267
        return getEx();
9268
 
9269
      }
9270
      throw new IllegalStateException();
9271
    }
9272
 
9273
    public Object getFieldValue(int fieldId) {
9274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9275
    }
9276
 
9277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9278
    public boolean isSet(_Fields field) {
9279
      switch (field) {
9280
      case SUCCESS:
9281
        return isSetSuccess();
9282
      case EX:
9283
        return isSetEx();
9284
      }
9285
      throw new IllegalStateException();
9286
    }
9287
 
9288
    public boolean isSet(int fieldID) {
9289
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9290
    }
9291
 
9292
    @Override
9293
    public boolean equals(Object that) {
9294
      if (that == null)
9295
        return false;
483 rajveer 9296
      if (that instanceof changeOrderStatus_result)
9297
        return this.equals((changeOrderStatus_result)that);
68 ashish 9298
      return false;
9299
    }
9300
 
483 rajveer 9301
    public boolean equals(changeOrderStatus_result that) {
68 ashish 9302
      if (that == null)
9303
        return false;
9304
 
9305
      boolean this_present_success = true;
9306
      boolean that_present_success = true;
9307
      if (this_present_success || that_present_success) {
9308
        if (!(this_present_success && that_present_success))
9309
          return false;
9310
        if (this.success != that.success)
9311
          return false;
9312
      }
9313
 
9314
      boolean this_present_ex = true && this.isSetEx();
9315
      boolean that_present_ex = true && that.isSetEx();
9316
      if (this_present_ex || that_present_ex) {
9317
        if (!(this_present_ex && that_present_ex))
9318
          return false;
9319
        if (!this.ex.equals(that.ex))
9320
          return false;
9321
      }
9322
 
9323
      return true;
9324
    }
9325
 
9326
    @Override
9327
    public int hashCode() {
9328
      return 0;
9329
    }
9330
 
483 rajveer 9331
    public int compareTo(changeOrderStatus_result other) {
68 ashish 9332
      if (!getClass().equals(other.getClass())) {
9333
        return getClass().getName().compareTo(other.getClass().getName());
9334
      }
9335
 
9336
      int lastComparison = 0;
483 rajveer 9337
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 9338
 
9339
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9340
      if (lastComparison != 0) {
9341
        return lastComparison;
9342
      }
9343
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9344
      if (lastComparison != 0) {
9345
        return lastComparison;
9346
      }
9347
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9348
      if (lastComparison != 0) {
9349
        return lastComparison;
9350
      }
9351
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9352
      if (lastComparison != 0) {
9353
        return lastComparison;
9354
      }
9355
      return 0;
9356
    }
9357
 
9358
    public void read(TProtocol iprot) throws TException {
9359
      TField field;
9360
      iprot.readStructBegin();
9361
      while (true)
9362
      {
9363
        field = iprot.readFieldBegin();
9364
        if (field.type == TType.STOP) { 
9365
          break;
9366
        }
9367
        _Fields fieldId = _Fields.findByThriftId(field.id);
9368
        if (fieldId == null) {
9369
          TProtocolUtil.skip(iprot, field.type);
9370
        } else {
9371
          switch (fieldId) {
9372
            case SUCCESS:
9373
              if (field.type == TType.BOOL) {
9374
                this.success = iprot.readBool();
9375
                setSuccessIsSet(true);
9376
              } else { 
9377
                TProtocolUtil.skip(iprot, field.type);
9378
              }
9379
              break;
9380
            case EX:
9381
              if (field.type == TType.STRUCT) {
9382
                this.ex = new TransactionServiceException();
9383
                this.ex.read(iprot);
9384
              } else { 
9385
                TProtocolUtil.skip(iprot, field.type);
9386
              }
9387
              break;
9388
          }
9389
          iprot.readFieldEnd();
9390
        }
9391
      }
9392
      iprot.readStructEnd();
9393
      validate();
9394
    }
9395
 
9396
    public void write(TProtocol oprot) throws TException {
9397
      oprot.writeStructBegin(STRUCT_DESC);
9398
 
9399
      if (this.isSetSuccess()) {
9400
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9401
        oprot.writeBool(this.success);
9402
        oprot.writeFieldEnd();
9403
      } else if (this.isSetEx()) {
9404
        oprot.writeFieldBegin(EX_FIELD_DESC);
9405
        this.ex.write(oprot);
9406
        oprot.writeFieldEnd();
9407
      }
9408
      oprot.writeFieldStop();
9409
      oprot.writeStructEnd();
9410
    }
9411
 
9412
    @Override
9413
    public String toString() {
483 rajveer 9414
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 9415
      boolean first = true;
9416
 
9417
      sb.append("success:");
9418
      sb.append(this.success);
9419
      first = false;
9420
      if (!first) sb.append(", ");
9421
      sb.append("ex:");
9422
      if (this.ex == null) {
9423
        sb.append("null");
9424
      } else {
9425
        sb.append(this.ex);
9426
      }
9427
      first = false;
9428
      sb.append(")");
9429
      return sb.toString();
9430
    }
9431
 
9432
    public void validate() throws TException {
9433
      // check for required fields
9434
    }
9435
 
9436
  }
9437
 
495 rajveer 9438
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
9439
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
9440
 
9441
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9442
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 9443
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 9444
 
9445
    private long orderId;
9446
    private String invoice_number;
9447
    private String billed_by;
9448
 
9449
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9450
    public enum _Fields implements TFieldIdEnum {
9451
      ORDER_ID((short)1, "orderId"),
9452
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 9453
      BILLED_BY((short)3, "billed_by");
495 rajveer 9454
 
9455
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9456
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9457
 
9458
      static {
9459
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9460
          byId.put((int)field._thriftId, field);
9461
          byName.put(field.getFieldName(), field);
9462
        }
9463
      }
9464
 
9465
      /**
9466
       * Find the _Fields constant that matches fieldId, or null if its not found.
9467
       */
9468
      public static _Fields findByThriftId(int fieldId) {
9469
        return byId.get(fieldId);
9470
      }
9471
 
9472
      /**
9473
       * Find the _Fields constant that matches fieldId, throwing an exception
9474
       * if it is not found.
9475
       */
9476
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9477
        _Fields fields = findByThriftId(fieldId);
9478
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9479
        return fields;
9480
      }
9481
 
9482
      /**
9483
       * Find the _Fields constant that matches name, or null if its not found.
9484
       */
9485
      public static _Fields findByName(String name) {
9486
        return byName.get(name);
9487
      }
9488
 
9489
      private final short _thriftId;
9490
      private final String _fieldName;
9491
 
9492
      _Fields(short thriftId, String fieldName) {
9493
        _thriftId = thriftId;
9494
        _fieldName = fieldName;
9495
      }
9496
 
9497
      public short getThriftFieldId() {
9498
        return _thriftId;
9499
      }
9500
 
9501
      public String getFieldName() {
9502
        return _fieldName;
9503
      }
9504
    }
9505
 
9506
    // isset id assignments
9507
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 9508
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 9509
 
9510
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9511
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9512
          new FieldValueMetaData(TType.I64)));
9513
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
9514
          new FieldValueMetaData(TType.STRING)));
9515
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
9516
          new FieldValueMetaData(TType.STRING)));
9517
    }});
9518
 
9519
    static {
9520
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
9521
    }
9522
 
9523
    public addBillingDetails_args() {
9524
    }
9525
 
9526
    public addBillingDetails_args(
9527
      long orderId,
9528
      String invoice_number,
9529
      String billed_by)
9530
    {
9531
      this();
9532
      this.orderId = orderId;
9533
      setOrderIdIsSet(true);
9534
      this.invoice_number = invoice_number;
9535
      this.billed_by = billed_by;
9536
    }
9537
 
9538
    /**
9539
     * Performs a deep copy on <i>other</i>.
9540
     */
9541
    public addBillingDetails_args(addBillingDetails_args other) {
9542
      __isset_bit_vector.clear();
9543
      __isset_bit_vector.or(other.__isset_bit_vector);
9544
      this.orderId = other.orderId;
9545
      if (other.isSetInvoice_number()) {
9546
        this.invoice_number = other.invoice_number;
9547
      }
9548
      if (other.isSetBilled_by()) {
9549
        this.billed_by = other.billed_by;
9550
      }
9551
    }
9552
 
9553
    public addBillingDetails_args deepCopy() {
9554
      return new addBillingDetails_args(this);
9555
    }
9556
 
9557
    @Deprecated
9558
    public addBillingDetails_args clone() {
9559
      return new addBillingDetails_args(this);
9560
    }
9561
 
9562
    public long getOrderId() {
9563
      return this.orderId;
9564
    }
9565
 
9566
    public addBillingDetails_args setOrderId(long orderId) {
9567
      this.orderId = orderId;
9568
      setOrderIdIsSet(true);
9569
      return this;
9570
    }
9571
 
9572
    public void unsetOrderId() {
9573
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9574
    }
9575
 
9576
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9577
    public boolean isSetOrderId() {
9578
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9579
    }
9580
 
9581
    public void setOrderIdIsSet(boolean value) {
9582
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9583
    }
9584
 
9585
    public String getInvoice_number() {
9586
      return this.invoice_number;
9587
    }
9588
 
9589
    public addBillingDetails_args setInvoice_number(String invoice_number) {
9590
      this.invoice_number = invoice_number;
9591
      return this;
9592
    }
9593
 
9594
    public void unsetInvoice_number() {
9595
      this.invoice_number = null;
9596
    }
9597
 
9598
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
9599
    public boolean isSetInvoice_number() {
9600
      return this.invoice_number != null;
9601
    }
9602
 
9603
    public void setInvoice_numberIsSet(boolean value) {
9604
      if (!value) {
9605
        this.invoice_number = null;
9606
      }
9607
    }
9608
 
9609
    public String getBilled_by() {
9610
      return this.billed_by;
9611
    }
9612
 
9613
    public addBillingDetails_args setBilled_by(String billed_by) {
9614
      this.billed_by = billed_by;
9615
      return this;
9616
    }
9617
 
9618
    public void unsetBilled_by() {
9619
      this.billed_by = null;
9620
    }
9621
 
9622
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
9623
    public boolean isSetBilled_by() {
9624
      return this.billed_by != null;
9625
    }
9626
 
9627
    public void setBilled_byIsSet(boolean value) {
9628
      if (!value) {
9629
        this.billed_by = null;
9630
      }
9631
    }
9632
 
9633
    public void setFieldValue(_Fields field, Object value) {
9634
      switch (field) {
9635
      case ORDER_ID:
9636
        if (value == null) {
9637
          unsetOrderId();
9638
        } else {
9639
          setOrderId((Long)value);
9640
        }
9641
        break;
9642
 
9643
      case INVOICE_NUMBER:
9644
        if (value == null) {
9645
          unsetInvoice_number();
9646
        } else {
9647
          setInvoice_number((String)value);
9648
        }
9649
        break;
9650
 
9651
      case BILLED_BY:
9652
        if (value == null) {
9653
          unsetBilled_by();
9654
        } else {
9655
          setBilled_by((String)value);
9656
        }
9657
        break;
9658
 
9659
      }
9660
    }
9661
 
9662
    public void setFieldValue(int fieldID, Object value) {
9663
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9664
    }
9665
 
9666
    public Object getFieldValue(_Fields field) {
9667
      switch (field) {
9668
      case ORDER_ID:
9669
        return new Long(getOrderId());
9670
 
9671
      case INVOICE_NUMBER:
9672
        return getInvoice_number();
9673
 
9674
      case BILLED_BY:
9675
        return getBilled_by();
9676
 
9677
      }
9678
      throw new IllegalStateException();
9679
    }
9680
 
9681
    public Object getFieldValue(int fieldId) {
9682
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9683
    }
9684
 
9685
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9686
    public boolean isSet(_Fields field) {
9687
      switch (field) {
9688
      case ORDER_ID:
9689
        return isSetOrderId();
9690
      case INVOICE_NUMBER:
9691
        return isSetInvoice_number();
9692
      case BILLED_BY:
9693
        return isSetBilled_by();
9694
      }
9695
      throw new IllegalStateException();
9696
    }
9697
 
9698
    public boolean isSet(int fieldID) {
9699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9700
    }
9701
 
9702
    @Override
9703
    public boolean equals(Object that) {
9704
      if (that == null)
9705
        return false;
9706
      if (that instanceof addBillingDetails_args)
9707
        return this.equals((addBillingDetails_args)that);
9708
      return false;
9709
    }
9710
 
9711
    public boolean equals(addBillingDetails_args that) {
9712
      if (that == null)
9713
        return false;
9714
 
9715
      boolean this_present_orderId = true;
9716
      boolean that_present_orderId = true;
9717
      if (this_present_orderId || that_present_orderId) {
9718
        if (!(this_present_orderId && that_present_orderId))
9719
          return false;
9720
        if (this.orderId != that.orderId)
9721
          return false;
9722
      }
9723
 
9724
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
9725
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
9726
      if (this_present_invoice_number || that_present_invoice_number) {
9727
        if (!(this_present_invoice_number && that_present_invoice_number))
9728
          return false;
9729
        if (!this.invoice_number.equals(that.invoice_number))
9730
          return false;
9731
      }
9732
 
9733
      boolean this_present_billed_by = true && this.isSetBilled_by();
9734
      boolean that_present_billed_by = true && that.isSetBilled_by();
9735
      if (this_present_billed_by || that_present_billed_by) {
9736
        if (!(this_present_billed_by && that_present_billed_by))
9737
          return false;
9738
        if (!this.billed_by.equals(that.billed_by))
9739
          return false;
9740
      }
9741
 
9742
      return true;
9743
    }
9744
 
9745
    @Override
9746
    public int hashCode() {
9747
      return 0;
9748
    }
9749
 
9750
    public int compareTo(addBillingDetails_args other) {
9751
      if (!getClass().equals(other.getClass())) {
9752
        return getClass().getName().compareTo(other.getClass().getName());
9753
      }
9754
 
9755
      int lastComparison = 0;
9756
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
9757
 
9758
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9759
      if (lastComparison != 0) {
9760
        return lastComparison;
9761
      }
9762
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9763
      if (lastComparison != 0) {
9764
        return lastComparison;
9765
      }
9766
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
9767
      if (lastComparison != 0) {
9768
        return lastComparison;
9769
      }
9770
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
9771
      if (lastComparison != 0) {
9772
        return lastComparison;
9773
      }
9774
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
9775
      if (lastComparison != 0) {
9776
        return lastComparison;
9777
      }
9778
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
9779
      if (lastComparison != 0) {
9780
        return lastComparison;
9781
      }
9782
      return 0;
9783
    }
9784
 
9785
    public void read(TProtocol iprot) throws TException {
9786
      TField field;
9787
      iprot.readStructBegin();
9788
      while (true)
9789
      {
9790
        field = iprot.readFieldBegin();
9791
        if (field.type == TType.STOP) { 
9792
          break;
9793
        }
9794
        _Fields fieldId = _Fields.findByThriftId(field.id);
9795
        if (fieldId == null) {
9796
          TProtocolUtil.skip(iprot, field.type);
9797
        } else {
9798
          switch (fieldId) {
9799
            case ORDER_ID:
9800
              if (field.type == TType.I64) {
9801
                this.orderId = iprot.readI64();
9802
                setOrderIdIsSet(true);
9803
              } else { 
9804
                TProtocolUtil.skip(iprot, field.type);
9805
              }
9806
              break;
9807
            case INVOICE_NUMBER:
9808
              if (field.type == TType.STRING) {
9809
                this.invoice_number = iprot.readString();
9810
              } else { 
9811
                TProtocolUtil.skip(iprot, field.type);
9812
              }
9813
              break;
9814
            case BILLED_BY:
9815
              if (field.type == TType.STRING) {
9816
                this.billed_by = iprot.readString();
9817
              } else { 
9818
                TProtocolUtil.skip(iprot, field.type);
9819
              }
9820
              break;
9821
          }
9822
          iprot.readFieldEnd();
9823
        }
9824
      }
9825
      iprot.readStructEnd();
9826
      validate();
9827
    }
9828
 
9829
    public void write(TProtocol oprot) throws TException {
9830
      validate();
9831
 
9832
      oprot.writeStructBegin(STRUCT_DESC);
9833
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9834
      oprot.writeI64(this.orderId);
9835
      oprot.writeFieldEnd();
9836
      if (this.invoice_number != null) {
9837
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
9838
        oprot.writeString(this.invoice_number);
9839
        oprot.writeFieldEnd();
9840
      }
9841
      if (this.billed_by != null) {
9842
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
9843
        oprot.writeString(this.billed_by);
9844
        oprot.writeFieldEnd();
9845
      }
9846
      oprot.writeFieldStop();
9847
      oprot.writeStructEnd();
9848
    }
9849
 
9850
    @Override
9851
    public String toString() {
9852
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
9853
      boolean first = true;
9854
 
9855
      sb.append("orderId:");
9856
      sb.append(this.orderId);
9857
      first = false;
9858
      if (!first) sb.append(", ");
9859
      sb.append("invoice_number:");
9860
      if (this.invoice_number == null) {
9861
        sb.append("null");
9862
      } else {
9863
        sb.append(this.invoice_number);
9864
      }
9865
      first = false;
9866
      if (!first) sb.append(", ");
9867
      sb.append("billed_by:");
9868
      if (this.billed_by == null) {
9869
        sb.append("null");
9870
      } else {
9871
        sb.append(this.billed_by);
9872
      }
9873
      first = false;
9874
      sb.append(")");
9875
      return sb.toString();
9876
    }
9877
 
9878
    public void validate() throws TException {
9879
      // check for required fields
9880
    }
9881
 
9882
  }
9883
 
9884
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
9885
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
9886
 
9887
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9888
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9889
 
9890
    private boolean success;
9891
    private TransactionServiceException ex;
9892
 
9893
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9894
    public enum _Fields implements TFieldIdEnum {
9895
      SUCCESS((short)0, "success"),
9896
      EX((short)1, "ex");
9897
 
9898
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9899
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9900
 
9901
      static {
9902
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9903
          byId.put((int)field._thriftId, field);
9904
          byName.put(field.getFieldName(), field);
9905
        }
9906
      }
9907
 
9908
      /**
9909
       * Find the _Fields constant that matches fieldId, or null if its not found.
9910
       */
9911
      public static _Fields findByThriftId(int fieldId) {
9912
        return byId.get(fieldId);
9913
      }
9914
 
9915
      /**
9916
       * Find the _Fields constant that matches fieldId, throwing an exception
9917
       * if it is not found.
9918
       */
9919
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9920
        _Fields fields = findByThriftId(fieldId);
9921
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9922
        return fields;
9923
      }
9924
 
9925
      /**
9926
       * Find the _Fields constant that matches name, or null if its not found.
9927
       */
9928
      public static _Fields findByName(String name) {
9929
        return byName.get(name);
9930
      }
9931
 
9932
      private final short _thriftId;
9933
      private final String _fieldName;
9934
 
9935
      _Fields(short thriftId, String fieldName) {
9936
        _thriftId = thriftId;
9937
        _fieldName = fieldName;
9938
      }
9939
 
9940
      public short getThriftFieldId() {
9941
        return _thriftId;
9942
      }
9943
 
9944
      public String getFieldName() {
9945
        return _fieldName;
9946
      }
9947
    }
9948
 
9949
    // isset id assignments
9950
    private static final int __SUCCESS_ISSET_ID = 0;
9951
    private BitSet __isset_bit_vector = new BitSet(1);
9952
 
9953
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9954
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9955
          new FieldValueMetaData(TType.BOOL)));
9956
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9957
          new FieldValueMetaData(TType.STRUCT)));
9958
    }});
9959
 
9960
    static {
9961
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
9962
    }
9963
 
9964
    public addBillingDetails_result() {
9965
    }
9966
 
9967
    public addBillingDetails_result(
9968
      boolean success,
9969
      TransactionServiceException ex)
9970
    {
9971
      this();
9972
      this.success = success;
9973
      setSuccessIsSet(true);
9974
      this.ex = ex;
9975
    }
9976
 
9977
    /**
9978
     * Performs a deep copy on <i>other</i>.
9979
     */
9980
    public addBillingDetails_result(addBillingDetails_result other) {
9981
      __isset_bit_vector.clear();
9982
      __isset_bit_vector.or(other.__isset_bit_vector);
9983
      this.success = other.success;
9984
      if (other.isSetEx()) {
9985
        this.ex = new TransactionServiceException(other.ex);
9986
      }
9987
    }
9988
 
9989
    public addBillingDetails_result deepCopy() {
9990
      return new addBillingDetails_result(this);
9991
    }
9992
 
9993
    @Deprecated
9994
    public addBillingDetails_result clone() {
9995
      return new addBillingDetails_result(this);
9996
    }
9997
 
9998
    public boolean isSuccess() {
9999
      return this.success;
10000
    }
10001
 
10002
    public addBillingDetails_result setSuccess(boolean success) {
10003
      this.success = success;
10004
      setSuccessIsSet(true);
10005
      return this;
10006
    }
10007
 
10008
    public void unsetSuccess() {
10009
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10010
    }
10011
 
10012
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10013
    public boolean isSetSuccess() {
10014
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10015
    }
10016
 
10017
    public void setSuccessIsSet(boolean value) {
10018
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10019
    }
10020
 
10021
    public TransactionServiceException getEx() {
10022
      return this.ex;
10023
    }
10024
 
10025
    public addBillingDetails_result setEx(TransactionServiceException ex) {
10026
      this.ex = ex;
10027
      return this;
10028
    }
10029
 
10030
    public void unsetEx() {
10031
      this.ex = null;
10032
    }
10033
 
10034
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10035
    public boolean isSetEx() {
10036
      return this.ex != null;
10037
    }
10038
 
10039
    public void setExIsSet(boolean value) {
10040
      if (!value) {
10041
        this.ex = null;
10042
      }
10043
    }
10044
 
10045
    public void setFieldValue(_Fields field, Object value) {
10046
      switch (field) {
10047
      case SUCCESS:
10048
        if (value == null) {
10049
          unsetSuccess();
10050
        } else {
10051
          setSuccess((Boolean)value);
10052
        }
10053
        break;
10054
 
10055
      case EX:
10056
        if (value == null) {
10057
          unsetEx();
10058
        } else {
10059
          setEx((TransactionServiceException)value);
10060
        }
10061
        break;
10062
 
10063
      }
10064
    }
10065
 
10066
    public void setFieldValue(int fieldID, Object value) {
10067
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10068
    }
10069
 
10070
    public Object getFieldValue(_Fields field) {
10071
      switch (field) {
10072
      case SUCCESS:
10073
        return new Boolean(isSuccess());
10074
 
10075
      case EX:
10076
        return getEx();
10077
 
10078
      }
10079
      throw new IllegalStateException();
10080
    }
10081
 
10082
    public Object getFieldValue(int fieldId) {
10083
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10084
    }
10085
 
10086
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10087
    public boolean isSet(_Fields field) {
10088
      switch (field) {
10089
      case SUCCESS:
10090
        return isSetSuccess();
10091
      case EX:
10092
        return isSetEx();
10093
      }
10094
      throw new IllegalStateException();
10095
    }
10096
 
10097
    public boolean isSet(int fieldID) {
10098
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10099
    }
10100
 
10101
    @Override
10102
    public boolean equals(Object that) {
10103
      if (that == null)
10104
        return false;
10105
      if (that instanceof addBillingDetails_result)
10106
        return this.equals((addBillingDetails_result)that);
10107
      return false;
10108
    }
10109
 
10110
    public boolean equals(addBillingDetails_result that) {
10111
      if (that == null)
10112
        return false;
10113
 
10114
      boolean this_present_success = true;
10115
      boolean that_present_success = true;
10116
      if (this_present_success || that_present_success) {
10117
        if (!(this_present_success && that_present_success))
10118
          return false;
10119
        if (this.success != that.success)
10120
          return false;
10121
      }
10122
 
10123
      boolean this_present_ex = true && this.isSetEx();
10124
      boolean that_present_ex = true && that.isSetEx();
10125
      if (this_present_ex || that_present_ex) {
10126
        if (!(this_present_ex && that_present_ex))
10127
          return false;
10128
        if (!this.ex.equals(that.ex))
10129
          return false;
10130
      }
10131
 
10132
      return true;
10133
    }
10134
 
10135
    @Override
10136
    public int hashCode() {
10137
      return 0;
10138
    }
10139
 
10140
    public int compareTo(addBillingDetails_result other) {
10141
      if (!getClass().equals(other.getClass())) {
10142
        return getClass().getName().compareTo(other.getClass().getName());
10143
      }
10144
 
10145
      int lastComparison = 0;
10146
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
10147
 
10148
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10149
      if (lastComparison != 0) {
10150
        return lastComparison;
10151
      }
10152
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10153
      if (lastComparison != 0) {
10154
        return lastComparison;
10155
      }
10156
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10157
      if (lastComparison != 0) {
10158
        return lastComparison;
10159
      }
10160
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10161
      if (lastComparison != 0) {
10162
        return lastComparison;
10163
      }
10164
      return 0;
10165
    }
10166
 
10167
    public void read(TProtocol iprot) throws TException {
10168
      TField field;
10169
      iprot.readStructBegin();
10170
      while (true)
10171
      {
10172
        field = iprot.readFieldBegin();
10173
        if (field.type == TType.STOP) { 
10174
          break;
10175
        }
10176
        _Fields fieldId = _Fields.findByThriftId(field.id);
10177
        if (fieldId == null) {
10178
          TProtocolUtil.skip(iprot, field.type);
10179
        } else {
10180
          switch (fieldId) {
10181
            case SUCCESS:
10182
              if (field.type == TType.BOOL) {
10183
                this.success = iprot.readBool();
10184
                setSuccessIsSet(true);
10185
              } else { 
10186
                TProtocolUtil.skip(iprot, field.type);
10187
              }
10188
              break;
10189
            case EX:
10190
              if (field.type == TType.STRUCT) {
10191
                this.ex = new TransactionServiceException();
10192
                this.ex.read(iprot);
10193
              } else { 
10194
                TProtocolUtil.skip(iprot, field.type);
10195
              }
10196
              break;
10197
          }
10198
          iprot.readFieldEnd();
10199
        }
10200
      }
10201
      iprot.readStructEnd();
10202
      validate();
10203
    }
10204
 
10205
    public void write(TProtocol oprot) throws TException {
10206
      oprot.writeStructBegin(STRUCT_DESC);
10207
 
10208
      if (this.isSetSuccess()) {
10209
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10210
        oprot.writeBool(this.success);
10211
        oprot.writeFieldEnd();
10212
      } else if (this.isSetEx()) {
10213
        oprot.writeFieldBegin(EX_FIELD_DESC);
10214
        this.ex.write(oprot);
10215
        oprot.writeFieldEnd();
10216
      }
10217
      oprot.writeFieldStop();
10218
      oprot.writeStructEnd();
10219
    }
10220
 
10221
    @Override
10222
    public String toString() {
10223
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
10224
      boolean first = true;
10225
 
10226
      sb.append("success:");
10227
      sb.append(this.success);
10228
      first = false;
10229
      if (!first) sb.append(", ");
10230
      sb.append("ex:");
10231
      if (this.ex == null) {
10232
        sb.append("null");
10233
      } else {
10234
        sb.append(this.ex);
10235
      }
10236
      first = false;
10237
      sb.append(")");
10238
      return sb.toString();
10239
    }
10240
 
10241
    public void validate() throws TException {
10242
      // check for required fields
10243
    }
10244
 
10245
  }
10246
 
1148 chandransh 10247
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
10248
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
10249
 
10250
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10251
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
10252
 
10253
    private long orderId;
10254
    private long jacketNumber;
10255
 
10256
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10257
    public enum _Fields implements TFieldIdEnum {
10258
      ORDER_ID((short)1, "orderId"),
10259
      JACKET_NUMBER((short)2, "jacketNumber");
10260
 
10261
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10262
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10263
 
10264
      static {
10265
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10266
          byId.put((int)field._thriftId, field);
10267
          byName.put(field.getFieldName(), field);
10268
        }
10269
      }
10270
 
10271
      /**
10272
       * Find the _Fields constant that matches fieldId, or null if its not found.
10273
       */
10274
      public static _Fields findByThriftId(int fieldId) {
10275
        return byId.get(fieldId);
10276
      }
10277
 
10278
      /**
10279
       * Find the _Fields constant that matches fieldId, throwing an exception
10280
       * if it is not found.
10281
       */
10282
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10283
        _Fields fields = findByThriftId(fieldId);
10284
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10285
        return fields;
10286
      }
10287
 
10288
      /**
10289
       * Find the _Fields constant that matches name, or null if its not found.
10290
       */
10291
      public static _Fields findByName(String name) {
10292
        return byName.get(name);
10293
      }
10294
 
10295
      private final short _thriftId;
10296
      private final String _fieldName;
10297
 
10298
      _Fields(short thriftId, String fieldName) {
10299
        _thriftId = thriftId;
10300
        _fieldName = fieldName;
10301
      }
10302
 
10303
      public short getThriftFieldId() {
10304
        return _thriftId;
10305
      }
10306
 
10307
      public String getFieldName() {
10308
        return _fieldName;
10309
      }
10310
    }
10311
 
10312
    // isset id assignments
10313
    private static final int __ORDERID_ISSET_ID = 0;
10314
    private static final int __JACKETNUMBER_ISSET_ID = 1;
10315
    private BitSet __isset_bit_vector = new BitSet(2);
10316
 
10317
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10318
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10319
          new FieldValueMetaData(TType.I64)));
10320
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
10321
          new FieldValueMetaData(TType.I64)));
10322
    }});
10323
 
10324
    static {
10325
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
10326
    }
10327
 
10328
    public addJacketNumber_args() {
10329
    }
10330
 
10331
    public addJacketNumber_args(
10332
      long orderId,
10333
      long jacketNumber)
10334
    {
10335
      this();
10336
      this.orderId = orderId;
10337
      setOrderIdIsSet(true);
10338
      this.jacketNumber = jacketNumber;
10339
      setJacketNumberIsSet(true);
10340
    }
10341
 
10342
    /**
10343
     * Performs a deep copy on <i>other</i>.
10344
     */
10345
    public addJacketNumber_args(addJacketNumber_args other) {
10346
      __isset_bit_vector.clear();
10347
      __isset_bit_vector.or(other.__isset_bit_vector);
10348
      this.orderId = other.orderId;
10349
      this.jacketNumber = other.jacketNumber;
10350
    }
10351
 
10352
    public addJacketNumber_args deepCopy() {
10353
      return new addJacketNumber_args(this);
10354
    }
10355
 
10356
    @Deprecated
10357
    public addJacketNumber_args clone() {
10358
      return new addJacketNumber_args(this);
10359
    }
10360
 
10361
    public long getOrderId() {
10362
      return this.orderId;
10363
    }
10364
 
10365
    public addJacketNumber_args setOrderId(long orderId) {
10366
      this.orderId = orderId;
10367
      setOrderIdIsSet(true);
10368
      return this;
10369
    }
10370
 
10371
    public void unsetOrderId() {
10372
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10373
    }
10374
 
10375
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10376
    public boolean isSetOrderId() {
10377
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10378
    }
10379
 
10380
    public void setOrderIdIsSet(boolean value) {
10381
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10382
    }
10383
 
10384
    public long getJacketNumber() {
10385
      return this.jacketNumber;
10386
    }
10387
 
10388
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
10389
      this.jacketNumber = jacketNumber;
10390
      setJacketNumberIsSet(true);
10391
      return this;
10392
    }
10393
 
10394
    public void unsetJacketNumber() {
10395
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
10396
    }
10397
 
10398
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
10399
    public boolean isSetJacketNumber() {
10400
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
10401
    }
10402
 
10403
    public void setJacketNumberIsSet(boolean value) {
10404
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
10405
    }
10406
 
10407
    public void setFieldValue(_Fields field, Object value) {
10408
      switch (field) {
10409
      case ORDER_ID:
10410
        if (value == null) {
10411
          unsetOrderId();
10412
        } else {
10413
          setOrderId((Long)value);
10414
        }
10415
        break;
10416
 
10417
      case JACKET_NUMBER:
10418
        if (value == null) {
10419
          unsetJacketNumber();
10420
        } else {
10421
          setJacketNumber((Long)value);
10422
        }
10423
        break;
10424
 
10425
      }
10426
    }
10427
 
10428
    public void setFieldValue(int fieldID, Object value) {
10429
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10430
    }
10431
 
10432
    public Object getFieldValue(_Fields field) {
10433
      switch (field) {
10434
      case ORDER_ID:
10435
        return new Long(getOrderId());
10436
 
10437
      case JACKET_NUMBER:
10438
        return new Long(getJacketNumber());
10439
 
10440
      }
10441
      throw new IllegalStateException();
10442
    }
10443
 
10444
    public Object getFieldValue(int fieldId) {
10445
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10446
    }
10447
 
10448
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10449
    public boolean isSet(_Fields field) {
10450
      switch (field) {
10451
      case ORDER_ID:
10452
        return isSetOrderId();
10453
      case JACKET_NUMBER:
10454
        return isSetJacketNumber();
10455
      }
10456
      throw new IllegalStateException();
10457
    }
10458
 
10459
    public boolean isSet(int fieldID) {
10460
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10461
    }
10462
 
10463
    @Override
10464
    public boolean equals(Object that) {
10465
      if (that == null)
10466
        return false;
10467
      if (that instanceof addJacketNumber_args)
10468
        return this.equals((addJacketNumber_args)that);
10469
      return false;
10470
    }
10471
 
10472
    public boolean equals(addJacketNumber_args that) {
10473
      if (that == null)
10474
        return false;
10475
 
10476
      boolean this_present_orderId = true;
10477
      boolean that_present_orderId = true;
10478
      if (this_present_orderId || that_present_orderId) {
10479
        if (!(this_present_orderId && that_present_orderId))
10480
          return false;
10481
        if (this.orderId != that.orderId)
10482
          return false;
10483
      }
10484
 
10485
      boolean this_present_jacketNumber = true;
10486
      boolean that_present_jacketNumber = true;
10487
      if (this_present_jacketNumber || that_present_jacketNumber) {
10488
        if (!(this_present_jacketNumber && that_present_jacketNumber))
10489
          return false;
10490
        if (this.jacketNumber != that.jacketNumber)
10491
          return false;
10492
      }
10493
 
10494
      return true;
10495
    }
10496
 
10497
    @Override
10498
    public int hashCode() {
10499
      return 0;
10500
    }
10501
 
10502
    public int compareTo(addJacketNumber_args other) {
10503
      if (!getClass().equals(other.getClass())) {
10504
        return getClass().getName().compareTo(other.getClass().getName());
10505
      }
10506
 
10507
      int lastComparison = 0;
10508
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
10509
 
10510
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10511
      if (lastComparison != 0) {
10512
        return lastComparison;
10513
      }
10514
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10515
      if (lastComparison != 0) {
10516
        return lastComparison;
10517
      }
10518
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
10519
      if (lastComparison != 0) {
10520
        return lastComparison;
10521
      }
10522
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
10523
      if (lastComparison != 0) {
10524
        return lastComparison;
10525
      }
10526
      return 0;
10527
    }
10528
 
10529
    public void read(TProtocol iprot) throws TException {
10530
      TField field;
10531
      iprot.readStructBegin();
10532
      while (true)
10533
      {
10534
        field = iprot.readFieldBegin();
10535
        if (field.type == TType.STOP) { 
10536
          break;
10537
        }
10538
        _Fields fieldId = _Fields.findByThriftId(field.id);
10539
        if (fieldId == null) {
10540
          TProtocolUtil.skip(iprot, field.type);
10541
        } else {
10542
          switch (fieldId) {
10543
            case ORDER_ID:
10544
              if (field.type == TType.I64) {
10545
                this.orderId = iprot.readI64();
10546
                setOrderIdIsSet(true);
10547
              } else { 
10548
                TProtocolUtil.skip(iprot, field.type);
10549
              }
10550
              break;
10551
            case JACKET_NUMBER:
10552
              if (field.type == TType.I64) {
10553
                this.jacketNumber = iprot.readI64();
10554
                setJacketNumberIsSet(true);
10555
              } else { 
10556
                TProtocolUtil.skip(iprot, field.type);
10557
              }
10558
              break;
10559
          }
10560
          iprot.readFieldEnd();
10561
        }
10562
      }
10563
      iprot.readStructEnd();
10564
      validate();
10565
    }
10566
 
10567
    public void write(TProtocol oprot) throws TException {
10568
      validate();
10569
 
10570
      oprot.writeStructBegin(STRUCT_DESC);
10571
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10572
      oprot.writeI64(this.orderId);
10573
      oprot.writeFieldEnd();
10574
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
10575
      oprot.writeI64(this.jacketNumber);
10576
      oprot.writeFieldEnd();
10577
      oprot.writeFieldStop();
10578
      oprot.writeStructEnd();
10579
    }
10580
 
10581
    @Override
10582
    public String toString() {
10583
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
10584
      boolean first = true;
10585
 
10586
      sb.append("orderId:");
10587
      sb.append(this.orderId);
10588
      first = false;
10589
      if (!first) sb.append(", ");
10590
      sb.append("jacketNumber:");
10591
      sb.append(this.jacketNumber);
10592
      first = false;
10593
      sb.append(")");
10594
      return sb.toString();
10595
    }
10596
 
10597
    public void validate() throws TException {
10598
      // check for required fields
10599
    }
10600
 
10601
  }
10602
 
10603
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
10604
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
10605
 
10606
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10607
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10608
 
10609
    private boolean success;
10610
    private TransactionServiceException ex;
10611
 
10612
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10613
    public enum _Fields implements TFieldIdEnum {
10614
      SUCCESS((short)0, "success"),
10615
      EX((short)1, "ex");
10616
 
10617
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10618
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10619
 
10620
      static {
10621
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10622
          byId.put((int)field._thriftId, field);
10623
          byName.put(field.getFieldName(), field);
10624
        }
10625
      }
10626
 
10627
      /**
10628
       * Find the _Fields constant that matches fieldId, or null if its not found.
10629
       */
10630
      public static _Fields findByThriftId(int fieldId) {
10631
        return byId.get(fieldId);
10632
      }
10633
 
10634
      /**
10635
       * Find the _Fields constant that matches fieldId, throwing an exception
10636
       * if it is not found.
10637
       */
10638
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10639
        _Fields fields = findByThriftId(fieldId);
10640
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10641
        return fields;
10642
      }
10643
 
10644
      /**
10645
       * Find the _Fields constant that matches name, or null if its not found.
10646
       */
10647
      public static _Fields findByName(String name) {
10648
        return byName.get(name);
10649
      }
10650
 
10651
      private final short _thriftId;
10652
      private final String _fieldName;
10653
 
10654
      _Fields(short thriftId, String fieldName) {
10655
        _thriftId = thriftId;
10656
        _fieldName = fieldName;
10657
      }
10658
 
10659
      public short getThriftFieldId() {
10660
        return _thriftId;
10661
      }
10662
 
10663
      public String getFieldName() {
10664
        return _fieldName;
10665
      }
10666
    }
10667
 
10668
    // isset id assignments
10669
    private static final int __SUCCESS_ISSET_ID = 0;
10670
    private BitSet __isset_bit_vector = new BitSet(1);
10671
 
10672
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10673
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10674
          new FieldValueMetaData(TType.BOOL)));
10675
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10676
          new FieldValueMetaData(TType.STRUCT)));
10677
    }});
10678
 
10679
    static {
10680
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
10681
    }
10682
 
10683
    public addJacketNumber_result() {
10684
    }
10685
 
10686
    public addJacketNumber_result(
10687
      boolean success,
10688
      TransactionServiceException ex)
10689
    {
10690
      this();
10691
      this.success = success;
10692
      setSuccessIsSet(true);
10693
      this.ex = ex;
10694
    }
10695
 
10696
    /**
10697
     * Performs a deep copy on <i>other</i>.
10698
     */
10699
    public addJacketNumber_result(addJacketNumber_result other) {
10700
      __isset_bit_vector.clear();
10701
      __isset_bit_vector.or(other.__isset_bit_vector);
10702
      this.success = other.success;
10703
      if (other.isSetEx()) {
10704
        this.ex = new TransactionServiceException(other.ex);
10705
      }
10706
    }
10707
 
10708
    public addJacketNumber_result deepCopy() {
10709
      return new addJacketNumber_result(this);
10710
    }
10711
 
10712
    @Deprecated
10713
    public addJacketNumber_result clone() {
10714
      return new addJacketNumber_result(this);
10715
    }
10716
 
10717
    public boolean isSuccess() {
10718
      return this.success;
10719
    }
10720
 
10721
    public addJacketNumber_result setSuccess(boolean success) {
10722
      this.success = success;
10723
      setSuccessIsSet(true);
10724
      return this;
10725
    }
10726
 
10727
    public void unsetSuccess() {
10728
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10729
    }
10730
 
10731
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10732
    public boolean isSetSuccess() {
10733
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10734
    }
10735
 
10736
    public void setSuccessIsSet(boolean value) {
10737
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10738
    }
10739
 
10740
    public TransactionServiceException getEx() {
10741
      return this.ex;
10742
    }
10743
 
10744
    public addJacketNumber_result setEx(TransactionServiceException ex) {
10745
      this.ex = ex;
10746
      return this;
10747
    }
10748
 
10749
    public void unsetEx() {
10750
      this.ex = null;
10751
    }
10752
 
10753
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10754
    public boolean isSetEx() {
10755
      return this.ex != null;
10756
    }
10757
 
10758
    public void setExIsSet(boolean value) {
10759
      if (!value) {
10760
        this.ex = null;
10761
      }
10762
    }
10763
 
10764
    public void setFieldValue(_Fields field, Object value) {
10765
      switch (field) {
10766
      case SUCCESS:
10767
        if (value == null) {
10768
          unsetSuccess();
10769
        } else {
10770
          setSuccess((Boolean)value);
10771
        }
10772
        break;
10773
 
10774
      case EX:
10775
        if (value == null) {
10776
          unsetEx();
10777
        } else {
10778
          setEx((TransactionServiceException)value);
10779
        }
10780
        break;
10781
 
10782
      }
10783
    }
10784
 
10785
    public void setFieldValue(int fieldID, Object value) {
10786
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10787
    }
10788
 
10789
    public Object getFieldValue(_Fields field) {
10790
      switch (field) {
10791
      case SUCCESS:
10792
        return new Boolean(isSuccess());
10793
 
10794
      case EX:
10795
        return getEx();
10796
 
10797
      }
10798
      throw new IllegalStateException();
10799
    }
10800
 
10801
    public Object getFieldValue(int fieldId) {
10802
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10803
    }
10804
 
10805
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10806
    public boolean isSet(_Fields field) {
10807
      switch (field) {
10808
      case SUCCESS:
10809
        return isSetSuccess();
10810
      case EX:
10811
        return isSetEx();
10812
      }
10813
      throw new IllegalStateException();
10814
    }
10815
 
10816
    public boolean isSet(int fieldID) {
10817
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10818
    }
10819
 
10820
    @Override
10821
    public boolean equals(Object that) {
10822
      if (that == null)
10823
        return false;
10824
      if (that instanceof addJacketNumber_result)
10825
        return this.equals((addJacketNumber_result)that);
10826
      return false;
10827
    }
10828
 
10829
    public boolean equals(addJacketNumber_result that) {
10830
      if (that == null)
10831
        return false;
10832
 
10833
      boolean this_present_success = true;
10834
      boolean that_present_success = true;
10835
      if (this_present_success || that_present_success) {
10836
        if (!(this_present_success && that_present_success))
10837
          return false;
10838
        if (this.success != that.success)
10839
          return false;
10840
      }
10841
 
10842
      boolean this_present_ex = true && this.isSetEx();
10843
      boolean that_present_ex = true && that.isSetEx();
10844
      if (this_present_ex || that_present_ex) {
10845
        if (!(this_present_ex && that_present_ex))
10846
          return false;
10847
        if (!this.ex.equals(that.ex))
10848
          return false;
10849
      }
10850
 
10851
      return true;
10852
    }
10853
 
10854
    @Override
10855
    public int hashCode() {
10856
      return 0;
10857
    }
10858
 
10859
    public int compareTo(addJacketNumber_result other) {
10860
      if (!getClass().equals(other.getClass())) {
10861
        return getClass().getName().compareTo(other.getClass().getName());
10862
      }
10863
 
10864
      int lastComparison = 0;
10865
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
10866
 
10867
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10868
      if (lastComparison != 0) {
10869
        return lastComparison;
10870
      }
10871
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10872
      if (lastComparison != 0) {
10873
        return lastComparison;
10874
      }
10875
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10876
      if (lastComparison != 0) {
10877
        return lastComparison;
10878
      }
10879
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10880
      if (lastComparison != 0) {
10881
        return lastComparison;
10882
      }
10883
      return 0;
10884
    }
10885
 
10886
    public void read(TProtocol iprot) throws TException {
10887
      TField field;
10888
      iprot.readStructBegin();
10889
      while (true)
10890
      {
10891
        field = iprot.readFieldBegin();
10892
        if (field.type == TType.STOP) { 
10893
          break;
10894
        }
10895
        _Fields fieldId = _Fields.findByThriftId(field.id);
10896
        if (fieldId == null) {
10897
          TProtocolUtil.skip(iprot, field.type);
10898
        } else {
10899
          switch (fieldId) {
10900
            case SUCCESS:
10901
              if (field.type == TType.BOOL) {
10902
                this.success = iprot.readBool();
10903
                setSuccessIsSet(true);
10904
              } else { 
10905
                TProtocolUtil.skip(iprot, field.type);
10906
              }
10907
              break;
10908
            case EX:
10909
              if (field.type == TType.STRUCT) {
10910
                this.ex = new TransactionServiceException();
10911
                this.ex.read(iprot);
10912
              } else { 
10913
                TProtocolUtil.skip(iprot, field.type);
10914
              }
10915
              break;
10916
          }
10917
          iprot.readFieldEnd();
10918
        }
10919
      }
10920
      iprot.readStructEnd();
10921
      validate();
10922
    }
10923
 
10924
    public void write(TProtocol oprot) throws TException {
10925
      oprot.writeStructBegin(STRUCT_DESC);
10926
 
10927
      if (this.isSetSuccess()) {
10928
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10929
        oprot.writeBool(this.success);
10930
        oprot.writeFieldEnd();
10931
      } else if (this.isSetEx()) {
10932
        oprot.writeFieldBegin(EX_FIELD_DESC);
10933
        this.ex.write(oprot);
10934
        oprot.writeFieldEnd();
10935
      }
10936
      oprot.writeFieldStop();
10937
      oprot.writeStructEnd();
10938
    }
10939
 
10940
    @Override
10941
    public String toString() {
10942
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
10943
      boolean first = true;
10944
 
10945
      sb.append("success:");
10946
      sb.append(this.success);
10947
      first = false;
10948
      if (!first) sb.append(", ");
10949
      sb.append("ex:");
10950
      if (this.ex == null) {
10951
        sb.append("null");
10952
      } else {
10953
        sb.append(this.ex);
10954
      }
10955
      first = false;
10956
      sb.append(")");
10957
      return sb.toString();
10958
    }
10959
 
10960
    public void validate() throws TException {
10961
      // check for required fields
10962
    }
10963
 
10964
  }
10965
 
923 rajveer 10966
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
10967
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
10968
 
10969
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10970
 
10971
    private long orderId;
10972
 
10973
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10974
    public enum _Fields implements TFieldIdEnum {
10975
      ORDER_ID((short)1, "orderId");
10976
 
10977
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10978
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10979
 
10980
      static {
10981
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10982
          byId.put((int)field._thriftId, field);
10983
          byName.put(field.getFieldName(), field);
10984
        }
10985
      }
10986
 
10987
      /**
10988
       * Find the _Fields constant that matches fieldId, or null if its not found.
10989
       */
10990
      public static _Fields findByThriftId(int fieldId) {
10991
        return byId.get(fieldId);
10992
      }
10993
 
10994
      /**
10995
       * Find the _Fields constant that matches fieldId, throwing an exception
10996
       * if it is not found.
10997
       */
10998
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10999
        _Fields fields = findByThriftId(fieldId);
11000
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11001
        return fields;
11002
      }
11003
 
11004
      /**
11005
       * Find the _Fields constant that matches name, or null if its not found.
11006
       */
11007
      public static _Fields findByName(String name) {
11008
        return byName.get(name);
11009
      }
11010
 
11011
      private final short _thriftId;
11012
      private final String _fieldName;
11013
 
11014
      _Fields(short thriftId, String fieldName) {
11015
        _thriftId = thriftId;
11016
        _fieldName = fieldName;
11017
      }
11018
 
11019
      public short getThriftFieldId() {
11020
        return _thriftId;
11021
      }
11022
 
11023
      public String getFieldName() {
11024
        return _fieldName;
11025
      }
11026
    }
11027
 
11028
    // isset id assignments
11029
    private static final int __ORDERID_ISSET_ID = 0;
11030
    private BitSet __isset_bit_vector = new BitSet(1);
11031
 
11032
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11033
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
11034
          new FieldValueMetaData(TType.I64)));
11035
    }});
11036
 
11037
    static {
11038
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
11039
    }
11040
 
11041
    public acceptOrder_args() {
11042
    }
11043
 
11044
    public acceptOrder_args(
11045
      long orderId)
11046
    {
11047
      this();
11048
      this.orderId = orderId;
11049
      setOrderIdIsSet(true);
11050
    }
11051
 
11052
    /**
11053
     * Performs a deep copy on <i>other</i>.
11054
     */
11055
    public acceptOrder_args(acceptOrder_args other) {
11056
      __isset_bit_vector.clear();
11057
      __isset_bit_vector.or(other.__isset_bit_vector);
11058
      this.orderId = other.orderId;
11059
    }
11060
 
11061
    public acceptOrder_args deepCopy() {
11062
      return new acceptOrder_args(this);
11063
    }
11064
 
11065
    @Deprecated
11066
    public acceptOrder_args clone() {
11067
      return new acceptOrder_args(this);
11068
    }
11069
 
11070
    public long getOrderId() {
11071
      return this.orderId;
11072
    }
11073
 
11074
    public acceptOrder_args setOrderId(long orderId) {
11075
      this.orderId = orderId;
11076
      setOrderIdIsSet(true);
11077
      return this;
11078
    }
11079
 
11080
    public void unsetOrderId() {
11081
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11082
    }
11083
 
11084
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11085
    public boolean isSetOrderId() {
11086
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11087
    }
11088
 
11089
    public void setOrderIdIsSet(boolean value) {
11090
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11091
    }
11092
 
11093
    public void setFieldValue(_Fields field, Object value) {
11094
      switch (field) {
11095
      case ORDER_ID:
11096
        if (value == null) {
11097
          unsetOrderId();
11098
        } else {
11099
          setOrderId((Long)value);
11100
        }
11101
        break;
11102
 
11103
      }
11104
    }
11105
 
11106
    public void setFieldValue(int fieldID, Object value) {
11107
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11108
    }
11109
 
11110
    public Object getFieldValue(_Fields field) {
11111
      switch (field) {
11112
      case ORDER_ID:
11113
        return new Long(getOrderId());
11114
 
11115
      }
11116
      throw new IllegalStateException();
11117
    }
11118
 
11119
    public Object getFieldValue(int fieldId) {
11120
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11121
    }
11122
 
11123
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11124
    public boolean isSet(_Fields field) {
11125
      switch (field) {
11126
      case ORDER_ID:
11127
        return isSetOrderId();
11128
      }
11129
      throw new IllegalStateException();
11130
    }
11131
 
11132
    public boolean isSet(int fieldID) {
11133
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11134
    }
11135
 
11136
    @Override
11137
    public boolean equals(Object that) {
11138
      if (that == null)
11139
        return false;
11140
      if (that instanceof acceptOrder_args)
11141
        return this.equals((acceptOrder_args)that);
11142
      return false;
11143
    }
11144
 
11145
    public boolean equals(acceptOrder_args that) {
11146
      if (that == null)
11147
        return false;
11148
 
11149
      boolean this_present_orderId = true;
11150
      boolean that_present_orderId = true;
11151
      if (this_present_orderId || that_present_orderId) {
11152
        if (!(this_present_orderId && that_present_orderId))
11153
          return false;
11154
        if (this.orderId != that.orderId)
11155
          return false;
11156
      }
11157
 
11158
      return true;
11159
    }
11160
 
11161
    @Override
11162
    public int hashCode() {
11163
      return 0;
11164
    }
11165
 
11166
    public int compareTo(acceptOrder_args other) {
11167
      if (!getClass().equals(other.getClass())) {
11168
        return getClass().getName().compareTo(other.getClass().getName());
11169
      }
11170
 
11171
      int lastComparison = 0;
11172
      acceptOrder_args typedOther = (acceptOrder_args)other;
11173
 
11174
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11175
      if (lastComparison != 0) {
11176
        return lastComparison;
11177
      }
11178
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11179
      if (lastComparison != 0) {
11180
        return lastComparison;
11181
      }
11182
      return 0;
11183
    }
11184
 
11185
    public void read(TProtocol iprot) throws TException {
11186
      TField field;
11187
      iprot.readStructBegin();
11188
      while (true)
11189
      {
11190
        field = iprot.readFieldBegin();
11191
        if (field.type == TType.STOP) { 
11192
          break;
11193
        }
11194
        _Fields fieldId = _Fields.findByThriftId(field.id);
11195
        if (fieldId == null) {
11196
          TProtocolUtil.skip(iprot, field.type);
11197
        } else {
11198
          switch (fieldId) {
11199
            case ORDER_ID:
11200
              if (field.type == TType.I64) {
11201
                this.orderId = iprot.readI64();
11202
                setOrderIdIsSet(true);
11203
              } else { 
11204
                TProtocolUtil.skip(iprot, field.type);
11205
              }
11206
              break;
11207
          }
11208
          iprot.readFieldEnd();
11209
        }
11210
      }
11211
      iprot.readStructEnd();
11212
      validate();
11213
    }
11214
 
11215
    public void write(TProtocol oprot) throws TException {
11216
      validate();
11217
 
11218
      oprot.writeStructBegin(STRUCT_DESC);
11219
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11220
      oprot.writeI64(this.orderId);
11221
      oprot.writeFieldEnd();
11222
      oprot.writeFieldStop();
11223
      oprot.writeStructEnd();
11224
    }
11225
 
11226
    @Override
11227
    public String toString() {
11228
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
11229
      boolean first = true;
11230
 
11231
      sb.append("orderId:");
11232
      sb.append(this.orderId);
11233
      first = false;
11234
      sb.append(")");
11235
      return sb.toString();
11236
    }
11237
 
11238
    public void validate() throws TException {
11239
      // check for required fields
11240
    }
11241
 
11242
  }
11243
 
11244
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
11245
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
11246
 
11247
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11248
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11249
 
11250
    private boolean success;
11251
    private TransactionServiceException ex;
11252
 
11253
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11254
    public enum _Fields implements TFieldIdEnum {
11255
      SUCCESS((short)0, "success"),
11256
      EX((short)1, "ex");
11257
 
11258
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11260
 
11261
      static {
11262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11263
          byId.put((int)field._thriftId, field);
11264
          byName.put(field.getFieldName(), field);
11265
        }
11266
      }
11267
 
11268
      /**
11269
       * Find the _Fields constant that matches fieldId, or null if its not found.
11270
       */
11271
      public static _Fields findByThriftId(int fieldId) {
11272
        return byId.get(fieldId);
11273
      }
11274
 
11275
      /**
11276
       * Find the _Fields constant that matches fieldId, throwing an exception
11277
       * if it is not found.
11278
       */
11279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11280
        _Fields fields = findByThriftId(fieldId);
11281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11282
        return fields;
11283
      }
11284
 
11285
      /**
11286
       * Find the _Fields constant that matches name, or null if its not found.
11287
       */
11288
      public static _Fields findByName(String name) {
11289
        return byName.get(name);
11290
      }
11291
 
11292
      private final short _thriftId;
11293
      private final String _fieldName;
11294
 
11295
      _Fields(short thriftId, String fieldName) {
11296
        _thriftId = thriftId;
11297
        _fieldName = fieldName;
11298
      }
11299
 
11300
      public short getThriftFieldId() {
11301
        return _thriftId;
11302
      }
11303
 
11304
      public String getFieldName() {
11305
        return _fieldName;
11306
      }
11307
    }
11308
 
11309
    // isset id assignments
11310
    private static final int __SUCCESS_ISSET_ID = 0;
11311
    private BitSet __isset_bit_vector = new BitSet(1);
11312
 
11313
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11314
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11315
          new FieldValueMetaData(TType.BOOL)));
11316
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11317
          new FieldValueMetaData(TType.STRUCT)));
11318
    }});
11319
 
11320
    static {
11321
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
11322
    }
11323
 
11324
    public acceptOrder_result() {
11325
    }
11326
 
11327
    public acceptOrder_result(
11328
      boolean success,
11329
      TransactionServiceException ex)
11330
    {
11331
      this();
11332
      this.success = success;
11333
      setSuccessIsSet(true);
11334
      this.ex = ex;
11335
    }
11336
 
11337
    /**
11338
     * Performs a deep copy on <i>other</i>.
11339
     */
11340
    public acceptOrder_result(acceptOrder_result other) {
11341
      __isset_bit_vector.clear();
11342
      __isset_bit_vector.or(other.__isset_bit_vector);
11343
      this.success = other.success;
11344
      if (other.isSetEx()) {
11345
        this.ex = new TransactionServiceException(other.ex);
11346
      }
11347
    }
11348
 
11349
    public acceptOrder_result deepCopy() {
11350
      return new acceptOrder_result(this);
11351
    }
11352
 
11353
    @Deprecated
11354
    public acceptOrder_result clone() {
11355
      return new acceptOrder_result(this);
11356
    }
11357
 
11358
    public boolean isSuccess() {
11359
      return this.success;
11360
    }
11361
 
11362
    public acceptOrder_result setSuccess(boolean success) {
11363
      this.success = success;
11364
      setSuccessIsSet(true);
11365
      return this;
11366
    }
11367
 
11368
    public void unsetSuccess() {
11369
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11370
    }
11371
 
11372
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11373
    public boolean isSetSuccess() {
11374
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11375
    }
11376
 
11377
    public void setSuccessIsSet(boolean value) {
11378
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11379
    }
11380
 
11381
    public TransactionServiceException getEx() {
11382
      return this.ex;
11383
    }
11384
 
11385
    public acceptOrder_result setEx(TransactionServiceException ex) {
11386
      this.ex = ex;
11387
      return this;
11388
    }
11389
 
11390
    public void unsetEx() {
11391
      this.ex = null;
11392
    }
11393
 
11394
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11395
    public boolean isSetEx() {
11396
      return this.ex != null;
11397
    }
11398
 
11399
    public void setExIsSet(boolean value) {
11400
      if (!value) {
11401
        this.ex = null;
11402
      }
11403
    }
11404
 
11405
    public void setFieldValue(_Fields field, Object value) {
11406
      switch (field) {
11407
      case SUCCESS:
11408
        if (value == null) {
11409
          unsetSuccess();
11410
        } else {
11411
          setSuccess((Boolean)value);
11412
        }
11413
        break;
11414
 
11415
      case EX:
11416
        if (value == null) {
11417
          unsetEx();
11418
        } else {
11419
          setEx((TransactionServiceException)value);
11420
        }
11421
        break;
11422
 
11423
      }
11424
    }
11425
 
11426
    public void setFieldValue(int fieldID, Object value) {
11427
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11428
    }
11429
 
11430
    public Object getFieldValue(_Fields field) {
11431
      switch (field) {
11432
      case SUCCESS:
11433
        return new Boolean(isSuccess());
11434
 
11435
      case EX:
11436
        return getEx();
11437
 
11438
      }
11439
      throw new IllegalStateException();
11440
    }
11441
 
11442
    public Object getFieldValue(int fieldId) {
11443
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11444
    }
11445
 
11446
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11447
    public boolean isSet(_Fields field) {
11448
      switch (field) {
11449
      case SUCCESS:
11450
        return isSetSuccess();
11451
      case EX:
11452
        return isSetEx();
11453
      }
11454
      throw new IllegalStateException();
11455
    }
11456
 
11457
    public boolean isSet(int fieldID) {
11458
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11459
    }
11460
 
11461
    @Override
11462
    public boolean equals(Object that) {
11463
      if (that == null)
11464
        return false;
11465
      if (that instanceof acceptOrder_result)
11466
        return this.equals((acceptOrder_result)that);
11467
      return false;
11468
    }
11469
 
11470
    public boolean equals(acceptOrder_result that) {
11471
      if (that == null)
11472
        return false;
11473
 
11474
      boolean this_present_success = true;
11475
      boolean that_present_success = true;
11476
      if (this_present_success || that_present_success) {
11477
        if (!(this_present_success && that_present_success))
11478
          return false;
11479
        if (this.success != that.success)
11480
          return false;
11481
      }
11482
 
11483
      boolean this_present_ex = true && this.isSetEx();
11484
      boolean that_present_ex = true && that.isSetEx();
11485
      if (this_present_ex || that_present_ex) {
11486
        if (!(this_present_ex && that_present_ex))
11487
          return false;
11488
        if (!this.ex.equals(that.ex))
11489
          return false;
11490
      }
11491
 
11492
      return true;
11493
    }
11494
 
11495
    @Override
11496
    public int hashCode() {
11497
      return 0;
11498
    }
11499
 
11500
    public int compareTo(acceptOrder_result other) {
11501
      if (!getClass().equals(other.getClass())) {
11502
        return getClass().getName().compareTo(other.getClass().getName());
11503
      }
11504
 
11505
      int lastComparison = 0;
11506
      acceptOrder_result typedOther = (acceptOrder_result)other;
11507
 
11508
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11509
      if (lastComparison != 0) {
11510
        return lastComparison;
11511
      }
11512
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11513
      if (lastComparison != 0) {
11514
        return lastComparison;
11515
      }
11516
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11517
      if (lastComparison != 0) {
11518
        return lastComparison;
11519
      }
11520
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11521
      if (lastComparison != 0) {
11522
        return lastComparison;
11523
      }
11524
      return 0;
11525
    }
11526
 
11527
    public void read(TProtocol iprot) throws TException {
11528
      TField field;
11529
      iprot.readStructBegin();
11530
      while (true)
11531
      {
11532
        field = iprot.readFieldBegin();
11533
        if (field.type == TType.STOP) { 
11534
          break;
11535
        }
11536
        _Fields fieldId = _Fields.findByThriftId(field.id);
11537
        if (fieldId == null) {
11538
          TProtocolUtil.skip(iprot, field.type);
11539
        } else {
11540
          switch (fieldId) {
11541
            case SUCCESS:
11542
              if (field.type == TType.BOOL) {
11543
                this.success = iprot.readBool();
11544
                setSuccessIsSet(true);
11545
              } else { 
11546
                TProtocolUtil.skip(iprot, field.type);
11547
              }
11548
              break;
11549
            case EX:
11550
              if (field.type == TType.STRUCT) {
11551
                this.ex = new TransactionServiceException();
11552
                this.ex.read(iprot);
11553
              } else { 
11554
                TProtocolUtil.skip(iprot, field.type);
11555
              }
11556
              break;
11557
          }
11558
          iprot.readFieldEnd();
11559
        }
11560
      }
11561
      iprot.readStructEnd();
11562
      validate();
11563
    }
11564
 
11565
    public void write(TProtocol oprot) throws TException {
11566
      oprot.writeStructBegin(STRUCT_DESC);
11567
 
11568
      if (this.isSetSuccess()) {
11569
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11570
        oprot.writeBool(this.success);
11571
        oprot.writeFieldEnd();
11572
      } else if (this.isSetEx()) {
11573
        oprot.writeFieldBegin(EX_FIELD_DESC);
11574
        this.ex.write(oprot);
11575
        oprot.writeFieldEnd();
11576
      }
11577
      oprot.writeFieldStop();
11578
      oprot.writeStructEnd();
11579
    }
11580
 
11581
    @Override
11582
    public String toString() {
11583
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
11584
      boolean first = true;
11585
 
11586
      sb.append("success:");
11587
      sb.append(this.success);
11588
      first = false;
11589
      if (!first) sb.append(", ");
11590
      sb.append("ex:");
11591
      if (this.ex == null) {
11592
        sb.append("null");
11593
      } else {
11594
        sb.append(this.ex);
11595
      }
11596
      first = false;
11597
      sb.append(")");
11598
      return sb.toString();
11599
    }
11600
 
11601
    public void validate() throws TException {
11602
      // check for required fields
11603
    }
11604
 
11605
  }
11606
 
11607
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
11608
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
11609
 
11610
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11611
 
11612
    private long orderId;
11613
 
11614
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11615
    public enum _Fields implements TFieldIdEnum {
11616
      ORDER_ID((short)1, "orderId");
11617
 
11618
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11619
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11620
 
11621
      static {
11622
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11623
          byId.put((int)field._thriftId, field);
11624
          byName.put(field.getFieldName(), field);
11625
        }
11626
      }
11627
 
11628
      /**
11629
       * Find the _Fields constant that matches fieldId, or null if its not found.
11630
       */
11631
      public static _Fields findByThriftId(int fieldId) {
11632
        return byId.get(fieldId);
11633
      }
11634
 
11635
      /**
11636
       * Find the _Fields constant that matches fieldId, throwing an exception
11637
       * if it is not found.
11638
       */
11639
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11640
        _Fields fields = findByThriftId(fieldId);
11641
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11642
        return fields;
11643
      }
11644
 
11645
      /**
11646
       * Find the _Fields constant that matches name, or null if its not found.
11647
       */
11648
      public static _Fields findByName(String name) {
11649
        return byName.get(name);
11650
      }
11651
 
11652
      private final short _thriftId;
11653
      private final String _fieldName;
11654
 
11655
      _Fields(short thriftId, String fieldName) {
11656
        _thriftId = thriftId;
11657
        _fieldName = fieldName;
11658
      }
11659
 
11660
      public short getThriftFieldId() {
11661
        return _thriftId;
11662
      }
11663
 
11664
      public String getFieldName() {
11665
        return _fieldName;
11666
      }
11667
    }
11668
 
11669
    // isset id assignments
11670
    private static final int __ORDERID_ISSET_ID = 0;
11671
    private BitSet __isset_bit_vector = new BitSet(1);
11672
 
11673
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11674
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
11675
          new FieldValueMetaData(TType.I64)));
11676
    }});
11677
 
11678
    static {
11679
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
11680
    }
11681
 
11682
    public billOrder_args() {
11683
    }
11684
 
11685
    public billOrder_args(
11686
      long orderId)
11687
    {
11688
      this();
11689
      this.orderId = orderId;
11690
      setOrderIdIsSet(true);
11691
    }
11692
 
11693
    /**
11694
     * Performs a deep copy on <i>other</i>.
11695
     */
11696
    public billOrder_args(billOrder_args other) {
11697
      __isset_bit_vector.clear();
11698
      __isset_bit_vector.or(other.__isset_bit_vector);
11699
      this.orderId = other.orderId;
11700
    }
11701
 
11702
    public billOrder_args deepCopy() {
11703
      return new billOrder_args(this);
11704
    }
11705
 
11706
    @Deprecated
11707
    public billOrder_args clone() {
11708
      return new billOrder_args(this);
11709
    }
11710
 
11711
    public long getOrderId() {
11712
      return this.orderId;
11713
    }
11714
 
11715
    public billOrder_args setOrderId(long orderId) {
11716
      this.orderId = orderId;
11717
      setOrderIdIsSet(true);
11718
      return this;
11719
    }
11720
 
11721
    public void unsetOrderId() {
11722
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11723
    }
11724
 
11725
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11726
    public boolean isSetOrderId() {
11727
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11728
    }
11729
 
11730
    public void setOrderIdIsSet(boolean value) {
11731
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11732
    }
11733
 
11734
    public void setFieldValue(_Fields field, Object value) {
11735
      switch (field) {
11736
      case ORDER_ID:
11737
        if (value == null) {
11738
          unsetOrderId();
11739
        } else {
11740
          setOrderId((Long)value);
11741
        }
11742
        break;
11743
 
11744
      }
11745
    }
11746
 
11747
    public void setFieldValue(int fieldID, Object value) {
11748
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11749
    }
11750
 
11751
    public Object getFieldValue(_Fields field) {
11752
      switch (field) {
11753
      case ORDER_ID:
11754
        return new Long(getOrderId());
11755
 
11756
      }
11757
      throw new IllegalStateException();
11758
    }
11759
 
11760
    public Object getFieldValue(int fieldId) {
11761
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11762
    }
11763
 
11764
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11765
    public boolean isSet(_Fields field) {
11766
      switch (field) {
11767
      case ORDER_ID:
11768
        return isSetOrderId();
11769
      }
11770
      throw new IllegalStateException();
11771
    }
11772
 
11773
    public boolean isSet(int fieldID) {
11774
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11775
    }
11776
 
11777
    @Override
11778
    public boolean equals(Object that) {
11779
      if (that == null)
11780
        return false;
11781
      if (that instanceof billOrder_args)
11782
        return this.equals((billOrder_args)that);
11783
      return false;
11784
    }
11785
 
11786
    public boolean equals(billOrder_args that) {
11787
      if (that == null)
11788
        return false;
11789
 
11790
      boolean this_present_orderId = true;
11791
      boolean that_present_orderId = true;
11792
      if (this_present_orderId || that_present_orderId) {
11793
        if (!(this_present_orderId && that_present_orderId))
11794
          return false;
11795
        if (this.orderId != that.orderId)
11796
          return false;
11797
      }
11798
 
11799
      return true;
11800
    }
11801
 
11802
    @Override
11803
    public int hashCode() {
11804
      return 0;
11805
    }
11806
 
11807
    public int compareTo(billOrder_args other) {
11808
      if (!getClass().equals(other.getClass())) {
11809
        return getClass().getName().compareTo(other.getClass().getName());
11810
      }
11811
 
11812
      int lastComparison = 0;
11813
      billOrder_args typedOther = (billOrder_args)other;
11814
 
11815
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11816
      if (lastComparison != 0) {
11817
        return lastComparison;
11818
      }
11819
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11820
      if (lastComparison != 0) {
11821
        return lastComparison;
11822
      }
11823
      return 0;
11824
    }
11825
 
11826
    public void read(TProtocol iprot) throws TException {
11827
      TField field;
11828
      iprot.readStructBegin();
11829
      while (true)
11830
      {
11831
        field = iprot.readFieldBegin();
11832
        if (field.type == TType.STOP) { 
11833
          break;
11834
        }
11835
        _Fields fieldId = _Fields.findByThriftId(field.id);
11836
        if (fieldId == null) {
11837
          TProtocolUtil.skip(iprot, field.type);
11838
        } else {
11839
          switch (fieldId) {
11840
            case ORDER_ID:
11841
              if (field.type == TType.I64) {
11842
                this.orderId = iprot.readI64();
11843
                setOrderIdIsSet(true);
11844
              } else { 
11845
                TProtocolUtil.skip(iprot, field.type);
11846
              }
11847
              break;
11848
          }
11849
          iprot.readFieldEnd();
11850
        }
11851
      }
11852
      iprot.readStructEnd();
11853
      validate();
11854
    }
11855
 
11856
    public void write(TProtocol oprot) throws TException {
11857
      validate();
11858
 
11859
      oprot.writeStructBegin(STRUCT_DESC);
11860
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11861
      oprot.writeI64(this.orderId);
11862
      oprot.writeFieldEnd();
11863
      oprot.writeFieldStop();
11864
      oprot.writeStructEnd();
11865
    }
11866
 
11867
    @Override
11868
    public String toString() {
11869
      StringBuilder sb = new StringBuilder("billOrder_args(");
11870
      boolean first = true;
11871
 
11872
      sb.append("orderId:");
11873
      sb.append(this.orderId);
11874
      first = false;
11875
      sb.append(")");
11876
      return sb.toString();
11877
    }
11878
 
11879
    public void validate() throws TException {
11880
      // check for required fields
11881
    }
11882
 
11883
  }
11884
 
11885
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
11886
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
11887
 
11888
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11889
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11890
 
11891
    private boolean success;
11892
    private TransactionServiceException ex;
11893
 
11894
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11895
    public enum _Fields implements TFieldIdEnum {
11896
      SUCCESS((short)0, "success"),
11897
      EX((short)1, "ex");
11898
 
11899
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11900
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11901
 
11902
      static {
11903
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11904
          byId.put((int)field._thriftId, field);
11905
          byName.put(field.getFieldName(), field);
11906
        }
11907
      }
11908
 
11909
      /**
11910
       * Find the _Fields constant that matches fieldId, or null if its not found.
11911
       */
11912
      public static _Fields findByThriftId(int fieldId) {
11913
        return byId.get(fieldId);
11914
      }
11915
 
11916
      /**
11917
       * Find the _Fields constant that matches fieldId, throwing an exception
11918
       * if it is not found.
11919
       */
11920
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11921
        _Fields fields = findByThriftId(fieldId);
11922
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11923
        return fields;
11924
      }
11925
 
11926
      /**
11927
       * Find the _Fields constant that matches name, or null if its not found.
11928
       */
11929
      public static _Fields findByName(String name) {
11930
        return byName.get(name);
11931
      }
11932
 
11933
      private final short _thriftId;
11934
      private final String _fieldName;
11935
 
11936
      _Fields(short thriftId, String fieldName) {
11937
        _thriftId = thriftId;
11938
        _fieldName = fieldName;
11939
      }
11940
 
11941
      public short getThriftFieldId() {
11942
        return _thriftId;
11943
      }
11944
 
11945
      public String getFieldName() {
11946
        return _fieldName;
11947
      }
11948
    }
11949
 
11950
    // isset id assignments
11951
    private static final int __SUCCESS_ISSET_ID = 0;
11952
    private BitSet __isset_bit_vector = new BitSet(1);
11953
 
11954
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11955
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11956
          new FieldValueMetaData(TType.BOOL)));
11957
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11958
          new FieldValueMetaData(TType.STRUCT)));
11959
    }});
11960
 
11961
    static {
11962
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
11963
    }
11964
 
11965
    public billOrder_result() {
11966
    }
11967
 
11968
    public billOrder_result(
11969
      boolean success,
11970
      TransactionServiceException ex)
11971
    {
11972
      this();
11973
      this.success = success;
11974
      setSuccessIsSet(true);
11975
      this.ex = ex;
11976
    }
11977
 
11978
    /**
11979
     * Performs a deep copy on <i>other</i>.
11980
     */
11981
    public billOrder_result(billOrder_result other) {
11982
      __isset_bit_vector.clear();
11983
      __isset_bit_vector.or(other.__isset_bit_vector);
11984
      this.success = other.success;
11985
      if (other.isSetEx()) {
11986
        this.ex = new TransactionServiceException(other.ex);
11987
      }
11988
    }
11989
 
11990
    public billOrder_result deepCopy() {
11991
      return new billOrder_result(this);
11992
    }
11993
 
11994
    @Deprecated
11995
    public billOrder_result clone() {
11996
      return new billOrder_result(this);
11997
    }
11998
 
11999
    public boolean isSuccess() {
12000
      return this.success;
12001
    }
12002
 
12003
    public billOrder_result setSuccess(boolean success) {
12004
      this.success = success;
12005
      setSuccessIsSet(true);
12006
      return this;
12007
    }
12008
 
12009
    public void unsetSuccess() {
12010
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12011
    }
12012
 
12013
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12014
    public boolean isSetSuccess() {
12015
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12016
    }
12017
 
12018
    public void setSuccessIsSet(boolean value) {
12019
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12020
    }
12021
 
12022
    public TransactionServiceException getEx() {
12023
      return this.ex;
12024
    }
12025
 
12026
    public billOrder_result setEx(TransactionServiceException ex) {
12027
      this.ex = ex;
12028
      return this;
12029
    }
12030
 
12031
    public void unsetEx() {
12032
      this.ex = null;
12033
    }
12034
 
12035
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12036
    public boolean isSetEx() {
12037
      return this.ex != null;
12038
    }
12039
 
12040
    public void setExIsSet(boolean value) {
12041
      if (!value) {
12042
        this.ex = null;
12043
      }
12044
    }
12045
 
12046
    public void setFieldValue(_Fields field, Object value) {
12047
      switch (field) {
12048
      case SUCCESS:
12049
        if (value == null) {
12050
          unsetSuccess();
12051
        } else {
12052
          setSuccess((Boolean)value);
12053
        }
12054
        break;
12055
 
12056
      case EX:
12057
        if (value == null) {
12058
          unsetEx();
12059
        } else {
12060
          setEx((TransactionServiceException)value);
12061
        }
12062
        break;
12063
 
12064
      }
12065
    }
12066
 
12067
    public void setFieldValue(int fieldID, Object value) {
12068
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12069
    }
12070
 
12071
    public Object getFieldValue(_Fields field) {
12072
      switch (field) {
12073
      case SUCCESS:
12074
        return new Boolean(isSuccess());
12075
 
12076
      case EX:
12077
        return getEx();
12078
 
12079
      }
12080
      throw new IllegalStateException();
12081
    }
12082
 
12083
    public Object getFieldValue(int fieldId) {
12084
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12085
    }
12086
 
12087
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12088
    public boolean isSet(_Fields field) {
12089
      switch (field) {
12090
      case SUCCESS:
12091
        return isSetSuccess();
12092
      case EX:
12093
        return isSetEx();
12094
      }
12095
      throw new IllegalStateException();
12096
    }
12097
 
12098
    public boolean isSet(int fieldID) {
12099
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12100
    }
12101
 
12102
    @Override
12103
    public boolean equals(Object that) {
12104
      if (that == null)
12105
        return false;
12106
      if (that instanceof billOrder_result)
12107
        return this.equals((billOrder_result)that);
12108
      return false;
12109
    }
12110
 
12111
    public boolean equals(billOrder_result that) {
12112
      if (that == null)
12113
        return false;
12114
 
12115
      boolean this_present_success = true;
12116
      boolean that_present_success = true;
12117
      if (this_present_success || that_present_success) {
12118
        if (!(this_present_success && that_present_success))
12119
          return false;
12120
        if (this.success != that.success)
12121
          return false;
12122
      }
12123
 
12124
      boolean this_present_ex = true && this.isSetEx();
12125
      boolean that_present_ex = true && that.isSetEx();
12126
      if (this_present_ex || that_present_ex) {
12127
        if (!(this_present_ex && that_present_ex))
12128
          return false;
12129
        if (!this.ex.equals(that.ex))
12130
          return false;
12131
      }
12132
 
12133
      return true;
12134
    }
12135
 
12136
    @Override
12137
    public int hashCode() {
12138
      return 0;
12139
    }
12140
 
12141
    public int compareTo(billOrder_result other) {
12142
      if (!getClass().equals(other.getClass())) {
12143
        return getClass().getName().compareTo(other.getClass().getName());
12144
      }
12145
 
12146
      int lastComparison = 0;
12147
      billOrder_result typedOther = (billOrder_result)other;
12148
 
12149
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12150
      if (lastComparison != 0) {
12151
        return lastComparison;
12152
      }
12153
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12154
      if (lastComparison != 0) {
12155
        return lastComparison;
12156
      }
12157
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12158
      if (lastComparison != 0) {
12159
        return lastComparison;
12160
      }
12161
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12162
      if (lastComparison != 0) {
12163
        return lastComparison;
12164
      }
12165
      return 0;
12166
    }
12167
 
12168
    public void read(TProtocol iprot) throws TException {
12169
      TField field;
12170
      iprot.readStructBegin();
12171
      while (true)
12172
      {
12173
        field = iprot.readFieldBegin();
12174
        if (field.type == TType.STOP) { 
12175
          break;
12176
        }
12177
        _Fields fieldId = _Fields.findByThriftId(field.id);
12178
        if (fieldId == null) {
12179
          TProtocolUtil.skip(iprot, field.type);
12180
        } else {
12181
          switch (fieldId) {
12182
            case SUCCESS:
12183
              if (field.type == TType.BOOL) {
12184
                this.success = iprot.readBool();
12185
                setSuccessIsSet(true);
12186
              } else { 
12187
                TProtocolUtil.skip(iprot, field.type);
12188
              }
12189
              break;
12190
            case EX:
12191
              if (field.type == TType.STRUCT) {
12192
                this.ex = new TransactionServiceException();
12193
                this.ex.read(iprot);
12194
              } else { 
12195
                TProtocolUtil.skip(iprot, field.type);
12196
              }
12197
              break;
12198
          }
12199
          iprot.readFieldEnd();
12200
        }
12201
      }
12202
      iprot.readStructEnd();
12203
      validate();
12204
    }
12205
 
12206
    public void write(TProtocol oprot) throws TException {
12207
      oprot.writeStructBegin(STRUCT_DESC);
12208
 
12209
      if (this.isSetSuccess()) {
12210
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12211
        oprot.writeBool(this.success);
12212
        oprot.writeFieldEnd();
12213
      } else if (this.isSetEx()) {
12214
        oprot.writeFieldBegin(EX_FIELD_DESC);
12215
        this.ex.write(oprot);
12216
        oprot.writeFieldEnd();
12217
      }
12218
      oprot.writeFieldStop();
12219
      oprot.writeStructEnd();
12220
    }
12221
 
12222
    @Override
12223
    public String toString() {
12224
      StringBuilder sb = new StringBuilder("billOrder_result(");
12225
      boolean first = true;
12226
 
12227
      sb.append("success:");
12228
      sb.append(this.success);
12229
      first = false;
12230
      if (!first) sb.append(", ");
12231
      sb.append("ex:");
12232
      if (this.ex == null) {
12233
        sb.append("null");
12234
      } else {
12235
        sb.append(this.ex);
12236
      }
12237
      first = false;
12238
      sb.append(")");
12239
      return sb.toString();
12240
    }
12241
 
12242
    public void validate() throws TException {
12243
      // check for required fields
12244
    }
12245
 
12246
  }
12247
 
483 rajveer 12248
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
12249
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 12250
 
12251
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
12252
 
12253
    private long transactionId;
12254
 
12255
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12256
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12257
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 12258
 
12259
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12260
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12261
 
12262
      static {
12263
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12264
          byId.put((int)field._thriftId, field);
12265
          byName.put(field.getFieldName(), field);
12266
        }
12267
      }
12268
 
12269
      /**
12270
       * Find the _Fields constant that matches fieldId, or null if its not found.
12271
       */
12272
      public static _Fields findByThriftId(int fieldId) {
12273
        return byId.get(fieldId);
12274
      }
12275
 
12276
      /**
12277
       * Find the _Fields constant that matches fieldId, throwing an exception
12278
       * if it is not found.
12279
       */
12280
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12281
        _Fields fields = findByThriftId(fieldId);
12282
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12283
        return fields;
12284
      }
12285
 
12286
      /**
12287
       * Find the _Fields constant that matches name, or null if its not found.
12288
       */
12289
      public static _Fields findByName(String name) {
12290
        return byName.get(name);
12291
      }
12292
 
12293
      private final short _thriftId;
12294
      private final String _fieldName;
12295
 
12296
      _Fields(short thriftId, String fieldName) {
12297
        _thriftId = thriftId;
12298
        _fieldName = fieldName;
12299
      }
12300
 
12301
      public short getThriftFieldId() {
12302
        return _thriftId;
12303
      }
12304
 
12305
      public String getFieldName() {
12306
        return _fieldName;
12307
      }
12308
    }
12309
 
12310
    // isset id assignments
12311
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 12312
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 12313
 
12314
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12315
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12316
          new FieldValueMetaData(TType.I64)));
12317
    }});
12318
 
12319
    static {
483 rajveer 12320
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 12321
    }
12322
 
483 rajveer 12323
    public getOrdersForTransaction_args() {
68 ashish 12324
    }
12325
 
483 rajveer 12326
    public getOrdersForTransaction_args(
12327
      long transactionId)
68 ashish 12328
    {
12329
      this();
12330
      this.transactionId = transactionId;
12331
      setTransactionIdIsSet(true);
12332
    }
12333
 
12334
    /**
12335
     * Performs a deep copy on <i>other</i>.
12336
     */
483 rajveer 12337
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 12338
      __isset_bit_vector.clear();
12339
      __isset_bit_vector.or(other.__isset_bit_vector);
12340
      this.transactionId = other.transactionId;
12341
    }
12342
 
483 rajveer 12343
    public getOrdersForTransaction_args deepCopy() {
12344
      return new getOrdersForTransaction_args(this);
68 ashish 12345
    }
12346
 
12347
    @Deprecated
483 rajveer 12348
    public getOrdersForTransaction_args clone() {
12349
      return new getOrdersForTransaction_args(this);
68 ashish 12350
    }
12351
 
12352
    public long getTransactionId() {
12353
      return this.transactionId;
12354
    }
12355
 
483 rajveer 12356
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 12357
      this.transactionId = transactionId;
12358
      setTransactionIdIsSet(true);
12359
      return this;
12360
    }
12361
 
12362
    public void unsetTransactionId() {
12363
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12364
    }
12365
 
12366
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12367
    public boolean isSetTransactionId() {
12368
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12369
    }
12370
 
12371
    public void setTransactionIdIsSet(boolean value) {
12372
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12373
    }
12374
 
12375
    public void setFieldValue(_Fields field, Object value) {
12376
      switch (field) {
12377
      case TRANSACTION_ID:
12378
        if (value == null) {
12379
          unsetTransactionId();
12380
        } else {
12381
          setTransactionId((Long)value);
12382
        }
12383
        break;
12384
 
12385
      }
12386
    }
12387
 
12388
    public void setFieldValue(int fieldID, Object value) {
12389
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12390
    }
12391
 
12392
    public Object getFieldValue(_Fields field) {
12393
      switch (field) {
12394
      case TRANSACTION_ID:
12395
        return new Long(getTransactionId());
12396
 
12397
      }
12398
      throw new IllegalStateException();
12399
    }
12400
 
12401
    public Object getFieldValue(int fieldId) {
12402
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12403
    }
12404
 
12405
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12406
    public boolean isSet(_Fields field) {
12407
      switch (field) {
12408
      case TRANSACTION_ID:
12409
        return isSetTransactionId();
12410
      }
12411
      throw new IllegalStateException();
12412
    }
12413
 
12414
    public boolean isSet(int fieldID) {
12415
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12416
    }
12417
 
12418
    @Override
12419
    public boolean equals(Object that) {
12420
      if (that == null)
12421
        return false;
483 rajveer 12422
      if (that instanceof getOrdersForTransaction_args)
12423
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 12424
      return false;
12425
    }
12426
 
483 rajveer 12427
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 12428
      if (that == null)
12429
        return false;
12430
 
12431
      boolean this_present_transactionId = true;
12432
      boolean that_present_transactionId = true;
12433
      if (this_present_transactionId || that_present_transactionId) {
12434
        if (!(this_present_transactionId && that_present_transactionId))
12435
          return false;
12436
        if (this.transactionId != that.transactionId)
12437
          return false;
12438
      }
12439
 
12440
      return true;
12441
    }
12442
 
12443
    @Override
12444
    public int hashCode() {
12445
      return 0;
12446
    }
12447
 
483 rajveer 12448
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 12449
      if (!getClass().equals(other.getClass())) {
12450
        return getClass().getName().compareTo(other.getClass().getName());
12451
      }
12452
 
12453
      int lastComparison = 0;
483 rajveer 12454
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 12455
 
12456
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
12457
      if (lastComparison != 0) {
12458
        return lastComparison;
12459
      }
12460
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
12461
      if (lastComparison != 0) {
12462
        return lastComparison;
12463
      }
12464
      return 0;
12465
    }
12466
 
12467
    public void read(TProtocol iprot) throws TException {
12468
      TField field;
12469
      iprot.readStructBegin();
12470
      while (true)
12471
      {
12472
        field = iprot.readFieldBegin();
12473
        if (field.type == TType.STOP) { 
12474
          break;
12475
        }
12476
        _Fields fieldId = _Fields.findByThriftId(field.id);
12477
        if (fieldId == null) {
12478
          TProtocolUtil.skip(iprot, field.type);
12479
        } else {
12480
          switch (fieldId) {
12481
            case TRANSACTION_ID:
12482
              if (field.type == TType.I64) {
12483
                this.transactionId = iprot.readI64();
12484
                setTransactionIdIsSet(true);
12485
              } else { 
12486
                TProtocolUtil.skip(iprot, field.type);
12487
              }
12488
              break;
12489
          }
12490
          iprot.readFieldEnd();
12491
        }
12492
      }
12493
      iprot.readStructEnd();
12494
      validate();
12495
    }
12496
 
12497
    public void write(TProtocol oprot) throws TException {
12498
      validate();
12499
 
12500
      oprot.writeStructBegin(STRUCT_DESC);
12501
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
12502
      oprot.writeI64(this.transactionId);
12503
      oprot.writeFieldEnd();
12504
      oprot.writeFieldStop();
12505
      oprot.writeStructEnd();
12506
    }
12507
 
12508
    @Override
12509
    public String toString() {
483 rajveer 12510
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 12511
      boolean first = true;
12512
 
12513
      sb.append("transactionId:");
12514
      sb.append(this.transactionId);
12515
      first = false;
12516
      sb.append(")");
12517
      return sb.toString();
12518
    }
12519
 
12520
    public void validate() throws TException {
12521
      // check for required fields
12522
    }
12523
 
12524
  }
12525
 
483 rajveer 12526
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
12527
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 12528
 
483 rajveer 12529
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 12530
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12531
 
483 rajveer 12532
    private List<Order> success;
68 ashish 12533
    private TransactionServiceException ex;
12534
 
12535
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12536
    public enum _Fields implements TFieldIdEnum {
12537
      SUCCESS((short)0, "success"),
12538
      EX((short)1, "ex");
12539
 
12540
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12541
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12542
 
12543
      static {
12544
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12545
          byId.put((int)field._thriftId, field);
12546
          byName.put(field.getFieldName(), field);
12547
        }
12548
      }
12549
 
12550
      /**
12551
       * Find the _Fields constant that matches fieldId, or null if its not found.
12552
       */
12553
      public static _Fields findByThriftId(int fieldId) {
12554
        return byId.get(fieldId);
12555
      }
12556
 
12557
      /**
12558
       * Find the _Fields constant that matches fieldId, throwing an exception
12559
       * if it is not found.
12560
       */
12561
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12562
        _Fields fields = findByThriftId(fieldId);
12563
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12564
        return fields;
12565
      }
12566
 
12567
      /**
12568
       * Find the _Fields constant that matches name, or null if its not found.
12569
       */
12570
      public static _Fields findByName(String name) {
12571
        return byName.get(name);
12572
      }
12573
 
12574
      private final short _thriftId;
12575
      private final String _fieldName;
12576
 
12577
      _Fields(short thriftId, String fieldName) {
12578
        _thriftId = thriftId;
12579
        _fieldName = fieldName;
12580
      }
12581
 
12582
      public short getThriftFieldId() {
12583
        return _thriftId;
12584
      }
12585
 
12586
      public String getFieldName() {
12587
        return _fieldName;
12588
      }
12589
    }
12590
 
12591
    // isset id assignments
12592
 
12593
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12594
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12595
          new ListMetaData(TType.LIST, 
12596
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 12597
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12598
          new FieldValueMetaData(TType.STRUCT)));
12599
    }});
12600
 
12601
    static {
483 rajveer 12602
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 12603
    }
12604
 
483 rajveer 12605
    public getOrdersForTransaction_result() {
68 ashish 12606
    }
12607
 
483 rajveer 12608
    public getOrdersForTransaction_result(
12609
      List<Order> success,
68 ashish 12610
      TransactionServiceException ex)
12611
    {
12612
      this();
12613
      this.success = success;
12614
      this.ex = ex;
12615
    }
12616
 
12617
    /**
12618
     * Performs a deep copy on <i>other</i>.
12619
     */
483 rajveer 12620
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
12621
      if (other.isSetSuccess()) {
12622
        List<Order> __this__success = new ArrayList<Order>();
12623
        for (Order other_element : other.success) {
12624
          __this__success.add(new Order(other_element));
12625
        }
12626
        this.success = __this__success;
12627
      }
68 ashish 12628
      if (other.isSetEx()) {
12629
        this.ex = new TransactionServiceException(other.ex);
12630
      }
12631
    }
12632
 
483 rajveer 12633
    public getOrdersForTransaction_result deepCopy() {
12634
      return new getOrdersForTransaction_result(this);
68 ashish 12635
    }
12636
 
12637
    @Deprecated
483 rajveer 12638
    public getOrdersForTransaction_result clone() {
12639
      return new getOrdersForTransaction_result(this);
68 ashish 12640
    }
12641
 
483 rajveer 12642
    public int getSuccessSize() {
12643
      return (this.success == null) ? 0 : this.success.size();
12644
    }
12645
 
12646
    public java.util.Iterator<Order> getSuccessIterator() {
12647
      return (this.success == null) ? null : this.success.iterator();
12648
    }
12649
 
12650
    public void addToSuccess(Order elem) {
12651
      if (this.success == null) {
12652
        this.success = new ArrayList<Order>();
12653
      }
12654
      this.success.add(elem);
12655
    }
12656
 
12657
    public List<Order> getSuccess() {
68 ashish 12658
      return this.success;
12659
    }
12660
 
483 rajveer 12661
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 12662
      this.success = success;
12663
      return this;
12664
    }
12665
 
12666
    public void unsetSuccess() {
483 rajveer 12667
      this.success = null;
68 ashish 12668
    }
12669
 
12670
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12671
    public boolean isSetSuccess() {
483 rajveer 12672
      return this.success != null;
68 ashish 12673
    }
12674
 
12675
    public void setSuccessIsSet(boolean value) {
483 rajveer 12676
      if (!value) {
12677
        this.success = null;
12678
      }
68 ashish 12679
    }
12680
 
12681
    public TransactionServiceException getEx() {
12682
      return this.ex;
12683
    }
12684
 
483 rajveer 12685
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 12686
      this.ex = ex;
12687
      return this;
12688
    }
12689
 
12690
    public void unsetEx() {
12691
      this.ex = null;
12692
    }
12693
 
12694
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12695
    public boolean isSetEx() {
12696
      return this.ex != null;
12697
    }
12698
 
12699
    public void setExIsSet(boolean value) {
12700
      if (!value) {
12701
        this.ex = null;
12702
      }
12703
    }
12704
 
12705
    public void setFieldValue(_Fields field, Object value) {
12706
      switch (field) {
12707
      case SUCCESS:
12708
        if (value == null) {
12709
          unsetSuccess();
12710
        } else {
483 rajveer 12711
          setSuccess((List<Order>)value);
68 ashish 12712
        }
12713
        break;
12714
 
12715
      case EX:
12716
        if (value == null) {
12717
          unsetEx();
12718
        } else {
12719
          setEx((TransactionServiceException)value);
12720
        }
12721
        break;
12722
 
12723
      }
12724
    }
12725
 
12726
    public void setFieldValue(int fieldID, Object value) {
12727
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12728
    }
12729
 
12730
    public Object getFieldValue(_Fields field) {
12731
      switch (field) {
12732
      case SUCCESS:
483 rajveer 12733
        return getSuccess();
68 ashish 12734
 
12735
      case EX:
12736
        return getEx();
12737
 
12738
      }
12739
      throw new IllegalStateException();
12740
    }
12741
 
12742
    public Object getFieldValue(int fieldId) {
12743
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12744
    }
12745
 
12746
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12747
    public boolean isSet(_Fields field) {
12748
      switch (field) {
12749
      case SUCCESS:
12750
        return isSetSuccess();
12751
      case EX:
12752
        return isSetEx();
12753
      }
12754
      throw new IllegalStateException();
12755
    }
12756
 
12757
    public boolean isSet(int fieldID) {
12758
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12759
    }
12760
 
12761
    @Override
12762
    public boolean equals(Object that) {
12763
      if (that == null)
12764
        return false;
483 rajveer 12765
      if (that instanceof getOrdersForTransaction_result)
12766
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 12767
      return false;
12768
    }
12769
 
483 rajveer 12770
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 12771
      if (that == null)
12772
        return false;
12773
 
483 rajveer 12774
      boolean this_present_success = true && this.isSetSuccess();
12775
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12776
      if (this_present_success || that_present_success) {
12777
        if (!(this_present_success && that_present_success))
12778
          return false;
483 rajveer 12779
        if (!this.success.equals(that.success))
68 ashish 12780
          return false;
12781
      }
12782
 
12783
      boolean this_present_ex = true && this.isSetEx();
12784
      boolean that_present_ex = true && that.isSetEx();
12785
      if (this_present_ex || that_present_ex) {
12786
        if (!(this_present_ex && that_present_ex))
12787
          return false;
12788
        if (!this.ex.equals(that.ex))
12789
          return false;
12790
      }
12791
 
12792
      return true;
12793
    }
12794
 
12795
    @Override
12796
    public int hashCode() {
12797
      return 0;
12798
    }
12799
 
483 rajveer 12800
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 12801
      if (!getClass().equals(other.getClass())) {
12802
        return getClass().getName().compareTo(other.getClass().getName());
12803
      }
12804
 
12805
      int lastComparison = 0;
483 rajveer 12806
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 12807
 
12808
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12809
      if (lastComparison != 0) {
12810
        return lastComparison;
12811
      }
12812
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12813
      if (lastComparison != 0) {
12814
        return lastComparison;
12815
      }
12816
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12817
      if (lastComparison != 0) {
12818
        return lastComparison;
12819
      }
12820
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12821
      if (lastComparison != 0) {
12822
        return lastComparison;
12823
      }
12824
      return 0;
12825
    }
12826
 
12827
    public void read(TProtocol iprot) throws TException {
12828
      TField field;
12829
      iprot.readStructBegin();
12830
      while (true)
12831
      {
12832
        field = iprot.readFieldBegin();
12833
        if (field.type == TType.STOP) { 
12834
          break;
12835
        }
12836
        _Fields fieldId = _Fields.findByThriftId(field.id);
12837
        if (fieldId == null) {
12838
          TProtocolUtil.skip(iprot, field.type);
12839
        } else {
12840
          switch (fieldId) {
12841
            case SUCCESS:
483 rajveer 12842
              if (field.type == TType.LIST) {
12843
                {
1022 varun.gupt 12844
                  TList _list24 = iprot.readListBegin();
12845
                  this.success = new ArrayList<Order>(_list24.size);
12846
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 12847
                  {
1022 varun.gupt 12848
                    Order _elem26;
12849
                    _elem26 = new Order();
12850
                    _elem26.read(iprot);
12851
                    this.success.add(_elem26);
483 rajveer 12852
                  }
12853
                  iprot.readListEnd();
12854
                }
68 ashish 12855
              } else { 
12856
                TProtocolUtil.skip(iprot, field.type);
12857
              }
12858
              break;
12859
            case EX:
12860
              if (field.type == TType.STRUCT) {
12861
                this.ex = new TransactionServiceException();
12862
                this.ex.read(iprot);
12863
              } else { 
12864
                TProtocolUtil.skip(iprot, field.type);
12865
              }
12866
              break;
12867
          }
12868
          iprot.readFieldEnd();
12869
        }
12870
      }
12871
      iprot.readStructEnd();
12872
      validate();
12873
    }
12874
 
12875
    public void write(TProtocol oprot) throws TException {
12876
      oprot.writeStructBegin(STRUCT_DESC);
12877
 
12878
      if (this.isSetSuccess()) {
12879
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12880
        {
12881
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12882
          for (Order _iter27 : this.success)
483 rajveer 12883
          {
1022 varun.gupt 12884
            _iter27.write(oprot);
483 rajveer 12885
          }
12886
          oprot.writeListEnd();
12887
        }
68 ashish 12888
        oprot.writeFieldEnd();
12889
      } else if (this.isSetEx()) {
12890
        oprot.writeFieldBegin(EX_FIELD_DESC);
12891
        this.ex.write(oprot);
12892
        oprot.writeFieldEnd();
12893
      }
12894
      oprot.writeFieldStop();
12895
      oprot.writeStructEnd();
12896
    }
12897
 
12898
    @Override
12899
    public String toString() {
483 rajveer 12900
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 12901
      boolean first = true;
12902
 
12903
      sb.append("success:");
483 rajveer 12904
      if (this.success == null) {
12905
        sb.append("null");
12906
      } else {
12907
        sb.append(this.success);
12908
      }
68 ashish 12909
      first = false;
12910
      if (!first) sb.append(", ");
12911
      sb.append("ex:");
12912
      if (this.ex == null) {
12913
        sb.append("null");
12914
      } else {
12915
        sb.append(this.ex);
12916
      }
12917
      first = false;
12918
      sb.append(")");
12919
      return sb.toString();
12920
    }
12921
 
12922
    public void validate() throws TException {
12923
      // check for required fields
12924
    }
12925
 
12926
  }
12927
 
483 rajveer 12928
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
12929
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 12930
 
483 rajveer 12931
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
12932
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
12933
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
12934
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 12935
 
483 rajveer 12936
    private long customerId;
12937
    private long from_date;
12938
    private long to_date;
12939
    private OrderStatus status;
68 ashish 12940
 
12941
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12942
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12943
      CUSTOMER_ID((short)1, "customerId"),
12944
      FROM_DATE((short)2, "from_date"),
12945
      TO_DATE((short)3, "to_date"),
12946
      /**
12947
       * 
12948
       * @see OrderStatus
12949
       */
12950
      STATUS((short)4, "status");
68 ashish 12951
 
12952
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12953
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12954
 
12955
      static {
12956
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12957
          byId.put((int)field._thriftId, field);
12958
          byName.put(field.getFieldName(), field);
12959
        }
12960
      }
12961
 
12962
      /**
12963
       * Find the _Fields constant that matches fieldId, or null if its not found.
12964
       */
12965
      public static _Fields findByThriftId(int fieldId) {
12966
        return byId.get(fieldId);
12967
      }
12968
 
12969
      /**
12970
       * Find the _Fields constant that matches fieldId, throwing an exception
12971
       * if it is not found.
12972
       */
12973
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12974
        _Fields fields = findByThriftId(fieldId);
12975
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12976
        return fields;
12977
      }
12978
 
12979
      /**
12980
       * Find the _Fields constant that matches name, or null if its not found.
12981
       */
12982
      public static _Fields findByName(String name) {
12983
        return byName.get(name);
12984
      }
12985
 
12986
      private final short _thriftId;
12987
      private final String _fieldName;
12988
 
12989
      _Fields(short thriftId, String fieldName) {
12990
        _thriftId = thriftId;
12991
        _fieldName = fieldName;
12992
      }
12993
 
12994
      public short getThriftFieldId() {
12995
        return _thriftId;
12996
      }
12997
 
12998
      public String getFieldName() {
12999
        return _fieldName;
13000
      }
13001
    }
13002
 
13003
    // isset id assignments
483 rajveer 13004
    private static final int __CUSTOMERID_ISSET_ID = 0;
13005
    private static final int __FROM_DATE_ISSET_ID = 1;
13006
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 13007
    private BitSet __isset_bit_vector = new BitSet(3);
13008
 
13009
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13010
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 13011
          new FieldValueMetaData(TType.I64)));
483 rajveer 13012
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 13013
          new FieldValueMetaData(TType.I64)));
483 rajveer 13014
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 13015
          new FieldValueMetaData(TType.I64)));
483 rajveer 13016
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
13017
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 13018
    }});
13019
 
13020
    static {
483 rajveer 13021
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 13022
    }
13023
 
483 rajveer 13024
    public getOrdersForCustomer_args() {
68 ashish 13025
    }
13026
 
483 rajveer 13027
    public getOrdersForCustomer_args(
13028
      long customerId,
13029
      long from_date,
13030
      long to_date,
13031
      OrderStatus status)
68 ashish 13032
    {
13033
      this();
483 rajveer 13034
      this.customerId = customerId;
13035
      setCustomerIdIsSet(true);
13036
      this.from_date = from_date;
13037
      setFrom_dateIsSet(true);
13038
      this.to_date = to_date;
13039
      setTo_dateIsSet(true);
13040
      this.status = status;
68 ashish 13041
    }
13042
 
13043
    /**
13044
     * Performs a deep copy on <i>other</i>.
13045
     */
483 rajveer 13046
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 13047
      __isset_bit_vector.clear();
13048
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 13049
      this.customerId = other.customerId;
13050
      this.from_date = other.from_date;
13051
      this.to_date = other.to_date;
13052
      if (other.isSetStatus()) {
13053
        this.status = other.status;
13054
      }
68 ashish 13055
    }
13056
 
483 rajveer 13057
    public getOrdersForCustomer_args deepCopy() {
13058
      return new getOrdersForCustomer_args(this);
68 ashish 13059
    }
13060
 
13061
    @Deprecated
483 rajveer 13062
    public getOrdersForCustomer_args clone() {
13063
      return new getOrdersForCustomer_args(this);
68 ashish 13064
    }
13065
 
483 rajveer 13066
    public long getCustomerId() {
13067
      return this.customerId;
68 ashish 13068
    }
13069
 
483 rajveer 13070
    public getOrdersForCustomer_args setCustomerId(long customerId) {
13071
      this.customerId = customerId;
13072
      setCustomerIdIsSet(true);
68 ashish 13073
      return this;
13074
    }
13075
 
483 rajveer 13076
    public void unsetCustomerId() {
13077
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 13078
    }
13079
 
483 rajveer 13080
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
13081
    public boolean isSetCustomerId() {
13082
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 13083
    }
13084
 
483 rajveer 13085
    public void setCustomerIdIsSet(boolean value) {
13086
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 13087
    }
13088
 
483 rajveer 13089
    public long getFrom_date() {
13090
      return this.from_date;
68 ashish 13091
    }
13092
 
483 rajveer 13093
    public getOrdersForCustomer_args setFrom_date(long from_date) {
13094
      this.from_date = from_date;
13095
      setFrom_dateIsSet(true);
68 ashish 13096
      return this;
13097
    }
13098
 
483 rajveer 13099
    public void unsetFrom_date() {
13100
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 13101
    }
13102
 
483 rajveer 13103
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
13104
    public boolean isSetFrom_date() {
13105
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 13106
    }
13107
 
483 rajveer 13108
    public void setFrom_dateIsSet(boolean value) {
13109
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 13110
    }
13111
 
483 rajveer 13112
    public long getTo_date() {
13113
      return this.to_date;
68 ashish 13114
    }
13115
 
483 rajveer 13116
    public getOrdersForCustomer_args setTo_date(long to_date) {
13117
      this.to_date = to_date;
13118
      setTo_dateIsSet(true);
68 ashish 13119
      return this;
13120
    }
13121
 
483 rajveer 13122
    public void unsetTo_date() {
13123
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 13124
    }
13125
 
483 rajveer 13126
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
13127
    public boolean isSetTo_date() {
13128
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 13129
    }
13130
 
483 rajveer 13131
    public void setTo_dateIsSet(boolean value) {
13132
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 13133
    }
13134
 
483 rajveer 13135
    /**
13136
     * 
13137
     * @see OrderStatus
13138
     */
13139
    public OrderStatus getStatus() {
13140
      return this.status;
13141
    }
13142
 
13143
    /**
13144
     * 
13145
     * @see OrderStatus
13146
     */
13147
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
13148
      this.status = status;
13149
      return this;
13150
    }
13151
 
13152
    public void unsetStatus() {
13153
      this.status = null;
13154
    }
13155
 
13156
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
13157
    public boolean isSetStatus() {
13158
      return this.status != null;
13159
    }
13160
 
13161
    public void setStatusIsSet(boolean value) {
13162
      if (!value) {
13163
        this.status = null;
13164
      }
13165
    }
13166
 
68 ashish 13167
    public void setFieldValue(_Fields field, Object value) {
13168
      switch (field) {
483 rajveer 13169
      case CUSTOMER_ID:
68 ashish 13170
        if (value == null) {
483 rajveer 13171
          unsetCustomerId();
68 ashish 13172
        } else {
483 rajveer 13173
          setCustomerId((Long)value);
68 ashish 13174
        }
13175
        break;
13176
 
483 rajveer 13177
      case FROM_DATE:
68 ashish 13178
        if (value == null) {
483 rajveer 13179
          unsetFrom_date();
68 ashish 13180
        } else {
483 rajveer 13181
          setFrom_date((Long)value);
68 ashish 13182
        }
13183
        break;
13184
 
483 rajveer 13185
      case TO_DATE:
68 ashish 13186
        if (value == null) {
483 rajveer 13187
          unsetTo_date();
68 ashish 13188
        } else {
483 rajveer 13189
          setTo_date((Long)value);
68 ashish 13190
        }
13191
        break;
13192
 
483 rajveer 13193
      case STATUS:
13194
        if (value == null) {
13195
          unsetStatus();
13196
        } else {
13197
          setStatus((OrderStatus)value);
13198
        }
13199
        break;
13200
 
68 ashish 13201
      }
13202
    }
13203
 
13204
    public void setFieldValue(int fieldID, Object value) {
13205
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13206
    }
13207
 
13208
    public Object getFieldValue(_Fields field) {
13209
      switch (field) {
483 rajveer 13210
      case CUSTOMER_ID:
13211
        return new Long(getCustomerId());
68 ashish 13212
 
483 rajveer 13213
      case FROM_DATE:
13214
        return new Long(getFrom_date());
68 ashish 13215
 
483 rajveer 13216
      case TO_DATE:
13217
        return new Long(getTo_date());
68 ashish 13218
 
483 rajveer 13219
      case STATUS:
13220
        return getStatus();
13221
 
68 ashish 13222
      }
13223
      throw new IllegalStateException();
13224
    }
13225
 
13226
    public Object getFieldValue(int fieldId) {
13227
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13228
    }
13229
 
13230
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13231
    public boolean isSet(_Fields field) {
13232
      switch (field) {
483 rajveer 13233
      case CUSTOMER_ID:
13234
        return isSetCustomerId();
13235
      case FROM_DATE:
13236
        return isSetFrom_date();
13237
      case TO_DATE:
13238
        return isSetTo_date();
13239
      case STATUS:
13240
        return isSetStatus();
68 ashish 13241
      }
13242
      throw new IllegalStateException();
13243
    }
13244
 
13245
    public boolean isSet(int fieldID) {
13246
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13247
    }
13248
 
13249
    @Override
13250
    public boolean equals(Object that) {
13251
      if (that == null)
13252
        return false;
483 rajveer 13253
      if (that instanceof getOrdersForCustomer_args)
13254
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 13255
      return false;
13256
    }
13257
 
483 rajveer 13258
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 13259
      if (that == null)
13260
        return false;
13261
 
483 rajveer 13262
      boolean this_present_customerId = true;
13263
      boolean that_present_customerId = true;
13264
      if (this_present_customerId || that_present_customerId) {
13265
        if (!(this_present_customerId && that_present_customerId))
68 ashish 13266
          return false;
483 rajveer 13267
        if (this.customerId != that.customerId)
68 ashish 13268
          return false;
13269
      }
13270
 
483 rajveer 13271
      boolean this_present_from_date = true;
13272
      boolean that_present_from_date = true;
13273
      if (this_present_from_date || that_present_from_date) {
13274
        if (!(this_present_from_date && that_present_from_date))
68 ashish 13275
          return false;
483 rajveer 13276
        if (this.from_date != that.from_date)
68 ashish 13277
          return false;
13278
      }
13279
 
483 rajveer 13280
      boolean this_present_to_date = true;
13281
      boolean that_present_to_date = true;
13282
      if (this_present_to_date || that_present_to_date) {
13283
        if (!(this_present_to_date && that_present_to_date))
68 ashish 13284
          return false;
483 rajveer 13285
        if (this.to_date != that.to_date)
68 ashish 13286
          return false;
13287
      }
13288
 
483 rajveer 13289
      boolean this_present_status = true && this.isSetStatus();
13290
      boolean that_present_status = true && that.isSetStatus();
13291
      if (this_present_status || that_present_status) {
13292
        if (!(this_present_status && that_present_status))
13293
          return false;
13294
        if (!this.status.equals(that.status))
13295
          return false;
13296
      }
13297
 
68 ashish 13298
      return true;
13299
    }
13300
 
13301
    @Override
13302
    public int hashCode() {
13303
      return 0;
13304
    }
13305
 
483 rajveer 13306
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 13307
      if (!getClass().equals(other.getClass())) {
13308
        return getClass().getName().compareTo(other.getClass().getName());
13309
      }
13310
 
13311
      int lastComparison = 0;
483 rajveer 13312
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 13313
 
483 rajveer 13314
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 13315
      if (lastComparison != 0) {
13316
        return lastComparison;
13317
      }
483 rajveer 13318
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 13319
      if (lastComparison != 0) {
13320
        return lastComparison;
13321
      }
483 rajveer 13322
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 13323
      if (lastComparison != 0) {
13324
        return lastComparison;
13325
      }
483 rajveer 13326
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 13327
      if (lastComparison != 0) {
13328
        return lastComparison;
13329
      }
483 rajveer 13330
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 13331
      if (lastComparison != 0) {
13332
        return lastComparison;
13333
      }
483 rajveer 13334
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 13335
      if (lastComparison != 0) {
13336
        return lastComparison;
13337
      }
483 rajveer 13338
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
13339
      if (lastComparison != 0) {
13340
        return lastComparison;
13341
      }
13342
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
13343
      if (lastComparison != 0) {
13344
        return lastComparison;
13345
      }
68 ashish 13346
      return 0;
13347
    }
13348
 
13349
    public void read(TProtocol iprot) throws TException {
13350
      TField field;
13351
      iprot.readStructBegin();
13352
      while (true)
13353
      {
13354
        field = iprot.readFieldBegin();
13355
        if (field.type == TType.STOP) { 
13356
          break;
13357
        }
13358
        _Fields fieldId = _Fields.findByThriftId(field.id);
13359
        if (fieldId == null) {
13360
          TProtocolUtil.skip(iprot, field.type);
13361
        } else {
13362
          switch (fieldId) {
483 rajveer 13363
            case CUSTOMER_ID:
68 ashish 13364
              if (field.type == TType.I64) {
483 rajveer 13365
                this.customerId = iprot.readI64();
13366
                setCustomerIdIsSet(true);
68 ashish 13367
              } else { 
13368
                TProtocolUtil.skip(iprot, field.type);
13369
              }
13370
              break;
483 rajveer 13371
            case FROM_DATE:
68 ashish 13372
              if (field.type == TType.I64) {
483 rajveer 13373
                this.from_date = iprot.readI64();
13374
                setFrom_dateIsSet(true);
68 ashish 13375
              } else { 
13376
                TProtocolUtil.skip(iprot, field.type);
13377
              }
13378
              break;
483 rajveer 13379
            case TO_DATE:
68 ashish 13380
              if (field.type == TType.I64) {
483 rajveer 13381
                this.to_date = iprot.readI64();
13382
                setTo_dateIsSet(true);
68 ashish 13383
              } else { 
13384
                TProtocolUtil.skip(iprot, field.type);
13385
              }
13386
              break;
483 rajveer 13387
            case STATUS:
13388
              if (field.type == TType.I32) {
13389
                this.status = OrderStatus.findByValue(iprot.readI32());
13390
              } else { 
13391
                TProtocolUtil.skip(iprot, field.type);
13392
              }
13393
              break;
68 ashish 13394
          }
13395
          iprot.readFieldEnd();
13396
        }
13397
      }
13398
      iprot.readStructEnd();
13399
      validate();
13400
    }
13401
 
13402
    public void write(TProtocol oprot) throws TException {
13403
      validate();
13404
 
13405
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13406
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
13407
      oprot.writeI64(this.customerId);
68 ashish 13408
      oprot.writeFieldEnd();
483 rajveer 13409
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
13410
      oprot.writeI64(this.from_date);
68 ashish 13411
      oprot.writeFieldEnd();
483 rajveer 13412
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
13413
      oprot.writeI64(this.to_date);
68 ashish 13414
      oprot.writeFieldEnd();
483 rajveer 13415
      if (this.status != null) {
13416
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
13417
        oprot.writeI32(this.status.getValue());
13418
        oprot.writeFieldEnd();
13419
      }
68 ashish 13420
      oprot.writeFieldStop();
13421
      oprot.writeStructEnd();
13422
    }
13423
 
13424
    @Override
13425
    public String toString() {
483 rajveer 13426
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 13427
      boolean first = true;
13428
 
483 rajveer 13429
      sb.append("customerId:");
13430
      sb.append(this.customerId);
68 ashish 13431
      first = false;
13432
      if (!first) sb.append(", ");
483 rajveer 13433
      sb.append("from_date:");
13434
      sb.append(this.from_date);
68 ashish 13435
      first = false;
13436
      if (!first) sb.append(", ");
483 rajveer 13437
      sb.append("to_date:");
13438
      sb.append(this.to_date);
68 ashish 13439
      first = false;
483 rajveer 13440
      if (!first) sb.append(", ");
13441
      sb.append("status:");
13442
      if (this.status == null) {
13443
        sb.append("null");
13444
      } else {
13445
        String status_name = status.name();
13446
        if (status_name != null) {
13447
          sb.append(status_name);
13448
          sb.append(" (");
13449
        }
13450
        sb.append(this.status);
13451
        if (status_name != null) {
13452
          sb.append(")");
13453
        }
13454
      }
13455
      first = false;
68 ashish 13456
      sb.append(")");
13457
      return sb.toString();
13458
    }
13459
 
13460
    public void validate() throws TException {
13461
      // check for required fields
13462
    }
13463
 
13464
  }
13465
 
483 rajveer 13466
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
13467
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 13468
 
483 rajveer 13469
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 13470
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13471
 
483 rajveer 13472
    private List<Order> success;
68 ashish 13473
    private TransactionServiceException ex;
13474
 
13475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13476
    public enum _Fields implements TFieldIdEnum {
13477
      SUCCESS((short)0, "success"),
13478
      EX((short)1, "ex");
13479
 
13480
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13481
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13482
 
13483
      static {
13484
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13485
          byId.put((int)field._thriftId, field);
13486
          byName.put(field.getFieldName(), field);
13487
        }
13488
      }
13489
 
13490
      /**
13491
       * Find the _Fields constant that matches fieldId, or null if its not found.
13492
       */
13493
      public static _Fields findByThriftId(int fieldId) {
13494
        return byId.get(fieldId);
13495
      }
13496
 
13497
      /**
13498
       * Find the _Fields constant that matches fieldId, throwing an exception
13499
       * if it is not found.
13500
       */
13501
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13502
        _Fields fields = findByThriftId(fieldId);
13503
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13504
        return fields;
13505
      }
13506
 
13507
      /**
13508
       * Find the _Fields constant that matches name, or null if its not found.
13509
       */
13510
      public static _Fields findByName(String name) {
13511
        return byName.get(name);
13512
      }
13513
 
13514
      private final short _thriftId;
13515
      private final String _fieldName;
13516
 
13517
      _Fields(short thriftId, String fieldName) {
13518
        _thriftId = thriftId;
13519
        _fieldName = fieldName;
13520
      }
13521
 
13522
      public short getThriftFieldId() {
13523
        return _thriftId;
13524
      }
13525
 
13526
      public String getFieldName() {
13527
        return _fieldName;
13528
      }
13529
    }
13530
 
13531
    // isset id assignments
13532
 
13533
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13534
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13535
          new ListMetaData(TType.LIST, 
13536
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 13537
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13538
          new FieldValueMetaData(TType.STRUCT)));
13539
    }});
13540
 
13541
    static {
483 rajveer 13542
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 13543
    }
13544
 
483 rajveer 13545
    public getOrdersForCustomer_result() {
68 ashish 13546
    }
13547
 
483 rajveer 13548
    public getOrdersForCustomer_result(
13549
      List<Order> success,
68 ashish 13550
      TransactionServiceException ex)
13551
    {
13552
      this();
13553
      this.success = success;
13554
      this.ex = ex;
13555
    }
13556
 
13557
    /**
13558
     * Performs a deep copy on <i>other</i>.
13559
     */
483 rajveer 13560
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
13561
      if (other.isSetSuccess()) {
13562
        List<Order> __this__success = new ArrayList<Order>();
13563
        for (Order other_element : other.success) {
13564
          __this__success.add(new Order(other_element));
13565
        }
13566
        this.success = __this__success;
13567
      }
68 ashish 13568
      if (other.isSetEx()) {
13569
        this.ex = new TransactionServiceException(other.ex);
13570
      }
13571
    }
13572
 
483 rajveer 13573
    public getOrdersForCustomer_result deepCopy() {
13574
      return new getOrdersForCustomer_result(this);
68 ashish 13575
    }
13576
 
13577
    @Deprecated
483 rajveer 13578
    public getOrdersForCustomer_result clone() {
13579
      return new getOrdersForCustomer_result(this);
68 ashish 13580
    }
13581
 
483 rajveer 13582
    public int getSuccessSize() {
13583
      return (this.success == null) ? 0 : this.success.size();
13584
    }
13585
 
13586
    public java.util.Iterator<Order> getSuccessIterator() {
13587
      return (this.success == null) ? null : this.success.iterator();
13588
    }
13589
 
13590
    public void addToSuccess(Order elem) {
13591
      if (this.success == null) {
13592
        this.success = new ArrayList<Order>();
13593
      }
13594
      this.success.add(elem);
13595
    }
13596
 
13597
    public List<Order> getSuccess() {
68 ashish 13598
      return this.success;
13599
    }
13600
 
483 rajveer 13601
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 13602
      this.success = success;
13603
      return this;
13604
    }
13605
 
13606
    public void unsetSuccess() {
483 rajveer 13607
      this.success = null;
68 ashish 13608
    }
13609
 
13610
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13611
    public boolean isSetSuccess() {
483 rajveer 13612
      return this.success != null;
68 ashish 13613
    }
13614
 
13615
    public void setSuccessIsSet(boolean value) {
483 rajveer 13616
      if (!value) {
13617
        this.success = null;
13618
      }
68 ashish 13619
    }
13620
 
13621
    public TransactionServiceException getEx() {
13622
      return this.ex;
13623
    }
13624
 
483 rajveer 13625
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 13626
      this.ex = ex;
13627
      return this;
13628
    }
13629
 
13630
    public void unsetEx() {
13631
      this.ex = null;
13632
    }
13633
 
13634
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13635
    public boolean isSetEx() {
13636
      return this.ex != null;
13637
    }
13638
 
13639
    public void setExIsSet(boolean value) {
13640
      if (!value) {
13641
        this.ex = null;
13642
      }
13643
    }
13644
 
13645
    public void setFieldValue(_Fields field, Object value) {
13646
      switch (field) {
13647
      case SUCCESS:
13648
        if (value == null) {
13649
          unsetSuccess();
13650
        } else {
483 rajveer 13651
          setSuccess((List<Order>)value);
68 ashish 13652
        }
13653
        break;
13654
 
13655
      case EX:
13656
        if (value == null) {
13657
          unsetEx();
13658
        } else {
13659
          setEx((TransactionServiceException)value);
13660
        }
13661
        break;
13662
 
13663
      }
13664
    }
13665
 
13666
    public void setFieldValue(int fieldID, Object value) {
13667
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13668
    }
13669
 
13670
    public Object getFieldValue(_Fields field) {
13671
      switch (field) {
13672
      case SUCCESS:
483 rajveer 13673
        return getSuccess();
68 ashish 13674
 
13675
      case EX:
13676
        return getEx();
13677
 
13678
      }
13679
      throw new IllegalStateException();
13680
    }
13681
 
13682
    public Object getFieldValue(int fieldId) {
13683
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13684
    }
13685
 
13686
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13687
    public boolean isSet(_Fields field) {
13688
      switch (field) {
13689
      case SUCCESS:
13690
        return isSetSuccess();
13691
      case EX:
13692
        return isSetEx();
13693
      }
13694
      throw new IllegalStateException();
13695
    }
13696
 
13697
    public boolean isSet(int fieldID) {
13698
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13699
    }
13700
 
13701
    @Override
13702
    public boolean equals(Object that) {
13703
      if (that == null)
13704
        return false;
483 rajveer 13705
      if (that instanceof getOrdersForCustomer_result)
13706
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 13707
      return false;
13708
    }
13709
 
483 rajveer 13710
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 13711
      if (that == null)
13712
        return false;
13713
 
483 rajveer 13714
      boolean this_present_success = true && this.isSetSuccess();
13715
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 13716
      if (this_present_success || that_present_success) {
13717
        if (!(this_present_success && that_present_success))
13718
          return false;
483 rajveer 13719
        if (!this.success.equals(that.success))
68 ashish 13720
          return false;
13721
      }
13722
 
13723
      boolean this_present_ex = true && this.isSetEx();
13724
      boolean that_present_ex = true && that.isSetEx();
13725
      if (this_present_ex || that_present_ex) {
13726
        if (!(this_present_ex && that_present_ex))
13727
          return false;
13728
        if (!this.ex.equals(that.ex))
13729
          return false;
13730
      }
13731
 
13732
      return true;
13733
    }
13734
 
13735
    @Override
13736
    public int hashCode() {
13737
      return 0;
13738
    }
13739
 
483 rajveer 13740
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 13741
      if (!getClass().equals(other.getClass())) {
13742
        return getClass().getName().compareTo(other.getClass().getName());
13743
      }
13744
 
13745
      int lastComparison = 0;
483 rajveer 13746
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 13747
 
13748
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13749
      if (lastComparison != 0) {
13750
        return lastComparison;
13751
      }
13752
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13753
      if (lastComparison != 0) {
13754
        return lastComparison;
13755
      }
13756
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13757
      if (lastComparison != 0) {
13758
        return lastComparison;
13759
      }
13760
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13761
      if (lastComparison != 0) {
13762
        return lastComparison;
13763
      }
13764
      return 0;
13765
    }
13766
 
13767
    public void read(TProtocol iprot) throws TException {
13768
      TField field;
13769
      iprot.readStructBegin();
13770
      while (true)
13771
      {
13772
        field = iprot.readFieldBegin();
13773
        if (field.type == TType.STOP) { 
13774
          break;
13775
        }
13776
        _Fields fieldId = _Fields.findByThriftId(field.id);
13777
        if (fieldId == null) {
13778
          TProtocolUtil.skip(iprot, field.type);
13779
        } else {
13780
          switch (fieldId) {
13781
            case SUCCESS:
483 rajveer 13782
              if (field.type == TType.LIST) {
13783
                {
1022 varun.gupt 13784
                  TList _list28 = iprot.readListBegin();
13785
                  this.success = new ArrayList<Order>(_list28.size);
13786
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 13787
                  {
1022 varun.gupt 13788
                    Order _elem30;
13789
                    _elem30 = new Order();
13790
                    _elem30.read(iprot);
13791
                    this.success.add(_elem30);
483 rajveer 13792
                  }
13793
                  iprot.readListEnd();
13794
                }
68 ashish 13795
              } else { 
13796
                TProtocolUtil.skip(iprot, field.type);
13797
              }
13798
              break;
13799
            case EX:
13800
              if (field.type == TType.STRUCT) {
13801
                this.ex = new TransactionServiceException();
13802
                this.ex.read(iprot);
13803
              } else { 
13804
                TProtocolUtil.skip(iprot, field.type);
13805
              }
13806
              break;
13807
          }
13808
          iprot.readFieldEnd();
13809
        }
13810
      }
13811
      iprot.readStructEnd();
13812
      validate();
13813
    }
13814
 
13815
    public void write(TProtocol oprot) throws TException {
13816
      oprot.writeStructBegin(STRUCT_DESC);
13817
 
13818
      if (this.isSetSuccess()) {
13819
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13820
        {
13821
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 13822
          for (Order _iter31 : this.success)
483 rajveer 13823
          {
1022 varun.gupt 13824
            _iter31.write(oprot);
483 rajveer 13825
          }
13826
          oprot.writeListEnd();
13827
        }
68 ashish 13828
        oprot.writeFieldEnd();
13829
      } else if (this.isSetEx()) {
13830
        oprot.writeFieldBegin(EX_FIELD_DESC);
13831
        this.ex.write(oprot);
13832
        oprot.writeFieldEnd();
13833
      }
13834
      oprot.writeFieldStop();
13835
      oprot.writeStructEnd();
13836
    }
13837
 
13838
    @Override
13839
    public String toString() {
483 rajveer 13840
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 13841
      boolean first = true;
13842
 
13843
      sb.append("success:");
483 rajveer 13844
      if (this.success == null) {
13845
        sb.append("null");
13846
      } else {
13847
        sb.append(this.success);
13848
      }
68 ashish 13849
      first = false;
13850
      if (!first) sb.append(", ");
13851
      sb.append("ex:");
13852
      if (this.ex == null) {
13853
        sb.append("null");
13854
      } else {
13855
        sb.append(this.ex);
13856
      }
13857
      first = false;
13858
      sb.append(")");
13859
      return sb.toString();
13860
    }
13861
 
13862
    public void validate() throws TException {
13863
      // check for required fields
13864
    }
13865
 
13866
  }
13867
 
483 rajveer 13868
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
13869
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 13870
 
483 rajveer 13871
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 13872
 
483 rajveer 13873
    private Order order;
68 ashish 13874
 
13875
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13876
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13877
      ORDER((short)1, "order");
68 ashish 13878
 
13879
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13880
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13881
 
13882
      static {
13883
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13884
          byId.put((int)field._thriftId, field);
13885
          byName.put(field.getFieldName(), field);
13886
        }
13887
      }
13888
 
13889
      /**
13890
       * Find the _Fields constant that matches fieldId, or null if its not found.
13891
       */
13892
      public static _Fields findByThriftId(int fieldId) {
13893
        return byId.get(fieldId);
13894
      }
13895
 
13896
      /**
13897
       * Find the _Fields constant that matches fieldId, throwing an exception
13898
       * if it is not found.
13899
       */
13900
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13901
        _Fields fields = findByThriftId(fieldId);
13902
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13903
        return fields;
13904
      }
13905
 
13906
      /**
13907
       * Find the _Fields constant that matches name, or null if its not found.
13908
       */
13909
      public static _Fields findByName(String name) {
13910
        return byName.get(name);
13911
      }
13912
 
13913
      private final short _thriftId;
13914
      private final String _fieldName;
13915
 
13916
      _Fields(short thriftId, String fieldName) {
13917
        _thriftId = thriftId;
13918
        _fieldName = fieldName;
13919
      }
13920
 
13921
      public short getThriftFieldId() {
13922
        return _thriftId;
13923
      }
13924
 
13925
      public String getFieldName() {
13926
        return _fieldName;
13927
      }
13928
    }
13929
 
13930
    // isset id assignments
13931
 
13932
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13933
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
13934
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 13935
    }});
13936
 
13937
    static {
483 rajveer 13938
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 13939
    }
13940
 
483 rajveer 13941
    public createOrder_args() {
68 ashish 13942
    }
13943
 
483 rajveer 13944
    public createOrder_args(
13945
      Order order)
68 ashish 13946
    {
13947
      this();
483 rajveer 13948
      this.order = order;
68 ashish 13949
    }
13950
 
13951
    /**
13952
     * Performs a deep copy on <i>other</i>.
13953
     */
483 rajveer 13954
    public createOrder_args(createOrder_args other) {
13955
      if (other.isSetOrder()) {
13956
        this.order = new Order(other.order);
13957
      }
68 ashish 13958
    }
13959
 
483 rajveer 13960
    public createOrder_args deepCopy() {
13961
      return new createOrder_args(this);
68 ashish 13962
    }
13963
 
13964
    @Deprecated
483 rajveer 13965
    public createOrder_args clone() {
13966
      return new createOrder_args(this);
68 ashish 13967
    }
13968
 
483 rajveer 13969
    public Order getOrder() {
13970
      return this.order;
68 ashish 13971
    }
13972
 
483 rajveer 13973
    public createOrder_args setOrder(Order order) {
13974
      this.order = order;
68 ashish 13975
      return this;
13976
    }
13977
 
483 rajveer 13978
    public void unsetOrder() {
13979
      this.order = null;
68 ashish 13980
    }
13981
 
483 rajveer 13982
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
13983
    public boolean isSetOrder() {
13984
      return this.order != null;
68 ashish 13985
    }
13986
 
483 rajveer 13987
    public void setOrderIsSet(boolean value) {
13988
      if (!value) {
13989
        this.order = null;
13990
      }
68 ashish 13991
    }
13992
 
13993
    public void setFieldValue(_Fields field, Object value) {
13994
      switch (field) {
483 rajveer 13995
      case ORDER:
68 ashish 13996
        if (value == null) {
483 rajveer 13997
          unsetOrder();
68 ashish 13998
        } else {
483 rajveer 13999
          setOrder((Order)value);
68 ashish 14000
        }
14001
        break;
14002
 
14003
      }
14004
    }
14005
 
14006
    public void setFieldValue(int fieldID, Object value) {
14007
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14008
    }
14009
 
14010
    public Object getFieldValue(_Fields field) {
14011
      switch (field) {
483 rajveer 14012
      case ORDER:
14013
        return getOrder();
68 ashish 14014
 
14015
      }
14016
      throw new IllegalStateException();
14017
    }
14018
 
14019
    public Object getFieldValue(int fieldId) {
14020
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14021
    }
14022
 
14023
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14024
    public boolean isSet(_Fields field) {
14025
      switch (field) {
483 rajveer 14026
      case ORDER:
14027
        return isSetOrder();
68 ashish 14028
      }
14029
      throw new IllegalStateException();
14030
    }
14031
 
14032
    public boolean isSet(int fieldID) {
14033
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14034
    }
14035
 
14036
    @Override
14037
    public boolean equals(Object that) {
14038
      if (that == null)
14039
        return false;
483 rajveer 14040
      if (that instanceof createOrder_args)
14041
        return this.equals((createOrder_args)that);
68 ashish 14042
      return false;
14043
    }
14044
 
483 rajveer 14045
    public boolean equals(createOrder_args that) {
68 ashish 14046
      if (that == null)
14047
        return false;
14048
 
483 rajveer 14049
      boolean this_present_order = true && this.isSetOrder();
14050
      boolean that_present_order = true && that.isSetOrder();
14051
      if (this_present_order || that_present_order) {
14052
        if (!(this_present_order && that_present_order))
68 ashish 14053
          return false;
483 rajveer 14054
        if (!this.order.equals(that.order))
68 ashish 14055
          return false;
14056
      }
14057
 
14058
      return true;
14059
    }
14060
 
14061
    @Override
14062
    public int hashCode() {
14063
      return 0;
14064
    }
14065
 
483 rajveer 14066
    public int compareTo(createOrder_args other) {
68 ashish 14067
      if (!getClass().equals(other.getClass())) {
14068
        return getClass().getName().compareTo(other.getClass().getName());
14069
      }
14070
 
14071
      int lastComparison = 0;
483 rajveer 14072
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 14073
 
483 rajveer 14074
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 14075
      if (lastComparison != 0) {
14076
        return lastComparison;
14077
      }
483 rajveer 14078
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 14079
      if (lastComparison != 0) {
14080
        return lastComparison;
14081
      }
14082
      return 0;
14083
    }
14084
 
14085
    public void read(TProtocol iprot) throws TException {
14086
      TField field;
14087
      iprot.readStructBegin();
14088
      while (true)
14089
      {
14090
        field = iprot.readFieldBegin();
14091
        if (field.type == TType.STOP) { 
14092
          break;
14093
        }
14094
        _Fields fieldId = _Fields.findByThriftId(field.id);
14095
        if (fieldId == null) {
14096
          TProtocolUtil.skip(iprot, field.type);
14097
        } else {
14098
          switch (fieldId) {
483 rajveer 14099
            case ORDER:
14100
              if (field.type == TType.STRUCT) {
14101
                this.order = new Order();
14102
                this.order.read(iprot);
68 ashish 14103
              } else { 
14104
                TProtocolUtil.skip(iprot, field.type);
14105
              }
14106
              break;
14107
          }
14108
          iprot.readFieldEnd();
14109
        }
14110
      }
14111
      iprot.readStructEnd();
14112
      validate();
14113
    }
14114
 
14115
    public void write(TProtocol oprot) throws TException {
14116
      validate();
14117
 
14118
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14119
      if (this.order != null) {
14120
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
14121
        this.order.write(oprot);
14122
        oprot.writeFieldEnd();
14123
      }
68 ashish 14124
      oprot.writeFieldStop();
14125
      oprot.writeStructEnd();
14126
    }
14127
 
14128
    @Override
14129
    public String toString() {
483 rajveer 14130
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 14131
      boolean first = true;
14132
 
483 rajveer 14133
      sb.append("order:");
14134
      if (this.order == null) {
14135
        sb.append("null");
14136
      } else {
14137
        sb.append(this.order);
14138
      }
68 ashish 14139
      first = false;
14140
      sb.append(")");
14141
      return sb.toString();
14142
    }
14143
 
14144
    public void validate() throws TException {
14145
      // check for required fields
14146
    }
14147
 
14148
  }
14149
 
483 rajveer 14150
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
14151
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 14152
 
483 rajveer 14153
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 14154
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14155
 
483 rajveer 14156
    private long success;
68 ashish 14157
    private TransactionServiceException ex;
14158
 
14159
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14160
    public enum _Fields implements TFieldIdEnum {
14161
      SUCCESS((short)0, "success"),
14162
      EX((short)1, "ex");
14163
 
14164
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14165
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14166
 
14167
      static {
14168
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14169
          byId.put((int)field._thriftId, field);
14170
          byName.put(field.getFieldName(), field);
14171
        }
14172
      }
14173
 
14174
      /**
14175
       * Find the _Fields constant that matches fieldId, or null if its not found.
14176
       */
14177
      public static _Fields findByThriftId(int fieldId) {
14178
        return byId.get(fieldId);
14179
      }
14180
 
14181
      /**
14182
       * Find the _Fields constant that matches fieldId, throwing an exception
14183
       * if it is not found.
14184
       */
14185
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14186
        _Fields fields = findByThriftId(fieldId);
14187
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14188
        return fields;
14189
      }
14190
 
14191
      /**
14192
       * Find the _Fields constant that matches name, or null if its not found.
14193
       */
14194
      public static _Fields findByName(String name) {
14195
        return byName.get(name);
14196
      }
14197
 
14198
      private final short _thriftId;
14199
      private final String _fieldName;
14200
 
14201
      _Fields(short thriftId, String fieldName) {
14202
        _thriftId = thriftId;
14203
        _fieldName = fieldName;
14204
      }
14205
 
14206
      public short getThriftFieldId() {
14207
        return _thriftId;
14208
      }
14209
 
14210
      public String getFieldName() {
14211
        return _fieldName;
14212
      }
14213
    }
14214
 
14215
    // isset id assignments
14216
    private static final int __SUCCESS_ISSET_ID = 0;
14217
    private BitSet __isset_bit_vector = new BitSet(1);
14218
 
14219
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14220
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14221
          new FieldValueMetaData(TType.I64)));
68 ashish 14222
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14223
          new FieldValueMetaData(TType.STRUCT)));
14224
    }});
14225
 
14226
    static {
483 rajveer 14227
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 14228
    }
14229
 
483 rajveer 14230
    public createOrder_result() {
68 ashish 14231
    }
14232
 
483 rajveer 14233
    public createOrder_result(
14234
      long success,
68 ashish 14235
      TransactionServiceException ex)
14236
    {
14237
      this();
14238
      this.success = success;
14239
      setSuccessIsSet(true);
14240
      this.ex = ex;
14241
    }
14242
 
14243
    /**
14244
     * Performs a deep copy on <i>other</i>.
14245
     */
483 rajveer 14246
    public createOrder_result(createOrder_result other) {
68 ashish 14247
      __isset_bit_vector.clear();
14248
      __isset_bit_vector.or(other.__isset_bit_vector);
14249
      this.success = other.success;
14250
      if (other.isSetEx()) {
14251
        this.ex = new TransactionServiceException(other.ex);
14252
      }
14253
    }
14254
 
483 rajveer 14255
    public createOrder_result deepCopy() {
14256
      return new createOrder_result(this);
68 ashish 14257
    }
14258
 
14259
    @Deprecated
483 rajveer 14260
    public createOrder_result clone() {
14261
      return new createOrder_result(this);
68 ashish 14262
    }
14263
 
483 rajveer 14264
    public long getSuccess() {
68 ashish 14265
      return this.success;
14266
    }
14267
 
483 rajveer 14268
    public createOrder_result setSuccess(long success) {
68 ashish 14269
      this.success = success;
14270
      setSuccessIsSet(true);
14271
      return this;
14272
    }
14273
 
14274
    public void unsetSuccess() {
14275
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14276
    }
14277
 
14278
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14279
    public boolean isSetSuccess() {
14280
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14281
    }
14282
 
14283
    public void setSuccessIsSet(boolean value) {
14284
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14285
    }
14286
 
14287
    public TransactionServiceException getEx() {
14288
      return this.ex;
14289
    }
14290
 
483 rajveer 14291
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 14292
      this.ex = ex;
14293
      return this;
14294
    }
14295
 
14296
    public void unsetEx() {
14297
      this.ex = null;
14298
    }
14299
 
14300
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14301
    public boolean isSetEx() {
14302
      return this.ex != null;
14303
    }
14304
 
14305
    public void setExIsSet(boolean value) {
14306
      if (!value) {
14307
        this.ex = null;
14308
      }
14309
    }
14310
 
14311
    public void setFieldValue(_Fields field, Object value) {
14312
      switch (field) {
14313
      case SUCCESS:
14314
        if (value == null) {
14315
          unsetSuccess();
14316
        } else {
483 rajveer 14317
          setSuccess((Long)value);
68 ashish 14318
        }
14319
        break;
14320
 
14321
      case EX:
14322
        if (value == null) {
14323
          unsetEx();
14324
        } else {
14325
          setEx((TransactionServiceException)value);
14326
        }
14327
        break;
14328
 
14329
      }
14330
    }
14331
 
14332
    public void setFieldValue(int fieldID, Object value) {
14333
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14334
    }
14335
 
14336
    public Object getFieldValue(_Fields field) {
14337
      switch (field) {
14338
      case SUCCESS:
483 rajveer 14339
        return new Long(getSuccess());
68 ashish 14340
 
14341
      case EX:
14342
        return getEx();
14343
 
14344
      }
14345
      throw new IllegalStateException();
14346
    }
14347
 
14348
    public Object getFieldValue(int fieldId) {
14349
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14350
    }
14351
 
14352
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14353
    public boolean isSet(_Fields field) {
14354
      switch (field) {
14355
      case SUCCESS:
14356
        return isSetSuccess();
14357
      case EX:
14358
        return isSetEx();
14359
      }
14360
      throw new IllegalStateException();
14361
    }
14362
 
14363
    public boolean isSet(int fieldID) {
14364
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14365
    }
14366
 
14367
    @Override
14368
    public boolean equals(Object that) {
14369
      if (that == null)
14370
        return false;
483 rajveer 14371
      if (that instanceof createOrder_result)
14372
        return this.equals((createOrder_result)that);
68 ashish 14373
      return false;
14374
    }
14375
 
483 rajveer 14376
    public boolean equals(createOrder_result that) {
68 ashish 14377
      if (that == null)
14378
        return false;
14379
 
14380
      boolean this_present_success = true;
14381
      boolean that_present_success = true;
14382
      if (this_present_success || that_present_success) {
14383
        if (!(this_present_success && that_present_success))
14384
          return false;
14385
        if (this.success != that.success)
14386
          return false;
14387
      }
14388
 
14389
      boolean this_present_ex = true && this.isSetEx();
14390
      boolean that_present_ex = true && that.isSetEx();
14391
      if (this_present_ex || that_present_ex) {
14392
        if (!(this_present_ex && that_present_ex))
14393
          return false;
14394
        if (!this.ex.equals(that.ex))
14395
          return false;
14396
      }
14397
 
14398
      return true;
14399
    }
14400
 
14401
    @Override
14402
    public int hashCode() {
14403
      return 0;
14404
    }
14405
 
483 rajveer 14406
    public int compareTo(createOrder_result other) {
68 ashish 14407
      if (!getClass().equals(other.getClass())) {
14408
        return getClass().getName().compareTo(other.getClass().getName());
14409
      }
14410
 
14411
      int lastComparison = 0;
483 rajveer 14412
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 14413
 
14414
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14415
      if (lastComparison != 0) {
14416
        return lastComparison;
14417
      }
14418
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14419
      if (lastComparison != 0) {
14420
        return lastComparison;
14421
      }
14422
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14423
      if (lastComparison != 0) {
14424
        return lastComparison;
14425
      }
14426
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14427
      if (lastComparison != 0) {
14428
        return lastComparison;
14429
      }
14430
      return 0;
14431
    }
14432
 
14433
    public void read(TProtocol iprot) throws TException {
14434
      TField field;
14435
      iprot.readStructBegin();
14436
      while (true)
14437
      {
14438
        field = iprot.readFieldBegin();
14439
        if (field.type == TType.STOP) { 
14440
          break;
14441
        }
14442
        _Fields fieldId = _Fields.findByThriftId(field.id);
14443
        if (fieldId == null) {
14444
          TProtocolUtil.skip(iprot, field.type);
14445
        } else {
14446
          switch (fieldId) {
14447
            case SUCCESS:
483 rajveer 14448
              if (field.type == TType.I64) {
14449
                this.success = iprot.readI64();
68 ashish 14450
                setSuccessIsSet(true);
14451
              } else { 
14452
                TProtocolUtil.skip(iprot, field.type);
14453
              }
14454
              break;
14455
            case EX:
14456
              if (field.type == TType.STRUCT) {
14457
                this.ex = new TransactionServiceException();
14458
                this.ex.read(iprot);
14459
              } else { 
14460
                TProtocolUtil.skip(iprot, field.type);
14461
              }
14462
              break;
14463
          }
14464
          iprot.readFieldEnd();
14465
        }
14466
      }
14467
      iprot.readStructEnd();
14468
      validate();
14469
    }
14470
 
14471
    public void write(TProtocol oprot) throws TException {
14472
      oprot.writeStructBegin(STRUCT_DESC);
14473
 
14474
      if (this.isSetSuccess()) {
14475
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14476
        oprot.writeI64(this.success);
68 ashish 14477
        oprot.writeFieldEnd();
14478
      } else if (this.isSetEx()) {
14479
        oprot.writeFieldBegin(EX_FIELD_DESC);
14480
        this.ex.write(oprot);
14481
        oprot.writeFieldEnd();
14482
      }
14483
      oprot.writeFieldStop();
14484
      oprot.writeStructEnd();
14485
    }
14486
 
14487
    @Override
14488
    public String toString() {
483 rajveer 14489
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 14490
      boolean first = true;
14491
 
14492
      sb.append("success:");
14493
      sb.append(this.success);
14494
      first = false;
14495
      if (!first) sb.append(", ");
14496
      sb.append("ex:");
14497
      if (this.ex == null) {
14498
        sb.append("null");
14499
      } else {
14500
        sb.append(this.ex);
14501
      }
14502
      first = false;
14503
      sb.append(")");
14504
      return sb.toString();
14505
    }
14506
 
14507
    public void validate() throws TException {
14508
      // check for required fields
14509
    }
14510
 
14511
  }
14512
 
483 rajveer 14513
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
14514
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 14515
 
483 rajveer 14516
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 14517
 
483 rajveer 14518
    private long id;
68 ashish 14519
 
14520
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14521
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14522
      ID((short)1, "id");
68 ashish 14523
 
14524
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14525
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14526
 
14527
      static {
14528
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14529
          byId.put((int)field._thriftId, field);
14530
          byName.put(field.getFieldName(), field);
14531
        }
14532
      }
14533
 
14534
      /**
14535
       * Find the _Fields constant that matches fieldId, or null if its not found.
14536
       */
14537
      public static _Fields findByThriftId(int fieldId) {
14538
        return byId.get(fieldId);
14539
      }
14540
 
14541
      /**
14542
       * Find the _Fields constant that matches fieldId, throwing an exception
14543
       * if it is not found.
14544
       */
14545
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14546
        _Fields fields = findByThriftId(fieldId);
14547
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14548
        return fields;
14549
      }
14550
 
14551
      /**
14552
       * Find the _Fields constant that matches name, or null if its not found.
14553
       */
14554
      public static _Fields findByName(String name) {
14555
        return byName.get(name);
14556
      }
14557
 
14558
      private final short _thriftId;
14559
      private final String _fieldName;
14560
 
14561
      _Fields(short thriftId, String fieldName) {
14562
        _thriftId = thriftId;
14563
        _fieldName = fieldName;
14564
      }
14565
 
14566
      public short getThriftFieldId() {
14567
        return _thriftId;
14568
      }
14569
 
14570
      public String getFieldName() {
14571
        return _fieldName;
14572
      }
14573
    }
14574
 
14575
    // isset id assignments
483 rajveer 14576
    private static final int __ID_ISSET_ID = 0;
14577
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 14578
 
14579
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14580
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 14581
          new FieldValueMetaData(TType.I64)));
14582
    }});
14583
 
14584
    static {
483 rajveer 14585
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 14586
    }
14587
 
483 rajveer 14588
    public getOrder_args() {
68 ashish 14589
    }
14590
 
483 rajveer 14591
    public getOrder_args(
14592
      long id)
68 ashish 14593
    {
14594
      this();
483 rajveer 14595
      this.id = id;
14596
      setIdIsSet(true);
68 ashish 14597
    }
14598
 
14599
    /**
14600
     * Performs a deep copy on <i>other</i>.
14601
     */
483 rajveer 14602
    public getOrder_args(getOrder_args other) {
68 ashish 14603
      __isset_bit_vector.clear();
14604
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14605
      this.id = other.id;
68 ashish 14606
    }
14607
 
483 rajveer 14608
    public getOrder_args deepCopy() {
14609
      return new getOrder_args(this);
68 ashish 14610
    }
14611
 
14612
    @Deprecated
483 rajveer 14613
    public getOrder_args clone() {
14614
      return new getOrder_args(this);
68 ashish 14615
    }
14616
 
483 rajveer 14617
    public long getId() {
14618
      return this.id;
68 ashish 14619
    }
14620
 
483 rajveer 14621
    public getOrder_args setId(long id) {
14622
      this.id = id;
14623
      setIdIsSet(true);
68 ashish 14624
      return this;
14625
    }
14626
 
483 rajveer 14627
    public void unsetId() {
14628
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 14629
    }
14630
 
483 rajveer 14631
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
14632
    public boolean isSetId() {
14633
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 14634
    }
14635
 
483 rajveer 14636
    public void setIdIsSet(boolean value) {
14637
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 14638
    }
14639
 
14640
    public void setFieldValue(_Fields field, Object value) {
14641
      switch (field) {
483 rajveer 14642
      case ID:
68 ashish 14643
        if (value == null) {
483 rajveer 14644
          unsetId();
68 ashish 14645
        } else {
483 rajveer 14646
          setId((Long)value);
68 ashish 14647
        }
14648
        break;
14649
 
14650
      }
14651
    }
14652
 
14653
    public void setFieldValue(int fieldID, Object value) {
14654
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14655
    }
14656
 
14657
    public Object getFieldValue(_Fields field) {
14658
      switch (field) {
483 rajveer 14659
      case ID:
14660
        return new Long(getId());
68 ashish 14661
 
14662
      }
14663
      throw new IllegalStateException();
14664
    }
14665
 
14666
    public Object getFieldValue(int fieldId) {
14667
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14668
    }
14669
 
14670
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14671
    public boolean isSet(_Fields field) {
14672
      switch (field) {
483 rajveer 14673
      case ID:
14674
        return isSetId();
68 ashish 14675
      }
14676
      throw new IllegalStateException();
14677
    }
14678
 
14679
    public boolean isSet(int fieldID) {
14680
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14681
    }
14682
 
14683
    @Override
14684
    public boolean equals(Object that) {
14685
      if (that == null)
14686
        return false;
483 rajveer 14687
      if (that instanceof getOrder_args)
14688
        return this.equals((getOrder_args)that);
68 ashish 14689
      return false;
14690
    }
14691
 
483 rajveer 14692
    public boolean equals(getOrder_args that) {
68 ashish 14693
      if (that == null)
14694
        return false;
14695
 
483 rajveer 14696
      boolean this_present_id = true;
14697
      boolean that_present_id = true;
14698
      if (this_present_id || that_present_id) {
14699
        if (!(this_present_id && that_present_id))
68 ashish 14700
          return false;
483 rajveer 14701
        if (this.id != that.id)
68 ashish 14702
          return false;
14703
      }
14704
 
14705
      return true;
14706
    }
14707
 
14708
    @Override
14709
    public int hashCode() {
14710
      return 0;
14711
    }
14712
 
483 rajveer 14713
    public int compareTo(getOrder_args other) {
68 ashish 14714
      if (!getClass().equals(other.getClass())) {
14715
        return getClass().getName().compareTo(other.getClass().getName());
14716
      }
14717
 
14718
      int lastComparison = 0;
483 rajveer 14719
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 14720
 
483 rajveer 14721
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 14722
      if (lastComparison != 0) {
14723
        return lastComparison;
14724
      }
483 rajveer 14725
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 14726
      if (lastComparison != 0) {
14727
        return lastComparison;
14728
      }
14729
      return 0;
14730
    }
14731
 
14732
    public void read(TProtocol iprot) throws TException {
14733
      TField field;
14734
      iprot.readStructBegin();
14735
      while (true)
14736
      {
14737
        field = iprot.readFieldBegin();
14738
        if (field.type == TType.STOP) { 
14739
          break;
14740
        }
14741
        _Fields fieldId = _Fields.findByThriftId(field.id);
14742
        if (fieldId == null) {
14743
          TProtocolUtil.skip(iprot, field.type);
14744
        } else {
14745
          switch (fieldId) {
483 rajveer 14746
            case ID:
68 ashish 14747
              if (field.type == TType.I64) {
483 rajveer 14748
                this.id = iprot.readI64();
14749
                setIdIsSet(true);
68 ashish 14750
              } else { 
14751
                TProtocolUtil.skip(iprot, field.type);
14752
              }
14753
              break;
14754
          }
14755
          iprot.readFieldEnd();
14756
        }
14757
      }
14758
      iprot.readStructEnd();
14759
      validate();
14760
    }
14761
 
14762
    public void write(TProtocol oprot) throws TException {
14763
      validate();
14764
 
14765
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14766
      oprot.writeFieldBegin(ID_FIELD_DESC);
14767
      oprot.writeI64(this.id);
68 ashish 14768
      oprot.writeFieldEnd();
14769
      oprot.writeFieldStop();
14770
      oprot.writeStructEnd();
14771
    }
14772
 
14773
    @Override
14774
    public String toString() {
483 rajveer 14775
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 14776
      boolean first = true;
14777
 
483 rajveer 14778
      sb.append("id:");
14779
      sb.append(this.id);
68 ashish 14780
      first = false;
14781
      sb.append(")");
14782
      return sb.toString();
14783
    }
14784
 
14785
    public void validate() throws TException {
14786
      // check for required fields
14787
    }
14788
 
14789
  }
14790
 
483 rajveer 14791
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
14792
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 14793
 
483 rajveer 14794
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 14795
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14796
 
483 rajveer 14797
    private Order success;
68 ashish 14798
    private TransactionServiceException ex;
14799
 
14800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14801
    public enum _Fields implements TFieldIdEnum {
14802
      SUCCESS((short)0, "success"),
14803
      EX((short)1, "ex");
14804
 
14805
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14806
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14807
 
14808
      static {
14809
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14810
          byId.put((int)field._thriftId, field);
14811
          byName.put(field.getFieldName(), field);
14812
        }
14813
      }
14814
 
14815
      /**
14816
       * Find the _Fields constant that matches fieldId, or null if its not found.
14817
       */
14818
      public static _Fields findByThriftId(int fieldId) {
14819
        return byId.get(fieldId);
14820
      }
14821
 
14822
      /**
14823
       * Find the _Fields constant that matches fieldId, throwing an exception
14824
       * if it is not found.
14825
       */
14826
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14827
        _Fields fields = findByThriftId(fieldId);
14828
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14829
        return fields;
14830
      }
14831
 
14832
      /**
14833
       * Find the _Fields constant that matches name, or null if its not found.
14834
       */
14835
      public static _Fields findByName(String name) {
14836
        return byName.get(name);
14837
      }
14838
 
14839
      private final short _thriftId;
14840
      private final String _fieldName;
14841
 
14842
      _Fields(short thriftId, String fieldName) {
14843
        _thriftId = thriftId;
14844
        _fieldName = fieldName;
14845
      }
14846
 
14847
      public short getThriftFieldId() {
14848
        return _thriftId;
14849
      }
14850
 
14851
      public String getFieldName() {
14852
        return _fieldName;
14853
      }
14854
    }
14855
 
14856
    // isset id assignments
14857
 
14858
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14859
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14860
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 14861
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14862
          new FieldValueMetaData(TType.STRUCT)));
14863
    }});
14864
 
14865
    static {
483 rajveer 14866
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 14867
    }
14868
 
483 rajveer 14869
    public getOrder_result() {
68 ashish 14870
    }
14871
 
483 rajveer 14872
    public getOrder_result(
14873
      Order success,
68 ashish 14874
      TransactionServiceException ex)
14875
    {
14876
      this();
14877
      this.success = success;
14878
      this.ex = ex;
14879
    }
14880
 
14881
    /**
14882
     * Performs a deep copy on <i>other</i>.
14883
     */
483 rajveer 14884
    public getOrder_result(getOrder_result other) {
14885
      if (other.isSetSuccess()) {
14886
        this.success = new Order(other.success);
14887
      }
68 ashish 14888
      if (other.isSetEx()) {
14889
        this.ex = new TransactionServiceException(other.ex);
14890
      }
14891
    }
14892
 
483 rajveer 14893
    public getOrder_result deepCopy() {
14894
      return new getOrder_result(this);
68 ashish 14895
    }
14896
 
14897
    @Deprecated
483 rajveer 14898
    public getOrder_result clone() {
14899
      return new getOrder_result(this);
68 ashish 14900
    }
14901
 
483 rajveer 14902
    public Order getSuccess() {
68 ashish 14903
      return this.success;
14904
    }
14905
 
483 rajveer 14906
    public getOrder_result setSuccess(Order success) {
68 ashish 14907
      this.success = success;
14908
      return this;
14909
    }
14910
 
14911
    public void unsetSuccess() {
483 rajveer 14912
      this.success = null;
68 ashish 14913
    }
14914
 
14915
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14916
    public boolean isSetSuccess() {
483 rajveer 14917
      return this.success != null;
68 ashish 14918
    }
14919
 
14920
    public void setSuccessIsSet(boolean value) {
483 rajveer 14921
      if (!value) {
14922
        this.success = null;
14923
      }
68 ashish 14924
    }
14925
 
14926
    public TransactionServiceException getEx() {
14927
      return this.ex;
14928
    }
14929
 
483 rajveer 14930
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 14931
      this.ex = ex;
14932
      return this;
14933
    }
14934
 
14935
    public void unsetEx() {
14936
      this.ex = null;
14937
    }
14938
 
14939
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14940
    public boolean isSetEx() {
14941
      return this.ex != null;
14942
    }
14943
 
14944
    public void setExIsSet(boolean value) {
14945
      if (!value) {
14946
        this.ex = null;
14947
      }
14948
    }
14949
 
14950
    public void setFieldValue(_Fields field, Object value) {
14951
      switch (field) {
14952
      case SUCCESS:
14953
        if (value == null) {
14954
          unsetSuccess();
14955
        } else {
483 rajveer 14956
          setSuccess((Order)value);
68 ashish 14957
        }
14958
        break;
14959
 
14960
      case EX:
14961
        if (value == null) {
14962
          unsetEx();
14963
        } else {
14964
          setEx((TransactionServiceException)value);
14965
        }
14966
        break;
14967
 
14968
      }
14969
    }
14970
 
14971
    public void setFieldValue(int fieldID, Object value) {
14972
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14973
    }
14974
 
14975
    public Object getFieldValue(_Fields field) {
14976
      switch (field) {
14977
      case SUCCESS:
483 rajveer 14978
        return getSuccess();
68 ashish 14979
 
14980
      case EX:
14981
        return getEx();
14982
 
14983
      }
14984
      throw new IllegalStateException();
14985
    }
14986
 
14987
    public Object getFieldValue(int fieldId) {
14988
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14989
    }
14990
 
14991
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14992
    public boolean isSet(_Fields field) {
14993
      switch (field) {
14994
      case SUCCESS:
14995
        return isSetSuccess();
14996
      case EX:
14997
        return isSetEx();
14998
      }
14999
      throw new IllegalStateException();
15000
    }
15001
 
15002
    public boolean isSet(int fieldID) {
15003
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15004
    }
15005
 
15006
    @Override
15007
    public boolean equals(Object that) {
15008
      if (that == null)
15009
        return false;
483 rajveer 15010
      if (that instanceof getOrder_result)
15011
        return this.equals((getOrder_result)that);
68 ashish 15012
      return false;
15013
    }
15014
 
483 rajveer 15015
    public boolean equals(getOrder_result that) {
68 ashish 15016
      if (that == null)
15017
        return false;
15018
 
483 rajveer 15019
      boolean this_present_success = true && this.isSetSuccess();
15020
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15021
      if (this_present_success || that_present_success) {
15022
        if (!(this_present_success && that_present_success))
15023
          return false;
483 rajveer 15024
        if (!this.success.equals(that.success))
68 ashish 15025
          return false;
15026
      }
15027
 
15028
      boolean this_present_ex = true && this.isSetEx();
15029
      boolean that_present_ex = true && that.isSetEx();
15030
      if (this_present_ex || that_present_ex) {
15031
        if (!(this_present_ex && that_present_ex))
15032
          return false;
15033
        if (!this.ex.equals(that.ex))
15034
          return false;
15035
      }
15036
 
15037
      return true;
15038
    }
15039
 
15040
    @Override
15041
    public int hashCode() {
15042
      return 0;
15043
    }
15044
 
483 rajveer 15045
    public int compareTo(getOrder_result other) {
68 ashish 15046
      if (!getClass().equals(other.getClass())) {
15047
        return getClass().getName().compareTo(other.getClass().getName());
15048
      }
15049
 
15050
      int lastComparison = 0;
483 rajveer 15051
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 15052
 
15053
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15054
      if (lastComparison != 0) {
15055
        return lastComparison;
15056
      }
15057
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15058
      if (lastComparison != 0) {
15059
        return lastComparison;
15060
      }
15061
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15062
      if (lastComparison != 0) {
15063
        return lastComparison;
15064
      }
15065
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15066
      if (lastComparison != 0) {
15067
        return lastComparison;
15068
      }
15069
      return 0;
15070
    }
15071
 
15072
    public void read(TProtocol iprot) throws TException {
15073
      TField field;
15074
      iprot.readStructBegin();
15075
      while (true)
15076
      {
15077
        field = iprot.readFieldBegin();
15078
        if (field.type == TType.STOP) { 
15079
          break;
15080
        }
15081
        _Fields fieldId = _Fields.findByThriftId(field.id);
15082
        if (fieldId == null) {
15083
          TProtocolUtil.skip(iprot, field.type);
15084
        } else {
15085
          switch (fieldId) {
15086
            case SUCCESS:
483 rajveer 15087
              if (field.type == TType.STRUCT) {
15088
                this.success = new Order();
15089
                this.success.read(iprot);
68 ashish 15090
              } else { 
15091
                TProtocolUtil.skip(iprot, field.type);
15092
              }
15093
              break;
15094
            case EX:
15095
              if (field.type == TType.STRUCT) {
15096
                this.ex = new TransactionServiceException();
15097
                this.ex.read(iprot);
15098
              } else { 
15099
                TProtocolUtil.skip(iprot, field.type);
15100
              }
15101
              break;
15102
          }
15103
          iprot.readFieldEnd();
15104
        }
15105
      }
15106
      iprot.readStructEnd();
15107
      validate();
15108
    }
15109
 
15110
    public void write(TProtocol oprot) throws TException {
15111
      oprot.writeStructBegin(STRUCT_DESC);
15112
 
15113
      if (this.isSetSuccess()) {
15114
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15115
        this.success.write(oprot);
68 ashish 15116
        oprot.writeFieldEnd();
15117
      } else if (this.isSetEx()) {
15118
        oprot.writeFieldBegin(EX_FIELD_DESC);
15119
        this.ex.write(oprot);
15120
        oprot.writeFieldEnd();
15121
      }
15122
      oprot.writeFieldStop();
15123
      oprot.writeStructEnd();
15124
    }
15125
 
15126
    @Override
15127
    public String toString() {
483 rajveer 15128
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 15129
      boolean first = true;
15130
 
15131
      sb.append("success:");
483 rajveer 15132
      if (this.success == null) {
15133
        sb.append("null");
15134
      } else {
15135
        sb.append(this.success);
15136
      }
68 ashish 15137
      first = false;
15138
      if (!first) sb.append(", ");
15139
      sb.append("ex:");
15140
      if (this.ex == null) {
15141
        sb.append("null");
15142
      } else {
15143
        sb.append(this.ex);
15144
      }
15145
      first = false;
15146
      sb.append(")");
15147
      return sb.toString();
15148
    }
15149
 
15150
    public void validate() throws TException {
15151
      // check for required fields
15152
    }
15153
 
15154
  }
15155
 
483 rajveer 15156
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
15157
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 15158
 
483 rajveer 15159
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 15160
 
483 rajveer 15161
    private long orderId;
68 ashish 15162
 
15163
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15164
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15165
      ORDER_ID((short)1, "orderId");
68 ashish 15166
 
15167
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15168
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15169
 
15170
      static {
15171
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15172
          byId.put((int)field._thriftId, field);
15173
          byName.put(field.getFieldName(), field);
15174
        }
15175
      }
15176
 
15177
      /**
15178
       * Find the _Fields constant that matches fieldId, or null if its not found.
15179
       */
15180
      public static _Fields findByThriftId(int fieldId) {
15181
        return byId.get(fieldId);
15182
      }
15183
 
15184
      /**
15185
       * Find the _Fields constant that matches fieldId, throwing an exception
15186
       * if it is not found.
15187
       */
15188
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15189
        _Fields fields = findByThriftId(fieldId);
15190
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15191
        return fields;
15192
      }
15193
 
15194
      /**
15195
       * Find the _Fields constant that matches name, or null if its not found.
15196
       */
15197
      public static _Fields findByName(String name) {
15198
        return byName.get(name);
15199
      }
15200
 
15201
      private final short _thriftId;
15202
      private final String _fieldName;
15203
 
15204
      _Fields(short thriftId, String fieldName) {
15205
        _thriftId = thriftId;
15206
        _fieldName = fieldName;
15207
      }
15208
 
15209
      public short getThriftFieldId() {
15210
        return _thriftId;
15211
      }
15212
 
15213
      public String getFieldName() {
15214
        return _fieldName;
15215
      }
15216
    }
15217
 
15218
    // isset id assignments
483 rajveer 15219
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 15220
    private BitSet __isset_bit_vector = new BitSet(1);
15221
 
15222
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15223
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 15224
          new FieldValueMetaData(TType.I64)));
15225
    }});
15226
 
15227
    static {
483 rajveer 15228
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 15229
    }
15230
 
483 rajveer 15231
    public getLineItemsForOrder_args() {
68 ashish 15232
    }
15233
 
483 rajveer 15234
    public getLineItemsForOrder_args(
15235
      long orderId)
68 ashish 15236
    {
15237
      this();
483 rajveer 15238
      this.orderId = orderId;
15239
      setOrderIdIsSet(true);
68 ashish 15240
    }
15241
 
15242
    /**
15243
     * Performs a deep copy on <i>other</i>.
15244
     */
483 rajveer 15245
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 15246
      __isset_bit_vector.clear();
15247
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15248
      this.orderId = other.orderId;
68 ashish 15249
    }
15250
 
483 rajveer 15251
    public getLineItemsForOrder_args deepCopy() {
15252
      return new getLineItemsForOrder_args(this);
68 ashish 15253
    }
15254
 
15255
    @Deprecated
483 rajveer 15256
    public getLineItemsForOrder_args clone() {
15257
      return new getLineItemsForOrder_args(this);
68 ashish 15258
    }
15259
 
483 rajveer 15260
    public long getOrderId() {
15261
      return this.orderId;
68 ashish 15262
    }
15263
 
483 rajveer 15264
    public getLineItemsForOrder_args setOrderId(long orderId) {
15265
      this.orderId = orderId;
15266
      setOrderIdIsSet(true);
68 ashish 15267
      return this;
15268
    }
15269
 
483 rajveer 15270
    public void unsetOrderId() {
15271
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 15272
    }
15273
 
483 rajveer 15274
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15275
    public boolean isSetOrderId() {
15276
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 15277
    }
15278
 
483 rajveer 15279
    public void setOrderIdIsSet(boolean value) {
15280
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 15281
    }
15282
 
15283
    public void setFieldValue(_Fields field, Object value) {
15284
      switch (field) {
483 rajveer 15285
      case ORDER_ID:
68 ashish 15286
        if (value == null) {
483 rajveer 15287
          unsetOrderId();
68 ashish 15288
        } else {
483 rajveer 15289
          setOrderId((Long)value);
68 ashish 15290
        }
15291
        break;
15292
 
15293
      }
15294
    }
15295
 
15296
    public void setFieldValue(int fieldID, Object value) {
15297
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15298
    }
15299
 
15300
    public Object getFieldValue(_Fields field) {
15301
      switch (field) {
483 rajveer 15302
      case ORDER_ID:
15303
        return new Long(getOrderId());
68 ashish 15304
 
15305
      }
15306
      throw new IllegalStateException();
15307
    }
15308
 
15309
    public Object getFieldValue(int fieldId) {
15310
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15311
    }
15312
 
15313
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15314
    public boolean isSet(_Fields field) {
15315
      switch (field) {
483 rajveer 15316
      case ORDER_ID:
15317
        return isSetOrderId();
68 ashish 15318
      }
15319
      throw new IllegalStateException();
15320
    }
15321
 
15322
    public boolean isSet(int fieldID) {
15323
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15324
    }
15325
 
15326
    @Override
15327
    public boolean equals(Object that) {
15328
      if (that == null)
15329
        return false;
483 rajveer 15330
      if (that instanceof getLineItemsForOrder_args)
15331
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 15332
      return false;
15333
    }
15334
 
483 rajveer 15335
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 15336
      if (that == null)
15337
        return false;
15338
 
483 rajveer 15339
      boolean this_present_orderId = true;
15340
      boolean that_present_orderId = true;
15341
      if (this_present_orderId || that_present_orderId) {
15342
        if (!(this_present_orderId && that_present_orderId))
68 ashish 15343
          return false;
483 rajveer 15344
        if (this.orderId != that.orderId)
68 ashish 15345
          return false;
15346
      }
15347
 
15348
      return true;
15349
    }
15350
 
15351
    @Override
15352
    public int hashCode() {
15353
      return 0;
15354
    }
15355
 
483 rajveer 15356
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 15357
      if (!getClass().equals(other.getClass())) {
15358
        return getClass().getName().compareTo(other.getClass().getName());
15359
      }
15360
 
15361
      int lastComparison = 0;
483 rajveer 15362
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 15363
 
483 rajveer 15364
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 15365
      if (lastComparison != 0) {
15366
        return lastComparison;
15367
      }
483 rajveer 15368
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 15369
      if (lastComparison != 0) {
15370
        return lastComparison;
15371
      }
15372
      return 0;
15373
    }
15374
 
15375
    public void read(TProtocol iprot) throws TException {
15376
      TField field;
15377
      iprot.readStructBegin();
15378
      while (true)
15379
      {
15380
        field = iprot.readFieldBegin();
15381
        if (field.type == TType.STOP) { 
15382
          break;
15383
        }
15384
        _Fields fieldId = _Fields.findByThriftId(field.id);
15385
        if (fieldId == null) {
15386
          TProtocolUtil.skip(iprot, field.type);
15387
        } else {
15388
          switch (fieldId) {
483 rajveer 15389
            case ORDER_ID:
68 ashish 15390
              if (field.type == TType.I64) {
483 rajveer 15391
                this.orderId = iprot.readI64();
15392
                setOrderIdIsSet(true);
68 ashish 15393
              } else { 
15394
                TProtocolUtil.skip(iprot, field.type);
15395
              }
15396
              break;
15397
          }
15398
          iprot.readFieldEnd();
15399
        }
15400
      }
15401
      iprot.readStructEnd();
15402
      validate();
15403
    }
15404
 
15405
    public void write(TProtocol oprot) throws TException {
15406
      validate();
15407
 
15408
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15409
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15410
      oprot.writeI64(this.orderId);
68 ashish 15411
      oprot.writeFieldEnd();
15412
      oprot.writeFieldStop();
15413
      oprot.writeStructEnd();
15414
    }
15415
 
15416
    @Override
15417
    public String toString() {
483 rajveer 15418
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 15419
      boolean first = true;
15420
 
483 rajveer 15421
      sb.append("orderId:");
15422
      sb.append(this.orderId);
68 ashish 15423
      first = false;
15424
      sb.append(")");
15425
      return sb.toString();
15426
    }
15427
 
15428
    public void validate() throws TException {
15429
      // check for required fields
15430
    }
15431
 
15432
  }
15433
 
483 rajveer 15434
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
15435
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 15436
 
483 rajveer 15437
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15438
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15439
 
483 rajveer 15440
    private List<LineItem> success;
68 ashish 15441
    private TransactionServiceException ex;
15442
 
15443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15444
    public enum _Fields implements TFieldIdEnum {
15445
      SUCCESS((short)0, "success"),
15446
      EX((short)1, "ex");
15447
 
15448
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15450
 
15451
      static {
15452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15453
          byId.put((int)field._thriftId, field);
15454
          byName.put(field.getFieldName(), field);
15455
        }
15456
      }
15457
 
15458
      /**
15459
       * Find the _Fields constant that matches fieldId, or null if its not found.
15460
       */
15461
      public static _Fields findByThriftId(int fieldId) {
15462
        return byId.get(fieldId);
15463
      }
15464
 
15465
      /**
15466
       * Find the _Fields constant that matches fieldId, throwing an exception
15467
       * if it is not found.
15468
       */
15469
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15470
        _Fields fields = findByThriftId(fieldId);
15471
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15472
        return fields;
15473
      }
15474
 
15475
      /**
15476
       * Find the _Fields constant that matches name, or null if its not found.
15477
       */
15478
      public static _Fields findByName(String name) {
15479
        return byName.get(name);
15480
      }
15481
 
15482
      private final short _thriftId;
15483
      private final String _fieldName;
15484
 
15485
      _Fields(short thriftId, String fieldName) {
15486
        _thriftId = thriftId;
15487
        _fieldName = fieldName;
15488
      }
15489
 
15490
      public short getThriftFieldId() {
15491
        return _thriftId;
15492
      }
15493
 
15494
      public String getFieldName() {
15495
        return _fieldName;
15496
      }
15497
    }
15498
 
15499
    // isset id assignments
15500
 
15501
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15502
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15503
          new ListMetaData(TType.LIST, 
15504
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 15505
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15506
          new FieldValueMetaData(TType.STRUCT)));
15507
    }});
15508
 
15509
    static {
483 rajveer 15510
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 15511
    }
15512
 
483 rajveer 15513
    public getLineItemsForOrder_result() {
68 ashish 15514
    }
15515
 
483 rajveer 15516
    public getLineItemsForOrder_result(
15517
      List<LineItem> success,
68 ashish 15518
      TransactionServiceException ex)
15519
    {
15520
      this();
15521
      this.success = success;
15522
      this.ex = ex;
15523
    }
15524
 
15525
    /**
15526
     * Performs a deep copy on <i>other</i>.
15527
     */
483 rajveer 15528
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
15529
      if (other.isSetSuccess()) {
15530
        List<LineItem> __this__success = new ArrayList<LineItem>();
15531
        for (LineItem other_element : other.success) {
15532
          __this__success.add(new LineItem(other_element));
15533
        }
15534
        this.success = __this__success;
15535
      }
68 ashish 15536
      if (other.isSetEx()) {
15537
        this.ex = new TransactionServiceException(other.ex);
15538
      }
15539
    }
15540
 
483 rajveer 15541
    public getLineItemsForOrder_result deepCopy() {
15542
      return new getLineItemsForOrder_result(this);
68 ashish 15543
    }
15544
 
15545
    @Deprecated
483 rajveer 15546
    public getLineItemsForOrder_result clone() {
15547
      return new getLineItemsForOrder_result(this);
68 ashish 15548
    }
15549
 
483 rajveer 15550
    public int getSuccessSize() {
15551
      return (this.success == null) ? 0 : this.success.size();
15552
    }
15553
 
15554
    public java.util.Iterator<LineItem> getSuccessIterator() {
15555
      return (this.success == null) ? null : this.success.iterator();
15556
    }
15557
 
15558
    public void addToSuccess(LineItem elem) {
15559
      if (this.success == null) {
15560
        this.success = new ArrayList<LineItem>();
15561
      }
15562
      this.success.add(elem);
15563
    }
15564
 
15565
    public List<LineItem> getSuccess() {
68 ashish 15566
      return this.success;
15567
    }
15568
 
483 rajveer 15569
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 15570
      this.success = success;
15571
      return this;
15572
    }
15573
 
15574
    public void unsetSuccess() {
483 rajveer 15575
      this.success = null;
68 ashish 15576
    }
15577
 
15578
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15579
    public boolean isSetSuccess() {
483 rajveer 15580
      return this.success != null;
68 ashish 15581
    }
15582
 
15583
    public void setSuccessIsSet(boolean value) {
483 rajveer 15584
      if (!value) {
15585
        this.success = null;
15586
      }
68 ashish 15587
    }
15588
 
15589
    public TransactionServiceException getEx() {
15590
      return this.ex;
15591
    }
15592
 
483 rajveer 15593
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 15594
      this.ex = ex;
15595
      return this;
15596
    }
15597
 
15598
    public void unsetEx() {
15599
      this.ex = null;
15600
    }
15601
 
15602
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15603
    public boolean isSetEx() {
15604
      return this.ex != null;
15605
    }
15606
 
15607
    public void setExIsSet(boolean value) {
15608
      if (!value) {
15609
        this.ex = null;
15610
      }
15611
    }
15612
 
15613
    public void setFieldValue(_Fields field, Object value) {
15614
      switch (field) {
15615
      case SUCCESS:
15616
        if (value == null) {
15617
          unsetSuccess();
15618
        } else {
483 rajveer 15619
          setSuccess((List<LineItem>)value);
68 ashish 15620
        }
15621
        break;
15622
 
15623
      case EX:
15624
        if (value == null) {
15625
          unsetEx();
15626
        } else {
15627
          setEx((TransactionServiceException)value);
15628
        }
15629
        break;
15630
 
15631
      }
15632
    }
15633
 
15634
    public void setFieldValue(int fieldID, Object value) {
15635
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15636
    }
15637
 
15638
    public Object getFieldValue(_Fields field) {
15639
      switch (field) {
15640
      case SUCCESS:
483 rajveer 15641
        return getSuccess();
68 ashish 15642
 
15643
      case EX:
15644
        return getEx();
15645
 
15646
      }
15647
      throw new IllegalStateException();
15648
    }
15649
 
15650
    public Object getFieldValue(int fieldId) {
15651
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15652
    }
15653
 
15654
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15655
    public boolean isSet(_Fields field) {
15656
      switch (field) {
15657
      case SUCCESS:
15658
        return isSetSuccess();
15659
      case EX:
15660
        return isSetEx();
15661
      }
15662
      throw new IllegalStateException();
15663
    }
15664
 
15665
    public boolean isSet(int fieldID) {
15666
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15667
    }
15668
 
15669
    @Override
15670
    public boolean equals(Object that) {
15671
      if (that == null)
15672
        return false;
483 rajveer 15673
      if (that instanceof getLineItemsForOrder_result)
15674
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 15675
      return false;
15676
    }
15677
 
483 rajveer 15678
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 15679
      if (that == null)
15680
        return false;
15681
 
483 rajveer 15682
      boolean this_present_success = true && this.isSetSuccess();
15683
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15684
      if (this_present_success || that_present_success) {
15685
        if (!(this_present_success && that_present_success))
15686
          return false;
483 rajveer 15687
        if (!this.success.equals(that.success))
68 ashish 15688
          return false;
15689
      }
15690
 
15691
      boolean this_present_ex = true && this.isSetEx();
15692
      boolean that_present_ex = true && that.isSetEx();
15693
      if (this_present_ex || that_present_ex) {
15694
        if (!(this_present_ex && that_present_ex))
15695
          return false;
15696
        if (!this.ex.equals(that.ex))
15697
          return false;
15698
      }
15699
 
15700
      return true;
15701
    }
15702
 
15703
    @Override
15704
    public int hashCode() {
15705
      return 0;
15706
    }
15707
 
483 rajveer 15708
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 15709
      if (!getClass().equals(other.getClass())) {
15710
        return getClass().getName().compareTo(other.getClass().getName());
15711
      }
15712
 
15713
      int lastComparison = 0;
483 rajveer 15714
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 15715
 
15716
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15717
      if (lastComparison != 0) {
15718
        return lastComparison;
15719
      }
15720
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15721
      if (lastComparison != 0) {
15722
        return lastComparison;
15723
      }
15724
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15725
      if (lastComparison != 0) {
15726
        return lastComparison;
15727
      }
15728
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15729
      if (lastComparison != 0) {
15730
        return lastComparison;
15731
      }
15732
      return 0;
15733
    }
15734
 
15735
    public void read(TProtocol iprot) throws TException {
15736
      TField field;
15737
      iprot.readStructBegin();
15738
      while (true)
15739
      {
15740
        field = iprot.readFieldBegin();
15741
        if (field.type == TType.STOP) { 
15742
          break;
15743
        }
15744
        _Fields fieldId = _Fields.findByThriftId(field.id);
15745
        if (fieldId == null) {
15746
          TProtocolUtil.skip(iprot, field.type);
15747
        } else {
15748
          switch (fieldId) {
15749
            case SUCCESS:
483 rajveer 15750
              if (field.type == TType.LIST) {
15751
                {
1022 varun.gupt 15752
                  TList _list32 = iprot.readListBegin();
15753
                  this.success = new ArrayList<LineItem>(_list32.size);
15754
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15755
                  {
1022 varun.gupt 15756
                    LineItem _elem34;
15757
                    _elem34 = new LineItem();
15758
                    _elem34.read(iprot);
15759
                    this.success.add(_elem34);
483 rajveer 15760
                  }
15761
                  iprot.readListEnd();
15762
                }
68 ashish 15763
              } else { 
15764
                TProtocolUtil.skip(iprot, field.type);
15765
              }
15766
              break;
15767
            case EX:
15768
              if (field.type == TType.STRUCT) {
15769
                this.ex = new TransactionServiceException();
15770
                this.ex.read(iprot);
15771
              } else { 
15772
                TProtocolUtil.skip(iprot, field.type);
15773
              }
15774
              break;
15775
          }
15776
          iprot.readFieldEnd();
15777
        }
15778
      }
15779
      iprot.readStructEnd();
15780
      validate();
15781
    }
15782
 
15783
    public void write(TProtocol oprot) throws TException {
15784
      oprot.writeStructBegin(STRUCT_DESC);
15785
 
15786
      if (this.isSetSuccess()) {
15787
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15788
        {
15789
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 15790
          for (LineItem _iter35 : this.success)
483 rajveer 15791
          {
1022 varun.gupt 15792
            _iter35.write(oprot);
483 rajveer 15793
          }
15794
          oprot.writeListEnd();
15795
        }
68 ashish 15796
        oprot.writeFieldEnd();
15797
      } else if (this.isSetEx()) {
15798
        oprot.writeFieldBegin(EX_FIELD_DESC);
15799
        this.ex.write(oprot);
15800
        oprot.writeFieldEnd();
15801
      }
15802
      oprot.writeFieldStop();
15803
      oprot.writeStructEnd();
15804
    }
15805
 
15806
    @Override
15807
    public String toString() {
483 rajveer 15808
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 15809
      boolean first = true;
15810
 
15811
      sb.append("success:");
483 rajveer 15812
      if (this.success == null) {
15813
        sb.append("null");
15814
      } else {
15815
        sb.append(this.success);
15816
      }
68 ashish 15817
      first = false;
15818
      if (!first) sb.append(", ");
15819
      sb.append("ex:");
15820
      if (this.ex == null) {
15821
        sb.append("null");
15822
      } else {
15823
        sb.append(this.ex);
15824
      }
15825
      first = false;
15826
      sb.append(")");
15827
      return sb.toString();
15828
    }
15829
 
15830
    public void validate() throws TException {
15831
      // check for required fields
15832
    }
15833
 
15834
  }
15835
 
1221 chandransh 15836
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
15837
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
15838
 
15839
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
15840
 
15841
    private long warehouseId;
15842
 
15843
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15844
    public enum _Fields implements TFieldIdEnum {
15845
      WAREHOUSE_ID((short)1, "warehouseId");
15846
 
15847
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15848
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15849
 
15850
      static {
15851
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15852
          byId.put((int)field._thriftId, field);
15853
          byName.put(field.getFieldName(), field);
15854
        }
15855
      }
15856
 
15857
      /**
15858
       * Find the _Fields constant that matches fieldId, or null if its not found.
15859
       */
15860
      public static _Fields findByThriftId(int fieldId) {
15861
        return byId.get(fieldId);
15862
      }
15863
 
15864
      /**
15865
       * Find the _Fields constant that matches fieldId, throwing an exception
15866
       * if it is not found.
15867
       */
15868
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15869
        _Fields fields = findByThriftId(fieldId);
15870
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15871
        return fields;
15872
      }
15873
 
15874
      /**
15875
       * Find the _Fields constant that matches name, or null if its not found.
15876
       */
15877
      public static _Fields findByName(String name) {
15878
        return byName.get(name);
15879
      }
15880
 
15881
      private final short _thriftId;
15882
      private final String _fieldName;
15883
 
15884
      _Fields(short thriftId, String fieldName) {
15885
        _thriftId = thriftId;
15886
        _fieldName = fieldName;
15887
      }
15888
 
15889
      public short getThriftFieldId() {
15890
        return _thriftId;
15891
      }
15892
 
15893
      public String getFieldName() {
15894
        return _fieldName;
15895
      }
15896
    }
15897
 
15898
    // isset id assignments
15899
    private static final int __WAREHOUSEID_ISSET_ID = 0;
15900
    private BitSet __isset_bit_vector = new BitSet(1);
15901
 
15902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15903
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
15904
          new FieldValueMetaData(TType.I64)));
15905
    }});
15906
 
15907
    static {
15908
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
15909
    }
15910
 
15911
    public batchOrders_args() {
15912
    }
15913
 
15914
    public batchOrders_args(
15915
      long warehouseId)
15916
    {
15917
      this();
15918
      this.warehouseId = warehouseId;
15919
      setWarehouseIdIsSet(true);
15920
    }
15921
 
15922
    /**
15923
     * Performs a deep copy on <i>other</i>.
15924
     */
15925
    public batchOrders_args(batchOrders_args other) {
15926
      __isset_bit_vector.clear();
15927
      __isset_bit_vector.or(other.__isset_bit_vector);
15928
      this.warehouseId = other.warehouseId;
15929
    }
15930
 
15931
    public batchOrders_args deepCopy() {
15932
      return new batchOrders_args(this);
15933
    }
15934
 
15935
    @Deprecated
15936
    public batchOrders_args clone() {
15937
      return new batchOrders_args(this);
15938
    }
15939
 
15940
    public long getWarehouseId() {
15941
      return this.warehouseId;
15942
    }
15943
 
15944
    public batchOrders_args setWarehouseId(long warehouseId) {
15945
      this.warehouseId = warehouseId;
15946
      setWarehouseIdIsSet(true);
15947
      return this;
15948
    }
15949
 
15950
    public void unsetWarehouseId() {
15951
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
15952
    }
15953
 
15954
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
15955
    public boolean isSetWarehouseId() {
15956
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
15957
    }
15958
 
15959
    public void setWarehouseIdIsSet(boolean value) {
15960
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
15961
    }
15962
 
15963
    public void setFieldValue(_Fields field, Object value) {
15964
      switch (field) {
15965
      case WAREHOUSE_ID:
15966
        if (value == null) {
15967
          unsetWarehouseId();
15968
        } else {
15969
          setWarehouseId((Long)value);
15970
        }
15971
        break;
15972
 
15973
      }
15974
    }
15975
 
15976
    public void setFieldValue(int fieldID, Object value) {
15977
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15978
    }
15979
 
15980
    public Object getFieldValue(_Fields field) {
15981
      switch (field) {
15982
      case WAREHOUSE_ID:
15983
        return new Long(getWarehouseId());
15984
 
15985
      }
15986
      throw new IllegalStateException();
15987
    }
15988
 
15989
    public Object getFieldValue(int fieldId) {
15990
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15991
    }
15992
 
15993
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15994
    public boolean isSet(_Fields field) {
15995
      switch (field) {
15996
      case WAREHOUSE_ID:
15997
        return isSetWarehouseId();
15998
      }
15999
      throw new IllegalStateException();
16000
    }
16001
 
16002
    public boolean isSet(int fieldID) {
16003
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16004
    }
16005
 
16006
    @Override
16007
    public boolean equals(Object that) {
16008
      if (that == null)
16009
        return false;
16010
      if (that instanceof batchOrders_args)
16011
        return this.equals((batchOrders_args)that);
16012
      return false;
16013
    }
16014
 
16015
    public boolean equals(batchOrders_args that) {
16016
      if (that == null)
16017
        return false;
16018
 
16019
      boolean this_present_warehouseId = true;
16020
      boolean that_present_warehouseId = true;
16021
      if (this_present_warehouseId || that_present_warehouseId) {
16022
        if (!(this_present_warehouseId && that_present_warehouseId))
16023
          return false;
16024
        if (this.warehouseId != that.warehouseId)
16025
          return false;
16026
      }
16027
 
16028
      return true;
16029
    }
16030
 
16031
    @Override
16032
    public int hashCode() {
16033
      return 0;
16034
    }
16035
 
16036
    public int compareTo(batchOrders_args other) {
16037
      if (!getClass().equals(other.getClass())) {
16038
        return getClass().getName().compareTo(other.getClass().getName());
16039
      }
16040
 
16041
      int lastComparison = 0;
16042
      batchOrders_args typedOther = (batchOrders_args)other;
16043
 
16044
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
16045
      if (lastComparison != 0) {
16046
        return lastComparison;
16047
      }
16048
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
16049
      if (lastComparison != 0) {
16050
        return lastComparison;
16051
      }
16052
      return 0;
16053
    }
16054
 
16055
    public void read(TProtocol iprot) throws TException {
16056
      TField field;
16057
      iprot.readStructBegin();
16058
      while (true)
16059
      {
16060
        field = iprot.readFieldBegin();
16061
        if (field.type == TType.STOP) { 
16062
          break;
16063
        }
16064
        _Fields fieldId = _Fields.findByThriftId(field.id);
16065
        if (fieldId == null) {
16066
          TProtocolUtil.skip(iprot, field.type);
16067
        } else {
16068
          switch (fieldId) {
16069
            case WAREHOUSE_ID:
16070
              if (field.type == TType.I64) {
16071
                this.warehouseId = iprot.readI64();
16072
                setWarehouseIdIsSet(true);
16073
              } else { 
16074
                TProtocolUtil.skip(iprot, field.type);
16075
              }
16076
              break;
16077
          }
16078
          iprot.readFieldEnd();
16079
        }
16080
      }
16081
      iprot.readStructEnd();
16082
      validate();
16083
    }
16084
 
16085
    public void write(TProtocol oprot) throws TException {
16086
      validate();
16087
 
16088
      oprot.writeStructBegin(STRUCT_DESC);
16089
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
16090
      oprot.writeI64(this.warehouseId);
16091
      oprot.writeFieldEnd();
16092
      oprot.writeFieldStop();
16093
      oprot.writeStructEnd();
16094
    }
16095
 
16096
    @Override
16097
    public String toString() {
16098
      StringBuilder sb = new StringBuilder("batchOrders_args(");
16099
      boolean first = true;
16100
 
16101
      sb.append("warehouseId:");
16102
      sb.append(this.warehouseId);
16103
      first = false;
16104
      sb.append(")");
16105
      return sb.toString();
16106
    }
16107
 
16108
    public void validate() throws TException {
16109
      // check for required fields
16110
    }
16111
 
16112
  }
16113
 
16114
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
16115
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
16116
 
16117
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16118
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16119
 
16120
    private List<Order> success;
16121
    private TransactionServiceException ex;
16122
 
16123
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16124
    public enum _Fields implements TFieldIdEnum {
16125
      SUCCESS((short)0, "success"),
16126
      EX((short)1, "ex");
16127
 
16128
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16129
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16130
 
16131
      static {
16132
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16133
          byId.put((int)field._thriftId, field);
16134
          byName.put(field.getFieldName(), field);
16135
        }
16136
      }
16137
 
16138
      /**
16139
       * Find the _Fields constant that matches fieldId, or null if its not found.
16140
       */
16141
      public static _Fields findByThriftId(int fieldId) {
16142
        return byId.get(fieldId);
16143
      }
16144
 
16145
      /**
16146
       * Find the _Fields constant that matches fieldId, throwing an exception
16147
       * if it is not found.
16148
       */
16149
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16150
        _Fields fields = findByThriftId(fieldId);
16151
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16152
        return fields;
16153
      }
16154
 
16155
      /**
16156
       * Find the _Fields constant that matches name, or null if its not found.
16157
       */
16158
      public static _Fields findByName(String name) {
16159
        return byName.get(name);
16160
      }
16161
 
16162
      private final short _thriftId;
16163
      private final String _fieldName;
16164
 
16165
      _Fields(short thriftId, String fieldName) {
16166
        _thriftId = thriftId;
16167
        _fieldName = fieldName;
16168
      }
16169
 
16170
      public short getThriftFieldId() {
16171
        return _thriftId;
16172
      }
16173
 
16174
      public String getFieldName() {
16175
        return _fieldName;
16176
      }
16177
    }
16178
 
16179
    // isset id assignments
16180
 
16181
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16182
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16183
          new ListMetaData(TType.LIST, 
16184
              new StructMetaData(TType.STRUCT, Order.class))));
16185
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16186
          new FieldValueMetaData(TType.STRUCT)));
16187
    }});
16188
 
16189
    static {
16190
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
16191
    }
16192
 
16193
    public batchOrders_result() {
16194
    }
16195
 
16196
    public batchOrders_result(
16197
      List<Order> success,
16198
      TransactionServiceException ex)
16199
    {
16200
      this();
16201
      this.success = success;
16202
      this.ex = ex;
16203
    }
16204
 
16205
    /**
16206
     * Performs a deep copy on <i>other</i>.
16207
     */
16208
    public batchOrders_result(batchOrders_result other) {
16209
      if (other.isSetSuccess()) {
16210
        List<Order> __this__success = new ArrayList<Order>();
16211
        for (Order other_element : other.success) {
16212
          __this__success.add(new Order(other_element));
16213
        }
16214
        this.success = __this__success;
16215
      }
16216
      if (other.isSetEx()) {
16217
        this.ex = new TransactionServiceException(other.ex);
16218
      }
16219
    }
16220
 
16221
    public batchOrders_result deepCopy() {
16222
      return new batchOrders_result(this);
16223
    }
16224
 
16225
    @Deprecated
16226
    public batchOrders_result clone() {
16227
      return new batchOrders_result(this);
16228
    }
16229
 
16230
    public int getSuccessSize() {
16231
      return (this.success == null) ? 0 : this.success.size();
16232
    }
16233
 
16234
    public java.util.Iterator<Order> getSuccessIterator() {
16235
      return (this.success == null) ? null : this.success.iterator();
16236
    }
16237
 
16238
    public void addToSuccess(Order elem) {
16239
      if (this.success == null) {
16240
        this.success = new ArrayList<Order>();
16241
      }
16242
      this.success.add(elem);
16243
    }
16244
 
16245
    public List<Order> getSuccess() {
16246
      return this.success;
16247
    }
16248
 
16249
    public batchOrders_result setSuccess(List<Order> success) {
16250
      this.success = success;
16251
      return this;
16252
    }
16253
 
16254
    public void unsetSuccess() {
16255
      this.success = null;
16256
    }
16257
 
16258
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16259
    public boolean isSetSuccess() {
16260
      return this.success != null;
16261
    }
16262
 
16263
    public void setSuccessIsSet(boolean value) {
16264
      if (!value) {
16265
        this.success = null;
16266
      }
16267
    }
16268
 
16269
    public TransactionServiceException getEx() {
16270
      return this.ex;
16271
    }
16272
 
16273
    public batchOrders_result setEx(TransactionServiceException ex) {
16274
      this.ex = ex;
16275
      return this;
16276
    }
16277
 
16278
    public void unsetEx() {
16279
      this.ex = null;
16280
    }
16281
 
16282
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16283
    public boolean isSetEx() {
16284
      return this.ex != null;
16285
    }
16286
 
16287
    public void setExIsSet(boolean value) {
16288
      if (!value) {
16289
        this.ex = null;
16290
      }
16291
    }
16292
 
16293
    public void setFieldValue(_Fields field, Object value) {
16294
      switch (field) {
16295
      case SUCCESS:
16296
        if (value == null) {
16297
          unsetSuccess();
16298
        } else {
16299
          setSuccess((List<Order>)value);
16300
        }
16301
        break;
16302
 
16303
      case EX:
16304
        if (value == null) {
16305
          unsetEx();
16306
        } else {
16307
          setEx((TransactionServiceException)value);
16308
        }
16309
        break;
16310
 
16311
      }
16312
    }
16313
 
16314
    public void setFieldValue(int fieldID, Object value) {
16315
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16316
    }
16317
 
16318
    public Object getFieldValue(_Fields field) {
16319
      switch (field) {
16320
      case SUCCESS:
16321
        return getSuccess();
16322
 
16323
      case EX:
16324
        return getEx();
16325
 
16326
      }
16327
      throw new IllegalStateException();
16328
    }
16329
 
16330
    public Object getFieldValue(int fieldId) {
16331
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16332
    }
16333
 
16334
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16335
    public boolean isSet(_Fields field) {
16336
      switch (field) {
16337
      case SUCCESS:
16338
        return isSetSuccess();
16339
      case EX:
16340
        return isSetEx();
16341
      }
16342
      throw new IllegalStateException();
16343
    }
16344
 
16345
    public boolean isSet(int fieldID) {
16346
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16347
    }
16348
 
16349
    @Override
16350
    public boolean equals(Object that) {
16351
      if (that == null)
16352
        return false;
16353
      if (that instanceof batchOrders_result)
16354
        return this.equals((batchOrders_result)that);
16355
      return false;
16356
    }
16357
 
16358
    public boolean equals(batchOrders_result that) {
16359
      if (that == null)
16360
        return false;
16361
 
16362
      boolean this_present_success = true && this.isSetSuccess();
16363
      boolean that_present_success = true && that.isSetSuccess();
16364
      if (this_present_success || that_present_success) {
16365
        if (!(this_present_success && that_present_success))
16366
          return false;
16367
        if (!this.success.equals(that.success))
16368
          return false;
16369
      }
16370
 
16371
      boolean this_present_ex = true && this.isSetEx();
16372
      boolean that_present_ex = true && that.isSetEx();
16373
      if (this_present_ex || that_present_ex) {
16374
        if (!(this_present_ex && that_present_ex))
16375
          return false;
16376
        if (!this.ex.equals(that.ex))
16377
          return false;
16378
      }
16379
 
16380
      return true;
16381
    }
16382
 
16383
    @Override
16384
    public int hashCode() {
16385
      return 0;
16386
    }
16387
 
16388
    public int compareTo(batchOrders_result other) {
16389
      if (!getClass().equals(other.getClass())) {
16390
        return getClass().getName().compareTo(other.getClass().getName());
16391
      }
16392
 
16393
      int lastComparison = 0;
16394
      batchOrders_result typedOther = (batchOrders_result)other;
16395
 
16396
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16397
      if (lastComparison != 0) {
16398
        return lastComparison;
16399
      }
16400
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16401
      if (lastComparison != 0) {
16402
        return lastComparison;
16403
      }
16404
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16405
      if (lastComparison != 0) {
16406
        return lastComparison;
16407
      }
16408
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16409
      if (lastComparison != 0) {
16410
        return lastComparison;
16411
      }
16412
      return 0;
16413
    }
16414
 
16415
    public void read(TProtocol iprot) throws TException {
16416
      TField field;
16417
      iprot.readStructBegin();
16418
      while (true)
16419
      {
16420
        field = iprot.readFieldBegin();
16421
        if (field.type == TType.STOP) { 
16422
          break;
16423
        }
16424
        _Fields fieldId = _Fields.findByThriftId(field.id);
16425
        if (fieldId == null) {
16426
          TProtocolUtil.skip(iprot, field.type);
16427
        } else {
16428
          switch (fieldId) {
16429
            case SUCCESS:
16430
              if (field.type == TType.LIST) {
16431
                {
16432
                  TList _list36 = iprot.readListBegin();
16433
                  this.success = new ArrayList<Order>(_list36.size);
16434
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
16435
                  {
16436
                    Order _elem38;
16437
                    _elem38 = new Order();
16438
                    _elem38.read(iprot);
16439
                    this.success.add(_elem38);
16440
                  }
16441
                  iprot.readListEnd();
16442
                }
16443
              } else { 
16444
                TProtocolUtil.skip(iprot, field.type);
16445
              }
16446
              break;
16447
            case EX:
16448
              if (field.type == TType.STRUCT) {
16449
                this.ex = new TransactionServiceException();
16450
                this.ex.read(iprot);
16451
              } else { 
16452
                TProtocolUtil.skip(iprot, field.type);
16453
              }
16454
              break;
16455
          }
16456
          iprot.readFieldEnd();
16457
        }
16458
      }
16459
      iprot.readStructEnd();
16460
      validate();
16461
    }
16462
 
16463
    public void write(TProtocol oprot) throws TException {
16464
      oprot.writeStructBegin(STRUCT_DESC);
16465
 
16466
      if (this.isSetSuccess()) {
16467
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16468
        {
16469
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16470
          for (Order _iter39 : this.success)
16471
          {
16472
            _iter39.write(oprot);
16473
          }
16474
          oprot.writeListEnd();
16475
        }
16476
        oprot.writeFieldEnd();
16477
      } else if (this.isSetEx()) {
16478
        oprot.writeFieldBegin(EX_FIELD_DESC);
16479
        this.ex.write(oprot);
16480
        oprot.writeFieldEnd();
16481
      }
16482
      oprot.writeFieldStop();
16483
      oprot.writeStructEnd();
16484
    }
16485
 
16486
    @Override
16487
    public String toString() {
16488
      StringBuilder sb = new StringBuilder("batchOrders_result(");
16489
      boolean first = true;
16490
 
16491
      sb.append("success:");
16492
      if (this.success == null) {
16493
        sb.append("null");
16494
      } else {
16495
        sb.append(this.success);
16496
      }
16497
      first = false;
16498
      if (!first) sb.append(", ");
16499
      sb.append("ex:");
16500
      if (this.ex == null) {
16501
        sb.append("null");
16502
      } else {
16503
        sb.append(this.ex);
16504
      }
16505
      first = false;
16506
      sb.append(")");
16507
      return sb.toString();
16508
    }
16509
 
16510
    public void validate() throws TException {
16511
      // check for required fields
16512
    }
16513
 
16514
  }
16515
 
1209 chandransh 16516
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
16517
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
16518
 
16519
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
16520
 
16521
    private long orderId;
16522
 
16523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16524
    public enum _Fields implements TFieldIdEnum {
16525
      ORDER_ID((short)1, "orderId");
16526
 
16527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16529
 
16530
      static {
16531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16532
          byId.put((int)field._thriftId, field);
16533
          byName.put(field.getFieldName(), field);
16534
        }
16535
      }
16536
 
16537
      /**
16538
       * Find the _Fields constant that matches fieldId, or null if its not found.
16539
       */
16540
      public static _Fields findByThriftId(int fieldId) {
16541
        return byId.get(fieldId);
16542
      }
16543
 
16544
      /**
16545
       * Find the _Fields constant that matches fieldId, throwing an exception
16546
       * if it is not found.
16547
       */
16548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16549
        _Fields fields = findByThriftId(fieldId);
16550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16551
        return fields;
16552
      }
16553
 
16554
      /**
16555
       * Find the _Fields constant that matches name, or null if its not found.
16556
       */
16557
      public static _Fields findByName(String name) {
16558
        return byName.get(name);
16559
      }
16560
 
16561
      private final short _thriftId;
16562
      private final String _fieldName;
16563
 
16564
      _Fields(short thriftId, String fieldName) {
16565
        _thriftId = thriftId;
16566
        _fieldName = fieldName;
16567
      }
16568
 
16569
      public short getThriftFieldId() {
16570
        return _thriftId;
16571
      }
16572
 
16573
      public String getFieldName() {
16574
        return _fieldName;
16575
      }
16576
    }
16577
 
16578
    // isset id assignments
16579
    private static final int __ORDERID_ISSET_ID = 0;
16580
    private BitSet __isset_bit_vector = new BitSet(1);
16581
 
16582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16583
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
16584
          new FieldValueMetaData(TType.I64)));
16585
    }});
16586
 
16587
    static {
16588
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
16589
    }
16590
 
16591
    public markOrderAsOutOfStock_args() {
16592
    }
16593
 
16594
    public markOrderAsOutOfStock_args(
16595
      long orderId)
16596
    {
16597
      this();
16598
      this.orderId = orderId;
16599
      setOrderIdIsSet(true);
16600
    }
16601
 
16602
    /**
16603
     * Performs a deep copy on <i>other</i>.
16604
     */
16605
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
16606
      __isset_bit_vector.clear();
16607
      __isset_bit_vector.or(other.__isset_bit_vector);
16608
      this.orderId = other.orderId;
16609
    }
16610
 
16611
    public markOrderAsOutOfStock_args deepCopy() {
16612
      return new markOrderAsOutOfStock_args(this);
16613
    }
16614
 
16615
    @Deprecated
16616
    public markOrderAsOutOfStock_args clone() {
16617
      return new markOrderAsOutOfStock_args(this);
16618
    }
16619
 
16620
    public long getOrderId() {
16621
      return this.orderId;
16622
    }
16623
 
16624
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
16625
      this.orderId = orderId;
16626
      setOrderIdIsSet(true);
16627
      return this;
16628
    }
16629
 
16630
    public void unsetOrderId() {
16631
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
16632
    }
16633
 
16634
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16635
    public boolean isSetOrderId() {
16636
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
16637
    }
16638
 
16639
    public void setOrderIdIsSet(boolean value) {
16640
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
16641
    }
16642
 
16643
    public void setFieldValue(_Fields field, Object value) {
16644
      switch (field) {
16645
      case ORDER_ID:
16646
        if (value == null) {
16647
          unsetOrderId();
16648
        } else {
16649
          setOrderId((Long)value);
16650
        }
16651
        break;
16652
 
16653
      }
16654
    }
16655
 
16656
    public void setFieldValue(int fieldID, Object value) {
16657
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16658
    }
16659
 
16660
    public Object getFieldValue(_Fields field) {
16661
      switch (field) {
16662
      case ORDER_ID:
16663
        return new Long(getOrderId());
16664
 
16665
      }
16666
      throw new IllegalStateException();
16667
    }
16668
 
16669
    public Object getFieldValue(int fieldId) {
16670
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16671
    }
16672
 
16673
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16674
    public boolean isSet(_Fields field) {
16675
      switch (field) {
16676
      case ORDER_ID:
16677
        return isSetOrderId();
16678
      }
16679
      throw new IllegalStateException();
16680
    }
16681
 
16682
    public boolean isSet(int fieldID) {
16683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16684
    }
16685
 
16686
    @Override
16687
    public boolean equals(Object that) {
16688
      if (that == null)
16689
        return false;
16690
      if (that instanceof markOrderAsOutOfStock_args)
16691
        return this.equals((markOrderAsOutOfStock_args)that);
16692
      return false;
16693
    }
16694
 
16695
    public boolean equals(markOrderAsOutOfStock_args that) {
16696
      if (that == null)
16697
        return false;
16698
 
16699
      boolean this_present_orderId = true;
16700
      boolean that_present_orderId = true;
16701
      if (this_present_orderId || that_present_orderId) {
16702
        if (!(this_present_orderId && that_present_orderId))
16703
          return false;
16704
        if (this.orderId != that.orderId)
16705
          return false;
16706
      }
16707
 
16708
      return true;
16709
    }
16710
 
16711
    @Override
16712
    public int hashCode() {
16713
      return 0;
16714
    }
16715
 
16716
    public int compareTo(markOrderAsOutOfStock_args other) {
16717
      if (!getClass().equals(other.getClass())) {
16718
        return getClass().getName().compareTo(other.getClass().getName());
16719
      }
16720
 
16721
      int lastComparison = 0;
16722
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
16723
 
16724
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
16725
      if (lastComparison != 0) {
16726
        return lastComparison;
16727
      }
16728
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
16729
      if (lastComparison != 0) {
16730
        return lastComparison;
16731
      }
16732
      return 0;
16733
    }
16734
 
16735
    public void read(TProtocol iprot) throws TException {
16736
      TField field;
16737
      iprot.readStructBegin();
16738
      while (true)
16739
      {
16740
        field = iprot.readFieldBegin();
16741
        if (field.type == TType.STOP) { 
16742
          break;
16743
        }
16744
        _Fields fieldId = _Fields.findByThriftId(field.id);
16745
        if (fieldId == null) {
16746
          TProtocolUtil.skip(iprot, field.type);
16747
        } else {
16748
          switch (fieldId) {
16749
            case ORDER_ID:
16750
              if (field.type == TType.I64) {
16751
                this.orderId = iprot.readI64();
16752
                setOrderIdIsSet(true);
16753
              } else { 
16754
                TProtocolUtil.skip(iprot, field.type);
16755
              }
16756
              break;
16757
          }
16758
          iprot.readFieldEnd();
16759
        }
16760
      }
16761
      iprot.readStructEnd();
16762
      validate();
16763
    }
16764
 
16765
    public void write(TProtocol oprot) throws TException {
16766
      validate();
16767
 
16768
      oprot.writeStructBegin(STRUCT_DESC);
16769
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
16770
      oprot.writeI64(this.orderId);
16771
      oprot.writeFieldEnd();
16772
      oprot.writeFieldStop();
16773
      oprot.writeStructEnd();
16774
    }
16775
 
16776
    @Override
16777
    public String toString() {
16778
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
16779
      boolean first = true;
16780
 
16781
      sb.append("orderId:");
16782
      sb.append(this.orderId);
16783
      first = false;
16784
      sb.append(")");
16785
      return sb.toString();
16786
    }
16787
 
16788
    public void validate() throws TException {
16789
      // check for required fields
16790
    }
16791
 
16792
  }
16793
 
16794
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
16795
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
16796
 
16797
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16798
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16799
 
16800
    private boolean success;
16801
    private TransactionServiceException ex;
16802
 
16803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16804
    public enum _Fields implements TFieldIdEnum {
16805
      SUCCESS((short)0, "success"),
16806
      EX((short)1, "ex");
16807
 
16808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16810
 
16811
      static {
16812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16813
          byId.put((int)field._thriftId, field);
16814
          byName.put(field.getFieldName(), field);
16815
        }
16816
      }
16817
 
16818
      /**
16819
       * Find the _Fields constant that matches fieldId, or null if its not found.
16820
       */
16821
      public static _Fields findByThriftId(int fieldId) {
16822
        return byId.get(fieldId);
16823
      }
16824
 
16825
      /**
16826
       * Find the _Fields constant that matches fieldId, throwing an exception
16827
       * if it is not found.
16828
       */
16829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16830
        _Fields fields = findByThriftId(fieldId);
16831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16832
        return fields;
16833
      }
16834
 
16835
      /**
16836
       * Find the _Fields constant that matches name, or null if its not found.
16837
       */
16838
      public static _Fields findByName(String name) {
16839
        return byName.get(name);
16840
      }
16841
 
16842
      private final short _thriftId;
16843
      private final String _fieldName;
16844
 
16845
      _Fields(short thriftId, String fieldName) {
16846
        _thriftId = thriftId;
16847
        _fieldName = fieldName;
16848
      }
16849
 
16850
      public short getThriftFieldId() {
16851
        return _thriftId;
16852
      }
16853
 
16854
      public String getFieldName() {
16855
        return _fieldName;
16856
      }
16857
    }
16858
 
16859
    // isset id assignments
16860
    private static final int __SUCCESS_ISSET_ID = 0;
16861
    private BitSet __isset_bit_vector = new BitSet(1);
16862
 
16863
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16864
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16865
          new FieldValueMetaData(TType.BOOL)));
16866
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16867
          new FieldValueMetaData(TType.STRUCT)));
16868
    }});
16869
 
16870
    static {
16871
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
16872
    }
16873
 
16874
    public markOrderAsOutOfStock_result() {
16875
    }
16876
 
16877
    public markOrderAsOutOfStock_result(
16878
      boolean success,
16879
      TransactionServiceException ex)
16880
    {
16881
      this();
16882
      this.success = success;
16883
      setSuccessIsSet(true);
16884
      this.ex = ex;
16885
    }
16886
 
16887
    /**
16888
     * Performs a deep copy on <i>other</i>.
16889
     */
16890
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
16891
      __isset_bit_vector.clear();
16892
      __isset_bit_vector.or(other.__isset_bit_vector);
16893
      this.success = other.success;
16894
      if (other.isSetEx()) {
16895
        this.ex = new TransactionServiceException(other.ex);
16896
      }
16897
    }
16898
 
16899
    public markOrderAsOutOfStock_result deepCopy() {
16900
      return new markOrderAsOutOfStock_result(this);
16901
    }
16902
 
16903
    @Deprecated
16904
    public markOrderAsOutOfStock_result clone() {
16905
      return new markOrderAsOutOfStock_result(this);
16906
    }
16907
 
16908
    public boolean isSuccess() {
16909
      return this.success;
16910
    }
16911
 
16912
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
16913
      this.success = success;
16914
      setSuccessIsSet(true);
16915
      return this;
16916
    }
16917
 
16918
    public void unsetSuccess() {
16919
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16920
    }
16921
 
16922
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16923
    public boolean isSetSuccess() {
16924
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16925
    }
16926
 
16927
    public void setSuccessIsSet(boolean value) {
16928
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16929
    }
16930
 
16931
    public TransactionServiceException getEx() {
16932
      return this.ex;
16933
    }
16934
 
16935
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
16936
      this.ex = ex;
16937
      return this;
16938
    }
16939
 
16940
    public void unsetEx() {
16941
      this.ex = null;
16942
    }
16943
 
16944
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16945
    public boolean isSetEx() {
16946
      return this.ex != null;
16947
    }
16948
 
16949
    public void setExIsSet(boolean value) {
16950
      if (!value) {
16951
        this.ex = null;
16952
      }
16953
    }
16954
 
16955
    public void setFieldValue(_Fields field, Object value) {
16956
      switch (field) {
16957
      case SUCCESS:
16958
        if (value == null) {
16959
          unsetSuccess();
16960
        } else {
16961
          setSuccess((Boolean)value);
16962
        }
16963
        break;
16964
 
16965
      case EX:
16966
        if (value == null) {
16967
          unsetEx();
16968
        } else {
16969
          setEx((TransactionServiceException)value);
16970
        }
16971
        break;
16972
 
16973
      }
16974
    }
16975
 
16976
    public void setFieldValue(int fieldID, Object value) {
16977
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16978
    }
16979
 
16980
    public Object getFieldValue(_Fields field) {
16981
      switch (field) {
16982
      case SUCCESS:
16983
        return new Boolean(isSuccess());
16984
 
16985
      case EX:
16986
        return getEx();
16987
 
16988
      }
16989
      throw new IllegalStateException();
16990
    }
16991
 
16992
    public Object getFieldValue(int fieldId) {
16993
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16994
    }
16995
 
16996
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16997
    public boolean isSet(_Fields field) {
16998
      switch (field) {
16999
      case SUCCESS:
17000
        return isSetSuccess();
17001
      case EX:
17002
        return isSetEx();
17003
      }
17004
      throw new IllegalStateException();
17005
    }
17006
 
17007
    public boolean isSet(int fieldID) {
17008
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17009
    }
17010
 
17011
    @Override
17012
    public boolean equals(Object that) {
17013
      if (that == null)
17014
        return false;
17015
      if (that instanceof markOrderAsOutOfStock_result)
17016
        return this.equals((markOrderAsOutOfStock_result)that);
17017
      return false;
17018
    }
17019
 
17020
    public boolean equals(markOrderAsOutOfStock_result that) {
17021
      if (that == null)
17022
        return false;
17023
 
17024
      boolean this_present_success = true;
17025
      boolean that_present_success = true;
17026
      if (this_present_success || that_present_success) {
17027
        if (!(this_present_success && that_present_success))
17028
          return false;
17029
        if (this.success != that.success)
17030
          return false;
17031
      }
17032
 
17033
      boolean this_present_ex = true && this.isSetEx();
17034
      boolean that_present_ex = true && that.isSetEx();
17035
      if (this_present_ex || that_present_ex) {
17036
        if (!(this_present_ex && that_present_ex))
17037
          return false;
17038
        if (!this.ex.equals(that.ex))
17039
          return false;
17040
      }
17041
 
17042
      return true;
17043
    }
17044
 
17045
    @Override
17046
    public int hashCode() {
17047
      return 0;
17048
    }
17049
 
17050
    public int compareTo(markOrderAsOutOfStock_result other) {
17051
      if (!getClass().equals(other.getClass())) {
17052
        return getClass().getName().compareTo(other.getClass().getName());
17053
      }
17054
 
17055
      int lastComparison = 0;
17056
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
17057
 
17058
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17059
      if (lastComparison != 0) {
17060
        return lastComparison;
17061
      }
17062
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17063
      if (lastComparison != 0) {
17064
        return lastComparison;
17065
      }
17066
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17067
      if (lastComparison != 0) {
17068
        return lastComparison;
17069
      }
17070
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17071
      if (lastComparison != 0) {
17072
        return lastComparison;
17073
      }
17074
      return 0;
17075
    }
17076
 
17077
    public void read(TProtocol iprot) throws TException {
17078
      TField field;
17079
      iprot.readStructBegin();
17080
      while (true)
17081
      {
17082
        field = iprot.readFieldBegin();
17083
        if (field.type == TType.STOP) { 
17084
          break;
17085
        }
17086
        _Fields fieldId = _Fields.findByThriftId(field.id);
17087
        if (fieldId == null) {
17088
          TProtocolUtil.skip(iprot, field.type);
17089
        } else {
17090
          switch (fieldId) {
17091
            case SUCCESS:
17092
              if (field.type == TType.BOOL) {
17093
                this.success = iprot.readBool();
17094
                setSuccessIsSet(true);
17095
              } else { 
17096
                TProtocolUtil.skip(iprot, field.type);
17097
              }
17098
              break;
17099
            case EX:
17100
              if (field.type == TType.STRUCT) {
17101
                this.ex = new TransactionServiceException();
17102
                this.ex.read(iprot);
17103
              } else { 
17104
                TProtocolUtil.skip(iprot, field.type);
17105
              }
17106
              break;
17107
          }
17108
          iprot.readFieldEnd();
17109
        }
17110
      }
17111
      iprot.readStructEnd();
17112
      validate();
17113
    }
17114
 
17115
    public void write(TProtocol oprot) throws TException {
17116
      oprot.writeStructBegin(STRUCT_DESC);
17117
 
17118
      if (this.isSetSuccess()) {
17119
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17120
        oprot.writeBool(this.success);
17121
        oprot.writeFieldEnd();
17122
      } else if (this.isSetEx()) {
17123
        oprot.writeFieldBegin(EX_FIELD_DESC);
17124
        this.ex.write(oprot);
17125
        oprot.writeFieldEnd();
17126
      }
17127
      oprot.writeFieldStop();
17128
      oprot.writeStructEnd();
17129
    }
17130
 
17131
    @Override
17132
    public String toString() {
17133
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
17134
      boolean first = true;
17135
 
17136
      sb.append("success:");
17137
      sb.append(this.success);
17138
      first = false;
17139
      if (!first) sb.append(", ");
17140
      sb.append("ex:");
17141
      if (this.ex == null) {
17142
        sb.append("null");
17143
      } else {
17144
        sb.append(this.ex);
17145
      }
17146
      first = false;
17147
      sb.append(")");
17148
      return sb.toString();
17149
    }
17150
 
17151
    public void validate() throws TException {
17152
      // check for required fields
17153
    }
17154
 
17155
  }
17156
 
758 chandransh 17157
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
17158
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
17159
 
17160
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
17161
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
17162
 
17163
    private long warehouseId;
17164
    private long providerId;
17165
 
17166
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17167
    public enum _Fields implements TFieldIdEnum {
17168
      WAREHOUSE_ID((short)1, "warehouseId"),
17169
      PROVIDER_ID((short)2, "providerId");
17170
 
17171
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17172
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17173
 
17174
      static {
17175
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17176
          byId.put((int)field._thriftId, field);
17177
          byName.put(field.getFieldName(), field);
17178
        }
17179
      }
17180
 
17181
      /**
17182
       * Find the _Fields constant that matches fieldId, or null if its not found.
17183
       */
17184
      public static _Fields findByThriftId(int fieldId) {
17185
        return byId.get(fieldId);
17186
      }
17187
 
17188
      /**
17189
       * Find the _Fields constant that matches fieldId, throwing an exception
17190
       * if it is not found.
17191
       */
17192
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17193
        _Fields fields = findByThriftId(fieldId);
17194
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17195
        return fields;
17196
      }
17197
 
17198
      /**
17199
       * Find the _Fields constant that matches name, or null if its not found.
17200
       */
17201
      public static _Fields findByName(String name) {
17202
        return byName.get(name);
17203
      }
17204
 
17205
      private final short _thriftId;
17206
      private final String _fieldName;
17207
 
17208
      _Fields(short thriftId, String fieldName) {
17209
        _thriftId = thriftId;
17210
        _fieldName = fieldName;
17211
      }
17212
 
17213
      public short getThriftFieldId() {
17214
        return _thriftId;
17215
      }
17216
 
17217
      public String getFieldName() {
17218
        return _fieldName;
17219
      }
17220
    }
17221
 
17222
    // isset id assignments
17223
    private static final int __WAREHOUSEID_ISSET_ID = 0;
17224
    private static final int __PROVIDERID_ISSET_ID = 1;
17225
    private BitSet __isset_bit_vector = new BitSet(2);
17226
 
17227
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17228
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
17229
          new FieldValueMetaData(TType.I64)));
17230
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17231
          new FieldValueMetaData(TType.I64)));
17232
    }});
17233
 
17234
    static {
17235
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
17236
    }
17237
 
17238
    public markOrdersAsManifested_args() {
17239
    }
17240
 
17241
    public markOrdersAsManifested_args(
17242
      long warehouseId,
17243
      long providerId)
17244
    {
17245
      this();
17246
      this.warehouseId = warehouseId;
17247
      setWarehouseIdIsSet(true);
17248
      this.providerId = providerId;
17249
      setProviderIdIsSet(true);
17250
    }
17251
 
17252
    /**
17253
     * Performs a deep copy on <i>other</i>.
17254
     */
17255
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
17256
      __isset_bit_vector.clear();
17257
      __isset_bit_vector.or(other.__isset_bit_vector);
17258
      this.warehouseId = other.warehouseId;
17259
      this.providerId = other.providerId;
17260
    }
17261
 
17262
    public markOrdersAsManifested_args deepCopy() {
17263
      return new markOrdersAsManifested_args(this);
17264
    }
17265
 
17266
    @Deprecated
17267
    public markOrdersAsManifested_args clone() {
17268
      return new markOrdersAsManifested_args(this);
17269
    }
17270
 
17271
    public long getWarehouseId() {
17272
      return this.warehouseId;
17273
    }
17274
 
17275
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
17276
      this.warehouseId = warehouseId;
17277
      setWarehouseIdIsSet(true);
17278
      return this;
17279
    }
17280
 
17281
    public void unsetWarehouseId() {
17282
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
17283
    }
17284
 
17285
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
17286
    public boolean isSetWarehouseId() {
17287
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
17288
    }
17289
 
17290
    public void setWarehouseIdIsSet(boolean value) {
17291
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
17292
    }
17293
 
17294
    public long getProviderId() {
17295
      return this.providerId;
17296
    }
17297
 
17298
    public markOrdersAsManifested_args setProviderId(long providerId) {
17299
      this.providerId = providerId;
17300
      setProviderIdIsSet(true);
17301
      return this;
17302
    }
17303
 
17304
    public void unsetProviderId() {
17305
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
17306
    }
17307
 
17308
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
17309
    public boolean isSetProviderId() {
17310
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
17311
    }
17312
 
17313
    public void setProviderIdIsSet(boolean value) {
17314
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
17315
    }
17316
 
17317
    public void setFieldValue(_Fields field, Object value) {
17318
      switch (field) {
17319
      case WAREHOUSE_ID:
17320
        if (value == null) {
17321
          unsetWarehouseId();
17322
        } else {
17323
          setWarehouseId((Long)value);
17324
        }
17325
        break;
17326
 
17327
      case PROVIDER_ID:
17328
        if (value == null) {
17329
          unsetProviderId();
17330
        } else {
17331
          setProviderId((Long)value);
17332
        }
17333
        break;
17334
 
17335
      }
17336
    }
17337
 
17338
    public void setFieldValue(int fieldID, Object value) {
17339
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17340
    }
17341
 
17342
    public Object getFieldValue(_Fields field) {
17343
      switch (field) {
17344
      case WAREHOUSE_ID:
17345
        return new Long(getWarehouseId());
17346
 
17347
      case PROVIDER_ID:
17348
        return new Long(getProviderId());
17349
 
17350
      }
17351
      throw new IllegalStateException();
17352
    }
17353
 
17354
    public Object getFieldValue(int fieldId) {
17355
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17356
    }
17357
 
17358
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17359
    public boolean isSet(_Fields field) {
17360
      switch (field) {
17361
      case WAREHOUSE_ID:
17362
        return isSetWarehouseId();
17363
      case PROVIDER_ID:
17364
        return isSetProviderId();
17365
      }
17366
      throw new IllegalStateException();
17367
    }
17368
 
17369
    public boolean isSet(int fieldID) {
17370
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17371
    }
17372
 
17373
    @Override
17374
    public boolean equals(Object that) {
17375
      if (that == null)
17376
        return false;
17377
      if (that instanceof markOrdersAsManifested_args)
17378
        return this.equals((markOrdersAsManifested_args)that);
17379
      return false;
17380
    }
17381
 
17382
    public boolean equals(markOrdersAsManifested_args that) {
17383
      if (that == null)
17384
        return false;
17385
 
17386
      boolean this_present_warehouseId = true;
17387
      boolean that_present_warehouseId = true;
17388
      if (this_present_warehouseId || that_present_warehouseId) {
17389
        if (!(this_present_warehouseId && that_present_warehouseId))
17390
          return false;
17391
        if (this.warehouseId != that.warehouseId)
17392
          return false;
17393
      }
17394
 
17395
      boolean this_present_providerId = true;
17396
      boolean that_present_providerId = true;
17397
      if (this_present_providerId || that_present_providerId) {
17398
        if (!(this_present_providerId && that_present_providerId))
17399
          return false;
17400
        if (this.providerId != that.providerId)
17401
          return false;
17402
      }
17403
 
17404
      return true;
17405
    }
17406
 
17407
    @Override
17408
    public int hashCode() {
17409
      return 0;
17410
    }
17411
 
17412
    public int compareTo(markOrdersAsManifested_args other) {
17413
      if (!getClass().equals(other.getClass())) {
17414
        return getClass().getName().compareTo(other.getClass().getName());
17415
      }
17416
 
17417
      int lastComparison = 0;
17418
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
17419
 
17420
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
17421
      if (lastComparison != 0) {
17422
        return lastComparison;
17423
      }
17424
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
17425
      if (lastComparison != 0) {
17426
        return lastComparison;
17427
      }
17428
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
17429
      if (lastComparison != 0) {
17430
        return lastComparison;
17431
      }
17432
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
17433
      if (lastComparison != 0) {
17434
        return lastComparison;
17435
      }
17436
      return 0;
17437
    }
17438
 
17439
    public void read(TProtocol iprot) throws TException {
17440
      TField field;
17441
      iprot.readStructBegin();
17442
      while (true)
17443
      {
17444
        field = iprot.readFieldBegin();
17445
        if (field.type == TType.STOP) { 
17446
          break;
17447
        }
17448
        _Fields fieldId = _Fields.findByThriftId(field.id);
17449
        if (fieldId == null) {
17450
          TProtocolUtil.skip(iprot, field.type);
17451
        } else {
17452
          switch (fieldId) {
17453
            case WAREHOUSE_ID:
17454
              if (field.type == TType.I64) {
17455
                this.warehouseId = iprot.readI64();
17456
                setWarehouseIdIsSet(true);
17457
              } else { 
17458
                TProtocolUtil.skip(iprot, field.type);
17459
              }
17460
              break;
17461
            case PROVIDER_ID:
17462
              if (field.type == TType.I64) {
17463
                this.providerId = iprot.readI64();
17464
                setProviderIdIsSet(true);
17465
              } else { 
17466
                TProtocolUtil.skip(iprot, field.type);
17467
              }
17468
              break;
17469
          }
17470
          iprot.readFieldEnd();
17471
        }
17472
      }
17473
      iprot.readStructEnd();
17474
      validate();
17475
    }
17476
 
17477
    public void write(TProtocol oprot) throws TException {
17478
      validate();
17479
 
17480
      oprot.writeStructBegin(STRUCT_DESC);
17481
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
17482
      oprot.writeI64(this.warehouseId);
17483
      oprot.writeFieldEnd();
17484
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
17485
      oprot.writeI64(this.providerId);
17486
      oprot.writeFieldEnd();
17487
      oprot.writeFieldStop();
17488
      oprot.writeStructEnd();
17489
    }
17490
 
17491
    @Override
17492
    public String toString() {
17493
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
17494
      boolean first = true;
17495
 
17496
      sb.append("warehouseId:");
17497
      sb.append(this.warehouseId);
17498
      first = false;
17499
      if (!first) sb.append(", ");
17500
      sb.append("providerId:");
17501
      sb.append(this.providerId);
17502
      first = false;
17503
      sb.append(")");
17504
      return sb.toString();
17505
    }
17506
 
17507
    public void validate() throws TException {
17508
      // check for required fields
17509
    }
17510
 
17511
  }
17512
 
17513
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
17514
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
17515
 
17516
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17517
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17518
 
17519
    private boolean success;
17520
    private TransactionServiceException ex;
17521
 
17522
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17523
    public enum _Fields implements TFieldIdEnum {
17524
      SUCCESS((short)0, "success"),
17525
      EX((short)1, "ex");
17526
 
17527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17529
 
17530
      static {
17531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17532
          byId.put((int)field._thriftId, field);
17533
          byName.put(field.getFieldName(), field);
17534
        }
17535
      }
17536
 
17537
      /**
17538
       * Find the _Fields constant that matches fieldId, or null if its not found.
17539
       */
17540
      public static _Fields findByThriftId(int fieldId) {
17541
        return byId.get(fieldId);
17542
      }
17543
 
17544
      /**
17545
       * Find the _Fields constant that matches fieldId, throwing an exception
17546
       * if it is not found.
17547
       */
17548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17549
        _Fields fields = findByThriftId(fieldId);
17550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17551
        return fields;
17552
      }
17553
 
17554
      /**
17555
       * Find the _Fields constant that matches name, or null if its not found.
17556
       */
17557
      public static _Fields findByName(String name) {
17558
        return byName.get(name);
17559
      }
17560
 
17561
      private final short _thriftId;
17562
      private final String _fieldName;
17563
 
17564
      _Fields(short thriftId, String fieldName) {
17565
        _thriftId = thriftId;
17566
        _fieldName = fieldName;
17567
      }
17568
 
17569
      public short getThriftFieldId() {
17570
        return _thriftId;
17571
      }
17572
 
17573
      public String getFieldName() {
17574
        return _fieldName;
17575
      }
17576
    }
17577
 
17578
    // isset id assignments
17579
    private static final int __SUCCESS_ISSET_ID = 0;
17580
    private BitSet __isset_bit_vector = new BitSet(1);
17581
 
17582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17583
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17584
          new FieldValueMetaData(TType.BOOL)));
17585
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17586
          new FieldValueMetaData(TType.STRUCT)));
17587
    }});
17588
 
17589
    static {
17590
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
17591
    }
17592
 
17593
    public markOrdersAsManifested_result() {
17594
    }
17595
 
17596
    public markOrdersAsManifested_result(
17597
      boolean success,
17598
      TransactionServiceException ex)
17599
    {
17600
      this();
17601
      this.success = success;
17602
      setSuccessIsSet(true);
17603
      this.ex = ex;
17604
    }
17605
 
17606
    /**
17607
     * Performs a deep copy on <i>other</i>.
17608
     */
17609
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
17610
      __isset_bit_vector.clear();
17611
      __isset_bit_vector.or(other.__isset_bit_vector);
17612
      this.success = other.success;
17613
      if (other.isSetEx()) {
17614
        this.ex = new TransactionServiceException(other.ex);
17615
      }
17616
    }
17617
 
17618
    public markOrdersAsManifested_result deepCopy() {
17619
      return new markOrdersAsManifested_result(this);
17620
    }
17621
 
17622
    @Deprecated
17623
    public markOrdersAsManifested_result clone() {
17624
      return new markOrdersAsManifested_result(this);
17625
    }
17626
 
17627
    public boolean isSuccess() {
17628
      return this.success;
17629
    }
17630
 
17631
    public markOrdersAsManifested_result setSuccess(boolean success) {
17632
      this.success = success;
17633
      setSuccessIsSet(true);
17634
      return this;
17635
    }
17636
 
17637
    public void unsetSuccess() {
17638
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17639
    }
17640
 
17641
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17642
    public boolean isSetSuccess() {
17643
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17644
    }
17645
 
17646
    public void setSuccessIsSet(boolean value) {
17647
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17648
    }
17649
 
17650
    public TransactionServiceException getEx() {
17651
      return this.ex;
17652
    }
17653
 
17654
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
17655
      this.ex = ex;
17656
      return this;
17657
    }
17658
 
17659
    public void unsetEx() {
17660
      this.ex = null;
17661
    }
17662
 
17663
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17664
    public boolean isSetEx() {
17665
      return this.ex != null;
17666
    }
17667
 
17668
    public void setExIsSet(boolean value) {
17669
      if (!value) {
17670
        this.ex = null;
17671
      }
17672
    }
17673
 
17674
    public void setFieldValue(_Fields field, Object value) {
17675
      switch (field) {
17676
      case SUCCESS:
17677
        if (value == null) {
17678
          unsetSuccess();
17679
        } else {
17680
          setSuccess((Boolean)value);
17681
        }
17682
        break;
17683
 
17684
      case EX:
17685
        if (value == null) {
17686
          unsetEx();
17687
        } else {
17688
          setEx((TransactionServiceException)value);
17689
        }
17690
        break;
17691
 
17692
      }
17693
    }
17694
 
17695
    public void setFieldValue(int fieldID, Object value) {
17696
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17697
    }
17698
 
17699
    public Object getFieldValue(_Fields field) {
17700
      switch (field) {
17701
      case SUCCESS:
17702
        return new Boolean(isSuccess());
17703
 
17704
      case EX:
17705
        return getEx();
17706
 
17707
      }
17708
      throw new IllegalStateException();
17709
    }
17710
 
17711
    public Object getFieldValue(int fieldId) {
17712
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17713
    }
17714
 
17715
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17716
    public boolean isSet(_Fields field) {
17717
      switch (field) {
17718
      case SUCCESS:
17719
        return isSetSuccess();
17720
      case EX:
17721
        return isSetEx();
17722
      }
17723
      throw new IllegalStateException();
17724
    }
17725
 
17726
    public boolean isSet(int fieldID) {
17727
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17728
    }
17729
 
17730
    @Override
17731
    public boolean equals(Object that) {
17732
      if (that == null)
17733
        return false;
17734
      if (that instanceof markOrdersAsManifested_result)
17735
        return this.equals((markOrdersAsManifested_result)that);
17736
      return false;
17737
    }
17738
 
17739
    public boolean equals(markOrdersAsManifested_result that) {
17740
      if (that == null)
17741
        return false;
17742
 
17743
      boolean this_present_success = true;
17744
      boolean that_present_success = true;
17745
      if (this_present_success || that_present_success) {
17746
        if (!(this_present_success && that_present_success))
17747
          return false;
17748
        if (this.success != that.success)
17749
          return false;
17750
      }
17751
 
17752
      boolean this_present_ex = true && this.isSetEx();
17753
      boolean that_present_ex = true && that.isSetEx();
17754
      if (this_present_ex || that_present_ex) {
17755
        if (!(this_present_ex && that_present_ex))
17756
          return false;
17757
        if (!this.ex.equals(that.ex))
17758
          return false;
17759
      }
17760
 
17761
      return true;
17762
    }
17763
 
17764
    @Override
17765
    public int hashCode() {
17766
      return 0;
17767
    }
17768
 
17769
    public int compareTo(markOrdersAsManifested_result other) {
17770
      if (!getClass().equals(other.getClass())) {
17771
        return getClass().getName().compareTo(other.getClass().getName());
17772
      }
17773
 
17774
      int lastComparison = 0;
17775
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
17776
 
17777
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17778
      if (lastComparison != 0) {
17779
        return lastComparison;
17780
      }
17781
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17782
      if (lastComparison != 0) {
17783
        return lastComparison;
17784
      }
17785
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17786
      if (lastComparison != 0) {
17787
        return lastComparison;
17788
      }
17789
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17790
      if (lastComparison != 0) {
17791
        return lastComparison;
17792
      }
17793
      return 0;
17794
    }
17795
 
17796
    public void read(TProtocol iprot) throws TException {
17797
      TField field;
17798
      iprot.readStructBegin();
17799
      while (true)
17800
      {
17801
        field = iprot.readFieldBegin();
17802
        if (field.type == TType.STOP) { 
17803
          break;
17804
        }
17805
        _Fields fieldId = _Fields.findByThriftId(field.id);
17806
        if (fieldId == null) {
17807
          TProtocolUtil.skip(iprot, field.type);
17808
        } else {
17809
          switch (fieldId) {
17810
            case SUCCESS:
17811
              if (field.type == TType.BOOL) {
17812
                this.success = iprot.readBool();
17813
                setSuccessIsSet(true);
17814
              } else { 
17815
                TProtocolUtil.skip(iprot, field.type);
17816
              }
17817
              break;
17818
            case EX:
17819
              if (field.type == TType.STRUCT) {
17820
                this.ex = new TransactionServiceException();
17821
                this.ex.read(iprot);
17822
              } else { 
17823
                TProtocolUtil.skip(iprot, field.type);
17824
              }
17825
              break;
17826
          }
17827
          iprot.readFieldEnd();
17828
        }
17829
      }
17830
      iprot.readStructEnd();
17831
      validate();
17832
    }
17833
 
17834
    public void write(TProtocol oprot) throws TException {
17835
      oprot.writeStructBegin(STRUCT_DESC);
17836
 
17837
      if (this.isSetSuccess()) {
17838
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17839
        oprot.writeBool(this.success);
17840
        oprot.writeFieldEnd();
17841
      } else if (this.isSetEx()) {
17842
        oprot.writeFieldBegin(EX_FIELD_DESC);
17843
        this.ex.write(oprot);
17844
        oprot.writeFieldEnd();
17845
      }
17846
      oprot.writeFieldStop();
17847
      oprot.writeStructEnd();
17848
    }
17849
 
17850
    @Override
17851
    public String toString() {
17852
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
17853
      boolean first = true;
17854
 
17855
      sb.append("success:");
17856
      sb.append(this.success);
17857
      first = false;
17858
      if (!first) sb.append(", ");
17859
      sb.append("ex:");
17860
      if (this.ex == null) {
17861
        sb.append("null");
17862
      } else {
17863
        sb.append(this.ex);
17864
      }
17865
      first = false;
17866
      sb.append(")");
17867
      return sb.toString();
17868
    }
17869
 
17870
    public void validate() throws TException {
17871
      // check for required fields
17872
    }
17873
 
17874
  }
17875
 
1114 chandransh 17876
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
17877
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
17878
 
17879
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
17880
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
17881
 
17882
    private long providerId;
17883
    private Map<String,Long> pickupDetails;
17884
 
17885
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17886
    public enum _Fields implements TFieldIdEnum {
17887
      PROVIDER_ID((short)1, "providerId"),
17888
      PICKUP_DETAILS((short)2, "pickupDetails");
17889
 
17890
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17891
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17892
 
17893
      static {
17894
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17895
          byId.put((int)field._thriftId, field);
17896
          byName.put(field.getFieldName(), field);
17897
        }
17898
      }
17899
 
17900
      /**
17901
       * Find the _Fields constant that matches fieldId, or null if its not found.
17902
       */
17903
      public static _Fields findByThriftId(int fieldId) {
17904
        return byId.get(fieldId);
17905
      }
17906
 
17907
      /**
17908
       * Find the _Fields constant that matches fieldId, throwing an exception
17909
       * if it is not found.
17910
       */
17911
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17912
        _Fields fields = findByThriftId(fieldId);
17913
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17914
        return fields;
17915
      }
17916
 
17917
      /**
17918
       * Find the _Fields constant that matches name, or null if its not found.
17919
       */
17920
      public static _Fields findByName(String name) {
17921
        return byName.get(name);
17922
      }
17923
 
17924
      private final short _thriftId;
17925
      private final String _fieldName;
17926
 
17927
      _Fields(short thriftId, String fieldName) {
17928
        _thriftId = thriftId;
17929
        _fieldName = fieldName;
17930
      }
17931
 
17932
      public short getThriftFieldId() {
17933
        return _thriftId;
17934
      }
17935
 
17936
      public String getFieldName() {
17937
        return _fieldName;
17938
      }
17939
    }
17940
 
17941
    // isset id assignments
17942
    private static final int __PROVIDERID_ISSET_ID = 0;
17943
    private BitSet __isset_bit_vector = new BitSet(1);
17944
 
17945
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17946
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17947
          new FieldValueMetaData(TType.I64)));
17948
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
17949
          new MapMetaData(TType.MAP, 
17950
              new FieldValueMetaData(TType.STRING), 
17951
              new FieldValueMetaData(TType.I64))));
17952
    }});
17953
 
17954
    static {
17955
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
17956
    }
17957
 
17958
    public markOrdersAsPickedUp_args() {
17959
    }
17960
 
17961
    public markOrdersAsPickedUp_args(
17962
      long providerId,
17963
      Map<String,Long> pickupDetails)
17964
    {
17965
      this();
17966
      this.providerId = providerId;
17967
      setProviderIdIsSet(true);
17968
      this.pickupDetails = pickupDetails;
17969
    }
17970
 
17971
    /**
17972
     * Performs a deep copy on <i>other</i>.
17973
     */
17974
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
17975
      __isset_bit_vector.clear();
17976
      __isset_bit_vector.or(other.__isset_bit_vector);
17977
      this.providerId = other.providerId;
17978
      if (other.isSetPickupDetails()) {
17979
        Map<String,Long> __this__pickupDetails = new HashMap<String,Long>();
17980
        for (Map.Entry<String, Long> other_element : other.pickupDetails.entrySet()) {
17981
 
17982
          String other_element_key = other_element.getKey();
17983
          Long other_element_value = other_element.getValue();
17984
 
17985
          String __this__pickupDetails_copy_key = other_element_key;
17986
 
17987
          Long __this__pickupDetails_copy_value = other_element_value;
17988
 
17989
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
17990
        }
17991
        this.pickupDetails = __this__pickupDetails;
17992
      }
17993
    }
17994
 
17995
    public markOrdersAsPickedUp_args deepCopy() {
17996
      return new markOrdersAsPickedUp_args(this);
17997
    }
17998
 
17999
    @Deprecated
18000
    public markOrdersAsPickedUp_args clone() {
18001
      return new markOrdersAsPickedUp_args(this);
18002
    }
18003
 
18004
    public long getProviderId() {
18005
      return this.providerId;
18006
    }
18007
 
18008
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
18009
      this.providerId = providerId;
18010
      setProviderIdIsSet(true);
18011
      return this;
18012
    }
18013
 
18014
    public void unsetProviderId() {
18015
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
18016
    }
18017
 
18018
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
18019
    public boolean isSetProviderId() {
18020
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
18021
    }
18022
 
18023
    public void setProviderIdIsSet(boolean value) {
18024
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
18025
    }
18026
 
18027
    public int getPickupDetailsSize() {
18028
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
18029
    }
18030
 
18031
    public void putToPickupDetails(String key, long val) {
18032
      if (this.pickupDetails == null) {
18033
        this.pickupDetails = new HashMap<String,Long>();
18034
      }
18035
      this.pickupDetails.put(key, val);
18036
    }
18037
 
18038
    public Map<String,Long> getPickupDetails() {
18039
      return this.pickupDetails;
18040
    }
18041
 
18042
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,Long> pickupDetails) {
18043
      this.pickupDetails = pickupDetails;
18044
      return this;
18045
    }
18046
 
18047
    public void unsetPickupDetails() {
18048
      this.pickupDetails = null;
18049
    }
18050
 
18051
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
18052
    public boolean isSetPickupDetails() {
18053
      return this.pickupDetails != null;
18054
    }
18055
 
18056
    public void setPickupDetailsIsSet(boolean value) {
18057
      if (!value) {
18058
        this.pickupDetails = null;
18059
      }
18060
    }
18061
 
18062
    public void setFieldValue(_Fields field, Object value) {
18063
      switch (field) {
18064
      case PROVIDER_ID:
18065
        if (value == null) {
18066
          unsetProviderId();
18067
        } else {
18068
          setProviderId((Long)value);
18069
        }
18070
        break;
18071
 
18072
      case PICKUP_DETAILS:
18073
        if (value == null) {
18074
          unsetPickupDetails();
18075
        } else {
18076
          setPickupDetails((Map<String,Long>)value);
18077
        }
18078
        break;
18079
 
18080
      }
18081
    }
18082
 
18083
    public void setFieldValue(int fieldID, Object value) {
18084
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18085
    }
18086
 
18087
    public Object getFieldValue(_Fields field) {
18088
      switch (field) {
18089
      case PROVIDER_ID:
18090
        return new Long(getProviderId());
18091
 
18092
      case PICKUP_DETAILS:
18093
        return getPickupDetails();
18094
 
18095
      }
18096
      throw new IllegalStateException();
18097
    }
18098
 
18099
    public Object getFieldValue(int fieldId) {
18100
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18101
    }
18102
 
18103
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18104
    public boolean isSet(_Fields field) {
18105
      switch (field) {
18106
      case PROVIDER_ID:
18107
        return isSetProviderId();
18108
      case PICKUP_DETAILS:
18109
        return isSetPickupDetails();
18110
      }
18111
      throw new IllegalStateException();
18112
    }
18113
 
18114
    public boolean isSet(int fieldID) {
18115
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18116
    }
18117
 
18118
    @Override
18119
    public boolean equals(Object that) {
18120
      if (that == null)
18121
        return false;
18122
      if (that instanceof markOrdersAsPickedUp_args)
18123
        return this.equals((markOrdersAsPickedUp_args)that);
18124
      return false;
18125
    }
18126
 
18127
    public boolean equals(markOrdersAsPickedUp_args that) {
18128
      if (that == null)
18129
        return false;
18130
 
18131
      boolean this_present_providerId = true;
18132
      boolean that_present_providerId = true;
18133
      if (this_present_providerId || that_present_providerId) {
18134
        if (!(this_present_providerId && that_present_providerId))
18135
          return false;
18136
        if (this.providerId != that.providerId)
18137
          return false;
18138
      }
18139
 
18140
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
18141
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
18142
      if (this_present_pickupDetails || that_present_pickupDetails) {
18143
        if (!(this_present_pickupDetails && that_present_pickupDetails))
18144
          return false;
18145
        if (!this.pickupDetails.equals(that.pickupDetails))
18146
          return false;
18147
      }
18148
 
18149
      return true;
18150
    }
18151
 
18152
    @Override
18153
    public int hashCode() {
18154
      return 0;
18155
    }
18156
 
18157
    public void read(TProtocol iprot) throws TException {
18158
      TField field;
18159
      iprot.readStructBegin();
18160
      while (true)
18161
      {
18162
        field = iprot.readFieldBegin();
18163
        if (field.type == TType.STOP) { 
18164
          break;
18165
        }
18166
        _Fields fieldId = _Fields.findByThriftId(field.id);
18167
        if (fieldId == null) {
18168
          TProtocolUtil.skip(iprot, field.type);
18169
        } else {
18170
          switch (fieldId) {
18171
            case PROVIDER_ID:
18172
              if (field.type == TType.I64) {
18173
                this.providerId = iprot.readI64();
18174
                setProviderIdIsSet(true);
18175
              } else { 
18176
                TProtocolUtil.skip(iprot, field.type);
18177
              }
18178
              break;
18179
            case PICKUP_DETAILS:
18180
              if (field.type == TType.MAP) {
18181
                {
1221 chandransh 18182
                  TMap _map40 = iprot.readMapBegin();
18183
                  this.pickupDetails = new HashMap<String,Long>(2*_map40.size);
18184
                  for (int _i41 = 0; _i41 < _map40.size; ++_i41)
1114 chandransh 18185
                  {
1221 chandransh 18186
                    String _key42;
18187
                    long _val43;
18188
                    _key42 = iprot.readString();
18189
                    _val43 = iprot.readI64();
18190
                    this.pickupDetails.put(_key42, _val43);
1114 chandransh 18191
                  }
18192
                  iprot.readMapEnd();
18193
                }
18194
              } else { 
18195
                TProtocolUtil.skip(iprot, field.type);
18196
              }
18197
              break;
18198
          }
18199
          iprot.readFieldEnd();
18200
        }
18201
      }
18202
      iprot.readStructEnd();
18203
      validate();
18204
    }
18205
 
18206
    public void write(TProtocol oprot) throws TException {
18207
      validate();
18208
 
18209
      oprot.writeStructBegin(STRUCT_DESC);
18210
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
18211
      oprot.writeI64(this.providerId);
18212
      oprot.writeFieldEnd();
18213
      if (this.pickupDetails != null) {
18214
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
18215
        {
18216
          oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.pickupDetails.size()));
1221 chandransh 18217
          for (Map.Entry<String, Long> _iter44 : this.pickupDetails.entrySet())
1114 chandransh 18218
          {
1221 chandransh 18219
            oprot.writeString(_iter44.getKey());
18220
            oprot.writeI64(_iter44.getValue());
1114 chandransh 18221
          }
18222
          oprot.writeMapEnd();
18223
        }
18224
        oprot.writeFieldEnd();
18225
      }
18226
      oprot.writeFieldStop();
18227
      oprot.writeStructEnd();
18228
    }
18229
 
18230
    @Override
18231
    public String toString() {
18232
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
18233
      boolean first = true;
18234
 
18235
      sb.append("providerId:");
18236
      sb.append(this.providerId);
18237
      first = false;
18238
      if (!first) sb.append(", ");
18239
      sb.append("pickupDetails:");
18240
      if (this.pickupDetails == null) {
18241
        sb.append("null");
18242
      } else {
18243
        sb.append(this.pickupDetails);
18244
      }
18245
      first = false;
18246
      sb.append(")");
18247
      return sb.toString();
18248
    }
18249
 
18250
    public void validate() throws TException {
18251
      // check for required fields
18252
    }
18253
 
18254
  }
18255
 
18256
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
18257
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
18258
 
18259
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18260
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18261
 
18262
    private List<Order> success;
18263
    private TransactionServiceException ex;
18264
 
18265
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18266
    public enum _Fields implements TFieldIdEnum {
18267
      SUCCESS((short)0, "success"),
18268
      EX((short)1, "ex");
18269
 
18270
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18271
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18272
 
18273
      static {
18274
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18275
          byId.put((int)field._thriftId, field);
18276
          byName.put(field.getFieldName(), field);
18277
        }
18278
      }
18279
 
18280
      /**
18281
       * Find the _Fields constant that matches fieldId, or null if its not found.
18282
       */
18283
      public static _Fields findByThriftId(int fieldId) {
18284
        return byId.get(fieldId);
18285
      }
18286
 
18287
      /**
18288
       * Find the _Fields constant that matches fieldId, throwing an exception
18289
       * if it is not found.
18290
       */
18291
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18292
        _Fields fields = findByThriftId(fieldId);
18293
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18294
        return fields;
18295
      }
18296
 
18297
      /**
18298
       * Find the _Fields constant that matches name, or null if its not found.
18299
       */
18300
      public static _Fields findByName(String name) {
18301
        return byName.get(name);
18302
      }
18303
 
18304
      private final short _thriftId;
18305
      private final String _fieldName;
18306
 
18307
      _Fields(short thriftId, String fieldName) {
18308
        _thriftId = thriftId;
18309
        _fieldName = fieldName;
18310
      }
18311
 
18312
      public short getThriftFieldId() {
18313
        return _thriftId;
18314
      }
18315
 
18316
      public String getFieldName() {
18317
        return _fieldName;
18318
      }
18319
    }
18320
 
18321
    // isset id assignments
18322
 
18323
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18324
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18325
          new ListMetaData(TType.LIST, 
18326
              new StructMetaData(TType.STRUCT, Order.class))));
18327
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18328
          new FieldValueMetaData(TType.STRUCT)));
18329
    }});
18330
 
18331
    static {
18332
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
18333
    }
18334
 
18335
    public markOrdersAsPickedUp_result() {
18336
    }
18337
 
18338
    public markOrdersAsPickedUp_result(
18339
      List<Order> success,
18340
      TransactionServiceException ex)
18341
    {
18342
      this();
18343
      this.success = success;
18344
      this.ex = ex;
18345
    }
18346
 
18347
    /**
18348
     * Performs a deep copy on <i>other</i>.
18349
     */
18350
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
18351
      if (other.isSetSuccess()) {
18352
        List<Order> __this__success = new ArrayList<Order>();
18353
        for (Order other_element : other.success) {
18354
          __this__success.add(new Order(other_element));
18355
        }
18356
        this.success = __this__success;
18357
      }
18358
      if (other.isSetEx()) {
18359
        this.ex = new TransactionServiceException(other.ex);
18360
      }
18361
    }
18362
 
18363
    public markOrdersAsPickedUp_result deepCopy() {
18364
      return new markOrdersAsPickedUp_result(this);
18365
    }
18366
 
18367
    @Deprecated
18368
    public markOrdersAsPickedUp_result clone() {
18369
      return new markOrdersAsPickedUp_result(this);
18370
    }
18371
 
18372
    public int getSuccessSize() {
18373
      return (this.success == null) ? 0 : this.success.size();
18374
    }
18375
 
18376
    public java.util.Iterator<Order> getSuccessIterator() {
18377
      return (this.success == null) ? null : this.success.iterator();
18378
    }
18379
 
18380
    public void addToSuccess(Order elem) {
18381
      if (this.success == null) {
18382
        this.success = new ArrayList<Order>();
18383
      }
18384
      this.success.add(elem);
18385
    }
18386
 
18387
    public List<Order> getSuccess() {
18388
      return this.success;
18389
    }
18390
 
18391
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
18392
      this.success = success;
18393
      return this;
18394
    }
18395
 
18396
    public void unsetSuccess() {
18397
      this.success = null;
18398
    }
18399
 
18400
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18401
    public boolean isSetSuccess() {
18402
      return this.success != null;
18403
    }
18404
 
18405
    public void setSuccessIsSet(boolean value) {
18406
      if (!value) {
18407
        this.success = null;
18408
      }
18409
    }
18410
 
18411
    public TransactionServiceException getEx() {
18412
      return this.ex;
18413
    }
18414
 
18415
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
18416
      this.ex = ex;
18417
      return this;
18418
    }
18419
 
18420
    public void unsetEx() {
18421
      this.ex = null;
18422
    }
18423
 
18424
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18425
    public boolean isSetEx() {
18426
      return this.ex != null;
18427
    }
18428
 
18429
    public void setExIsSet(boolean value) {
18430
      if (!value) {
18431
        this.ex = null;
18432
      }
18433
    }
18434
 
18435
    public void setFieldValue(_Fields field, Object value) {
18436
      switch (field) {
18437
      case SUCCESS:
18438
        if (value == null) {
18439
          unsetSuccess();
18440
        } else {
18441
          setSuccess((List<Order>)value);
18442
        }
18443
        break;
18444
 
18445
      case EX:
18446
        if (value == null) {
18447
          unsetEx();
18448
        } else {
18449
          setEx((TransactionServiceException)value);
18450
        }
18451
        break;
18452
 
18453
      }
18454
    }
18455
 
18456
    public void setFieldValue(int fieldID, Object value) {
18457
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18458
    }
18459
 
18460
    public Object getFieldValue(_Fields field) {
18461
      switch (field) {
18462
      case SUCCESS:
18463
        return getSuccess();
18464
 
18465
      case EX:
18466
        return getEx();
18467
 
18468
      }
18469
      throw new IllegalStateException();
18470
    }
18471
 
18472
    public Object getFieldValue(int fieldId) {
18473
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18474
    }
18475
 
18476
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18477
    public boolean isSet(_Fields field) {
18478
      switch (field) {
18479
      case SUCCESS:
18480
        return isSetSuccess();
18481
      case EX:
18482
        return isSetEx();
18483
      }
18484
      throw new IllegalStateException();
18485
    }
18486
 
18487
    public boolean isSet(int fieldID) {
18488
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18489
    }
18490
 
18491
    @Override
18492
    public boolean equals(Object that) {
18493
      if (that == null)
18494
        return false;
18495
      if (that instanceof markOrdersAsPickedUp_result)
18496
        return this.equals((markOrdersAsPickedUp_result)that);
18497
      return false;
18498
    }
18499
 
18500
    public boolean equals(markOrdersAsPickedUp_result that) {
18501
      if (that == null)
18502
        return false;
18503
 
18504
      boolean this_present_success = true && this.isSetSuccess();
18505
      boolean that_present_success = true && that.isSetSuccess();
18506
      if (this_present_success || that_present_success) {
18507
        if (!(this_present_success && that_present_success))
18508
          return false;
18509
        if (!this.success.equals(that.success))
18510
          return false;
18511
      }
18512
 
18513
      boolean this_present_ex = true && this.isSetEx();
18514
      boolean that_present_ex = true && that.isSetEx();
18515
      if (this_present_ex || that_present_ex) {
18516
        if (!(this_present_ex && that_present_ex))
18517
          return false;
18518
        if (!this.ex.equals(that.ex))
18519
          return false;
18520
      }
18521
 
18522
      return true;
18523
    }
18524
 
18525
    @Override
18526
    public int hashCode() {
18527
      return 0;
18528
    }
18529
 
18530
    public int compareTo(markOrdersAsPickedUp_result other) {
18531
      if (!getClass().equals(other.getClass())) {
18532
        return getClass().getName().compareTo(other.getClass().getName());
18533
      }
18534
 
18535
      int lastComparison = 0;
18536
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
18537
 
18538
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18539
      if (lastComparison != 0) {
18540
        return lastComparison;
18541
      }
18542
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18543
      if (lastComparison != 0) {
18544
        return lastComparison;
18545
      }
18546
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18547
      if (lastComparison != 0) {
18548
        return lastComparison;
18549
      }
18550
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18551
      if (lastComparison != 0) {
18552
        return lastComparison;
18553
      }
18554
      return 0;
18555
    }
18556
 
18557
    public void read(TProtocol iprot) throws TException {
18558
      TField field;
18559
      iprot.readStructBegin();
18560
      while (true)
18561
      {
18562
        field = iprot.readFieldBegin();
18563
        if (field.type == TType.STOP) { 
18564
          break;
18565
        }
18566
        _Fields fieldId = _Fields.findByThriftId(field.id);
18567
        if (fieldId == null) {
18568
          TProtocolUtil.skip(iprot, field.type);
18569
        } else {
18570
          switch (fieldId) {
18571
            case SUCCESS:
18572
              if (field.type == TType.LIST) {
18573
                {
1221 chandransh 18574
                  TList _list45 = iprot.readListBegin();
18575
                  this.success = new ArrayList<Order>(_list45.size);
18576
                  for (int _i46 = 0; _i46 < _list45.size; ++_i46)
1114 chandransh 18577
                  {
1221 chandransh 18578
                    Order _elem47;
18579
                    _elem47 = new Order();
18580
                    _elem47.read(iprot);
18581
                    this.success.add(_elem47);
1114 chandransh 18582
                  }
18583
                  iprot.readListEnd();
18584
                }
18585
              } else { 
18586
                TProtocolUtil.skip(iprot, field.type);
18587
              }
18588
              break;
18589
            case EX:
18590
              if (field.type == TType.STRUCT) {
18591
                this.ex = new TransactionServiceException();
18592
                this.ex.read(iprot);
18593
              } else { 
18594
                TProtocolUtil.skip(iprot, field.type);
18595
              }
18596
              break;
18597
          }
18598
          iprot.readFieldEnd();
18599
        }
18600
      }
18601
      iprot.readStructEnd();
18602
      validate();
18603
    }
18604
 
18605
    public void write(TProtocol oprot) throws TException {
18606
      oprot.writeStructBegin(STRUCT_DESC);
18607
 
18608
      if (this.isSetSuccess()) {
18609
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18610
        {
18611
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1221 chandransh 18612
          for (Order _iter48 : this.success)
1114 chandransh 18613
          {
1221 chandransh 18614
            _iter48.write(oprot);
1114 chandransh 18615
          }
18616
          oprot.writeListEnd();
18617
        }
18618
        oprot.writeFieldEnd();
18619
      } else if (this.isSetEx()) {
18620
        oprot.writeFieldBegin(EX_FIELD_DESC);
18621
        this.ex.write(oprot);
18622
        oprot.writeFieldEnd();
18623
      }
18624
      oprot.writeFieldStop();
18625
      oprot.writeStructEnd();
18626
    }
18627
 
18628
    @Override
18629
    public String toString() {
18630
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
18631
      boolean first = true;
18632
 
18633
      sb.append("success:");
18634
      if (this.success == null) {
18635
        sb.append("null");
18636
      } else {
18637
        sb.append(this.success);
18638
      }
18639
      first = false;
18640
      if (!first) sb.append(", ");
18641
      sb.append("ex:");
18642
      if (this.ex == null) {
18643
        sb.append("null");
18644
      } else {
18645
        sb.append(this.ex);
18646
      }
18647
      first = false;
18648
      sb.append(")");
18649
      return sb.toString();
18650
    }
18651
 
18652
    public void validate() throws TException {
18653
      // check for required fields
18654
    }
18655
 
18656
  }
18657
 
1133 chandransh 18658
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
18659
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
18660
 
18661
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
18662
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
18663
 
18664
    private long providerId;
18665
    private Map<String,String> deliveredOrders;
18666
 
18667
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18668
    public enum _Fields implements TFieldIdEnum {
18669
      PROVIDER_ID((short)1, "providerId"),
18670
      DELIVERED_ORDERS((short)2, "deliveredOrders");
18671
 
18672
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18673
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18674
 
18675
      static {
18676
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18677
          byId.put((int)field._thriftId, field);
18678
          byName.put(field.getFieldName(), field);
18679
        }
18680
      }
18681
 
18682
      /**
18683
       * Find the _Fields constant that matches fieldId, or null if its not found.
18684
       */
18685
      public static _Fields findByThriftId(int fieldId) {
18686
        return byId.get(fieldId);
18687
      }
18688
 
18689
      /**
18690
       * Find the _Fields constant that matches fieldId, throwing an exception
18691
       * if it is not found.
18692
       */
18693
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18694
        _Fields fields = findByThriftId(fieldId);
18695
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18696
        return fields;
18697
      }
18698
 
18699
      /**
18700
       * Find the _Fields constant that matches name, or null if its not found.
18701
       */
18702
      public static _Fields findByName(String name) {
18703
        return byName.get(name);
18704
      }
18705
 
18706
      private final short _thriftId;
18707
      private final String _fieldName;
18708
 
18709
      _Fields(short thriftId, String fieldName) {
18710
        _thriftId = thriftId;
18711
        _fieldName = fieldName;
18712
      }
18713
 
18714
      public short getThriftFieldId() {
18715
        return _thriftId;
18716
      }
18717
 
18718
      public String getFieldName() {
18719
        return _fieldName;
18720
      }
18721
    }
18722
 
18723
    // isset id assignments
18724
    private static final int __PROVIDERID_ISSET_ID = 0;
18725
    private BitSet __isset_bit_vector = new BitSet(1);
18726
 
18727
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18728
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
18729
          new FieldValueMetaData(TType.I64)));
18730
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
18731
          new MapMetaData(TType.MAP, 
18732
              new FieldValueMetaData(TType.STRING), 
18733
              new FieldValueMetaData(TType.STRING))));
18734
    }});
18735
 
18736
    static {
18737
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
18738
    }
18739
 
18740
    public markOrdersAsDelivered_args() {
18741
    }
18742
 
18743
    public markOrdersAsDelivered_args(
18744
      long providerId,
18745
      Map<String,String> deliveredOrders)
18746
    {
18747
      this();
18748
      this.providerId = providerId;
18749
      setProviderIdIsSet(true);
18750
      this.deliveredOrders = deliveredOrders;
18751
    }
18752
 
18753
    /**
18754
     * Performs a deep copy on <i>other</i>.
18755
     */
18756
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
18757
      __isset_bit_vector.clear();
18758
      __isset_bit_vector.or(other.__isset_bit_vector);
18759
      this.providerId = other.providerId;
18760
      if (other.isSetDeliveredOrders()) {
18761
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
18762
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
18763
 
18764
          String other_element_key = other_element.getKey();
18765
          String other_element_value = other_element.getValue();
18766
 
18767
          String __this__deliveredOrders_copy_key = other_element_key;
18768
 
18769
          String __this__deliveredOrders_copy_value = other_element_value;
18770
 
18771
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
18772
        }
18773
        this.deliveredOrders = __this__deliveredOrders;
18774
      }
18775
    }
18776
 
18777
    public markOrdersAsDelivered_args deepCopy() {
18778
      return new markOrdersAsDelivered_args(this);
18779
    }
18780
 
18781
    @Deprecated
18782
    public markOrdersAsDelivered_args clone() {
18783
      return new markOrdersAsDelivered_args(this);
18784
    }
18785
 
18786
    public long getProviderId() {
18787
      return this.providerId;
18788
    }
18789
 
18790
    public markOrdersAsDelivered_args setProviderId(long providerId) {
18791
      this.providerId = providerId;
18792
      setProviderIdIsSet(true);
18793
      return this;
18794
    }
18795
 
18796
    public void unsetProviderId() {
18797
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
18798
    }
18799
 
18800
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
18801
    public boolean isSetProviderId() {
18802
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
18803
    }
18804
 
18805
    public void setProviderIdIsSet(boolean value) {
18806
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
18807
    }
18808
 
18809
    public int getDeliveredOrdersSize() {
18810
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
18811
    }
18812
 
18813
    public void putToDeliveredOrders(String key, String val) {
18814
      if (this.deliveredOrders == null) {
18815
        this.deliveredOrders = new HashMap<String,String>();
18816
      }
18817
      this.deliveredOrders.put(key, val);
18818
    }
18819
 
18820
    public Map<String,String> getDeliveredOrders() {
18821
      return this.deliveredOrders;
18822
    }
18823
 
18824
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
18825
      this.deliveredOrders = deliveredOrders;
18826
      return this;
18827
    }
18828
 
18829
    public void unsetDeliveredOrders() {
18830
      this.deliveredOrders = null;
18831
    }
18832
 
18833
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
18834
    public boolean isSetDeliveredOrders() {
18835
      return this.deliveredOrders != null;
18836
    }
18837
 
18838
    public void setDeliveredOrdersIsSet(boolean value) {
18839
      if (!value) {
18840
        this.deliveredOrders = null;
18841
      }
18842
    }
18843
 
18844
    public void setFieldValue(_Fields field, Object value) {
18845
      switch (field) {
18846
      case PROVIDER_ID:
18847
        if (value == null) {
18848
          unsetProviderId();
18849
        } else {
18850
          setProviderId((Long)value);
18851
        }
18852
        break;
18853
 
18854
      case DELIVERED_ORDERS:
18855
        if (value == null) {
18856
          unsetDeliveredOrders();
18857
        } else {
18858
          setDeliveredOrders((Map<String,String>)value);
18859
        }
18860
        break;
18861
 
18862
      }
18863
    }
18864
 
18865
    public void setFieldValue(int fieldID, Object value) {
18866
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18867
    }
18868
 
18869
    public Object getFieldValue(_Fields field) {
18870
      switch (field) {
18871
      case PROVIDER_ID:
18872
        return new Long(getProviderId());
18873
 
18874
      case DELIVERED_ORDERS:
18875
        return getDeliveredOrders();
18876
 
18877
      }
18878
      throw new IllegalStateException();
18879
    }
18880
 
18881
    public Object getFieldValue(int fieldId) {
18882
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18883
    }
18884
 
18885
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18886
    public boolean isSet(_Fields field) {
18887
      switch (field) {
18888
      case PROVIDER_ID:
18889
        return isSetProviderId();
18890
      case DELIVERED_ORDERS:
18891
        return isSetDeliveredOrders();
18892
      }
18893
      throw new IllegalStateException();
18894
    }
18895
 
18896
    public boolean isSet(int fieldID) {
18897
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18898
    }
18899
 
18900
    @Override
18901
    public boolean equals(Object that) {
18902
      if (that == null)
18903
        return false;
18904
      if (that instanceof markOrdersAsDelivered_args)
18905
        return this.equals((markOrdersAsDelivered_args)that);
18906
      return false;
18907
    }
18908
 
18909
    public boolean equals(markOrdersAsDelivered_args that) {
18910
      if (that == null)
18911
        return false;
18912
 
18913
      boolean this_present_providerId = true;
18914
      boolean that_present_providerId = true;
18915
      if (this_present_providerId || that_present_providerId) {
18916
        if (!(this_present_providerId && that_present_providerId))
18917
          return false;
18918
        if (this.providerId != that.providerId)
18919
          return false;
18920
      }
18921
 
18922
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
18923
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
18924
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
18925
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
18926
          return false;
18927
        if (!this.deliveredOrders.equals(that.deliveredOrders))
18928
          return false;
18929
      }
18930
 
18931
      return true;
18932
    }
18933
 
18934
    @Override
18935
    public int hashCode() {
18936
      return 0;
18937
    }
18938
 
18939
    public void read(TProtocol iprot) throws TException {
18940
      TField field;
18941
      iprot.readStructBegin();
18942
      while (true)
18943
      {
18944
        field = iprot.readFieldBegin();
18945
        if (field.type == TType.STOP) { 
18946
          break;
18947
        }
18948
        _Fields fieldId = _Fields.findByThriftId(field.id);
18949
        if (fieldId == null) {
18950
          TProtocolUtil.skip(iprot, field.type);
18951
        } else {
18952
          switch (fieldId) {
18953
            case PROVIDER_ID:
18954
              if (field.type == TType.I64) {
18955
                this.providerId = iprot.readI64();
18956
                setProviderIdIsSet(true);
18957
              } else { 
18958
                TProtocolUtil.skip(iprot, field.type);
18959
              }
18960
              break;
18961
            case DELIVERED_ORDERS:
18962
              if (field.type == TType.MAP) {
18963
                {
1221 chandransh 18964
                  TMap _map49 = iprot.readMapBegin();
18965
                  this.deliveredOrders = new HashMap<String,String>(2*_map49.size);
18966
                  for (int _i50 = 0; _i50 < _map49.size; ++_i50)
1133 chandransh 18967
                  {
1221 chandransh 18968
                    String _key51;
18969
                    String _val52;
18970
                    _key51 = iprot.readString();
18971
                    _val52 = iprot.readString();
18972
                    this.deliveredOrders.put(_key51, _val52);
1133 chandransh 18973
                  }
18974
                  iprot.readMapEnd();
18975
                }
18976
              } else { 
18977
                TProtocolUtil.skip(iprot, field.type);
18978
              }
18979
              break;
18980
          }
18981
          iprot.readFieldEnd();
18982
        }
18983
      }
18984
      iprot.readStructEnd();
18985
      validate();
18986
    }
18987
 
18988
    public void write(TProtocol oprot) throws TException {
18989
      validate();
18990
 
18991
      oprot.writeStructBegin(STRUCT_DESC);
18992
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
18993
      oprot.writeI64(this.providerId);
18994
      oprot.writeFieldEnd();
18995
      if (this.deliveredOrders != null) {
18996
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
18997
        {
18998
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1221 chandransh 18999
          for (Map.Entry<String, String> _iter53 : this.deliveredOrders.entrySet())
1133 chandransh 19000
          {
1221 chandransh 19001
            oprot.writeString(_iter53.getKey());
19002
            oprot.writeString(_iter53.getValue());
1133 chandransh 19003
          }
19004
          oprot.writeMapEnd();
19005
        }
19006
        oprot.writeFieldEnd();
19007
      }
19008
      oprot.writeFieldStop();
19009
      oprot.writeStructEnd();
19010
    }
19011
 
19012
    @Override
19013
    public String toString() {
19014
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
19015
      boolean first = true;
19016
 
19017
      sb.append("providerId:");
19018
      sb.append(this.providerId);
19019
      first = false;
19020
      if (!first) sb.append(", ");
19021
      sb.append("deliveredOrders:");
19022
      if (this.deliveredOrders == null) {
19023
        sb.append("null");
19024
      } else {
19025
        sb.append(this.deliveredOrders);
19026
      }
19027
      first = false;
19028
      sb.append(")");
19029
      return sb.toString();
19030
    }
19031
 
19032
    public void validate() throws TException {
19033
      // check for required fields
19034
    }
19035
 
19036
  }
19037
 
19038
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
19039
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
19040
 
19041
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19042
 
19043
    private TransactionServiceException ex;
19044
 
19045
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19046
    public enum _Fields implements TFieldIdEnum {
19047
      EX((short)1, "ex");
19048
 
19049
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19050
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19051
 
19052
      static {
19053
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19054
          byId.put((int)field._thriftId, field);
19055
          byName.put(field.getFieldName(), field);
19056
        }
19057
      }
19058
 
19059
      /**
19060
       * Find the _Fields constant that matches fieldId, or null if its not found.
19061
       */
19062
      public static _Fields findByThriftId(int fieldId) {
19063
        return byId.get(fieldId);
19064
      }
19065
 
19066
      /**
19067
       * Find the _Fields constant that matches fieldId, throwing an exception
19068
       * if it is not found.
19069
       */
19070
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19071
        _Fields fields = findByThriftId(fieldId);
19072
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19073
        return fields;
19074
      }
19075
 
19076
      /**
19077
       * Find the _Fields constant that matches name, or null if its not found.
19078
       */
19079
      public static _Fields findByName(String name) {
19080
        return byName.get(name);
19081
      }
19082
 
19083
      private final short _thriftId;
19084
      private final String _fieldName;
19085
 
19086
      _Fields(short thriftId, String fieldName) {
19087
        _thriftId = thriftId;
19088
        _fieldName = fieldName;
19089
      }
19090
 
19091
      public short getThriftFieldId() {
19092
        return _thriftId;
19093
      }
19094
 
19095
      public String getFieldName() {
19096
        return _fieldName;
19097
      }
19098
    }
19099
 
19100
    // isset id assignments
19101
 
19102
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19103
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19104
          new FieldValueMetaData(TType.STRUCT)));
19105
    }});
19106
 
19107
    static {
19108
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
19109
    }
19110
 
19111
    public markOrdersAsDelivered_result() {
19112
    }
19113
 
19114
    public markOrdersAsDelivered_result(
19115
      TransactionServiceException ex)
19116
    {
19117
      this();
19118
      this.ex = ex;
19119
    }
19120
 
19121
    /**
19122
     * Performs a deep copy on <i>other</i>.
19123
     */
19124
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
19125
      if (other.isSetEx()) {
19126
        this.ex = new TransactionServiceException(other.ex);
19127
      }
19128
    }
19129
 
19130
    public markOrdersAsDelivered_result deepCopy() {
19131
      return new markOrdersAsDelivered_result(this);
19132
    }
19133
 
19134
    @Deprecated
19135
    public markOrdersAsDelivered_result clone() {
19136
      return new markOrdersAsDelivered_result(this);
19137
    }
19138
 
19139
    public TransactionServiceException getEx() {
19140
      return this.ex;
19141
    }
19142
 
19143
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
19144
      this.ex = ex;
19145
      return this;
19146
    }
19147
 
19148
    public void unsetEx() {
19149
      this.ex = null;
19150
    }
19151
 
19152
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19153
    public boolean isSetEx() {
19154
      return this.ex != null;
19155
    }
19156
 
19157
    public void setExIsSet(boolean value) {
19158
      if (!value) {
19159
        this.ex = null;
19160
      }
19161
    }
19162
 
19163
    public void setFieldValue(_Fields field, Object value) {
19164
      switch (field) {
19165
      case EX:
19166
        if (value == null) {
19167
          unsetEx();
19168
        } else {
19169
          setEx((TransactionServiceException)value);
19170
        }
19171
        break;
19172
 
19173
      }
19174
    }
19175
 
19176
    public void setFieldValue(int fieldID, Object value) {
19177
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19178
    }
19179
 
19180
    public Object getFieldValue(_Fields field) {
19181
      switch (field) {
19182
      case EX:
19183
        return getEx();
19184
 
19185
      }
19186
      throw new IllegalStateException();
19187
    }
19188
 
19189
    public Object getFieldValue(int fieldId) {
19190
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19191
    }
19192
 
19193
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19194
    public boolean isSet(_Fields field) {
19195
      switch (field) {
19196
      case EX:
19197
        return isSetEx();
19198
      }
19199
      throw new IllegalStateException();
19200
    }
19201
 
19202
    public boolean isSet(int fieldID) {
19203
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19204
    }
19205
 
19206
    @Override
19207
    public boolean equals(Object that) {
19208
      if (that == null)
19209
        return false;
19210
      if (that instanceof markOrdersAsDelivered_result)
19211
        return this.equals((markOrdersAsDelivered_result)that);
19212
      return false;
19213
    }
19214
 
19215
    public boolean equals(markOrdersAsDelivered_result that) {
19216
      if (that == null)
19217
        return false;
19218
 
19219
      boolean this_present_ex = true && this.isSetEx();
19220
      boolean that_present_ex = true && that.isSetEx();
19221
      if (this_present_ex || that_present_ex) {
19222
        if (!(this_present_ex && that_present_ex))
19223
          return false;
19224
        if (!this.ex.equals(that.ex))
19225
          return false;
19226
      }
19227
 
19228
      return true;
19229
    }
19230
 
19231
    @Override
19232
    public int hashCode() {
19233
      return 0;
19234
    }
19235
 
19236
    public int compareTo(markOrdersAsDelivered_result other) {
19237
      if (!getClass().equals(other.getClass())) {
19238
        return getClass().getName().compareTo(other.getClass().getName());
19239
      }
19240
 
19241
      int lastComparison = 0;
19242
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
19243
 
19244
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19245
      if (lastComparison != 0) {
19246
        return lastComparison;
19247
      }
19248
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19249
      if (lastComparison != 0) {
19250
        return lastComparison;
19251
      }
19252
      return 0;
19253
    }
19254
 
19255
    public void read(TProtocol iprot) throws TException {
19256
      TField field;
19257
      iprot.readStructBegin();
19258
      while (true)
19259
      {
19260
        field = iprot.readFieldBegin();
19261
        if (field.type == TType.STOP) { 
19262
          break;
19263
        }
19264
        _Fields fieldId = _Fields.findByThriftId(field.id);
19265
        if (fieldId == null) {
19266
          TProtocolUtil.skip(iprot, field.type);
19267
        } else {
19268
          switch (fieldId) {
19269
            case EX:
19270
              if (field.type == TType.STRUCT) {
19271
                this.ex = new TransactionServiceException();
19272
                this.ex.read(iprot);
19273
              } else { 
19274
                TProtocolUtil.skip(iprot, field.type);
19275
              }
19276
              break;
19277
          }
19278
          iprot.readFieldEnd();
19279
        }
19280
      }
19281
      iprot.readStructEnd();
19282
      validate();
19283
    }
19284
 
19285
    public void write(TProtocol oprot) throws TException {
19286
      oprot.writeStructBegin(STRUCT_DESC);
19287
 
19288
      if (this.isSetEx()) {
19289
        oprot.writeFieldBegin(EX_FIELD_DESC);
19290
        this.ex.write(oprot);
19291
        oprot.writeFieldEnd();
19292
      }
19293
      oprot.writeFieldStop();
19294
      oprot.writeStructEnd();
19295
    }
19296
 
19297
    @Override
19298
    public String toString() {
19299
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
19300
      boolean first = true;
19301
 
19302
      sb.append("ex:");
19303
      if (this.ex == null) {
19304
        sb.append("null");
19305
      } else {
19306
        sb.append(this.ex);
19307
      }
19308
      first = false;
19309
      sb.append(")");
19310
      return sb.toString();
19311
    }
19312
 
19313
    public void validate() throws TException {
19314
      // check for required fields
19315
    }
19316
 
19317
  }
19318
 
19319
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
19320
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
19321
 
19322
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
19323
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
19324
 
19325
    private long providerId;
19326
    private Map<String,String> returnedOrders;
19327
 
19328
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19329
    public enum _Fields implements TFieldIdEnum {
19330
      PROVIDER_ID((short)1, "providerId"),
19331
      RETURNED_ORDERS((short)2, "returnedOrders");
19332
 
19333
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19334
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19335
 
19336
      static {
19337
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19338
          byId.put((int)field._thriftId, field);
19339
          byName.put(field.getFieldName(), field);
19340
        }
19341
      }
19342
 
19343
      /**
19344
       * Find the _Fields constant that matches fieldId, or null if its not found.
19345
       */
19346
      public static _Fields findByThriftId(int fieldId) {
19347
        return byId.get(fieldId);
19348
      }
19349
 
19350
      /**
19351
       * Find the _Fields constant that matches fieldId, throwing an exception
19352
       * if it is not found.
19353
       */
19354
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19355
        _Fields fields = findByThriftId(fieldId);
19356
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19357
        return fields;
19358
      }
19359
 
19360
      /**
19361
       * Find the _Fields constant that matches name, or null if its not found.
19362
       */
19363
      public static _Fields findByName(String name) {
19364
        return byName.get(name);
19365
      }
19366
 
19367
      private final short _thriftId;
19368
      private final String _fieldName;
19369
 
19370
      _Fields(short thriftId, String fieldName) {
19371
        _thriftId = thriftId;
19372
        _fieldName = fieldName;
19373
      }
19374
 
19375
      public short getThriftFieldId() {
19376
        return _thriftId;
19377
      }
19378
 
19379
      public String getFieldName() {
19380
        return _fieldName;
19381
      }
19382
    }
19383
 
19384
    // isset id assignments
19385
    private static final int __PROVIDERID_ISSET_ID = 0;
19386
    private BitSet __isset_bit_vector = new BitSet(1);
19387
 
19388
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19389
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
19390
          new FieldValueMetaData(TType.I64)));
19391
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
19392
          new MapMetaData(TType.MAP, 
19393
              new FieldValueMetaData(TType.STRING), 
19394
              new FieldValueMetaData(TType.STRING))));
19395
    }});
19396
 
19397
    static {
19398
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
19399
    }
19400
 
19401
    public markOrdersAsFailed_args() {
19402
    }
19403
 
19404
    public markOrdersAsFailed_args(
19405
      long providerId,
19406
      Map<String,String> returnedOrders)
19407
    {
19408
      this();
19409
      this.providerId = providerId;
19410
      setProviderIdIsSet(true);
19411
      this.returnedOrders = returnedOrders;
19412
    }
19413
 
19414
    /**
19415
     * Performs a deep copy on <i>other</i>.
19416
     */
19417
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
19418
      __isset_bit_vector.clear();
19419
      __isset_bit_vector.or(other.__isset_bit_vector);
19420
      this.providerId = other.providerId;
19421
      if (other.isSetReturnedOrders()) {
19422
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
19423
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
19424
 
19425
          String other_element_key = other_element.getKey();
19426
          String other_element_value = other_element.getValue();
19427
 
19428
          String __this__returnedOrders_copy_key = other_element_key;
19429
 
19430
          String __this__returnedOrders_copy_value = other_element_value;
19431
 
19432
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
19433
        }
19434
        this.returnedOrders = __this__returnedOrders;
19435
      }
19436
    }
19437
 
19438
    public markOrdersAsFailed_args deepCopy() {
19439
      return new markOrdersAsFailed_args(this);
19440
    }
19441
 
19442
    @Deprecated
19443
    public markOrdersAsFailed_args clone() {
19444
      return new markOrdersAsFailed_args(this);
19445
    }
19446
 
19447
    public long getProviderId() {
19448
      return this.providerId;
19449
    }
19450
 
19451
    public markOrdersAsFailed_args setProviderId(long providerId) {
19452
      this.providerId = providerId;
19453
      setProviderIdIsSet(true);
19454
      return this;
19455
    }
19456
 
19457
    public void unsetProviderId() {
19458
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
19459
    }
19460
 
19461
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
19462
    public boolean isSetProviderId() {
19463
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
19464
    }
19465
 
19466
    public void setProviderIdIsSet(boolean value) {
19467
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
19468
    }
19469
 
19470
    public int getReturnedOrdersSize() {
19471
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
19472
    }
19473
 
19474
    public void putToReturnedOrders(String key, String val) {
19475
      if (this.returnedOrders == null) {
19476
        this.returnedOrders = new HashMap<String,String>();
19477
      }
19478
      this.returnedOrders.put(key, val);
19479
    }
19480
 
19481
    public Map<String,String> getReturnedOrders() {
19482
      return this.returnedOrders;
19483
    }
19484
 
19485
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
19486
      this.returnedOrders = returnedOrders;
19487
      return this;
19488
    }
19489
 
19490
    public void unsetReturnedOrders() {
19491
      this.returnedOrders = null;
19492
    }
19493
 
19494
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
19495
    public boolean isSetReturnedOrders() {
19496
      return this.returnedOrders != null;
19497
    }
19498
 
19499
    public void setReturnedOrdersIsSet(boolean value) {
19500
      if (!value) {
19501
        this.returnedOrders = null;
19502
      }
19503
    }
19504
 
19505
    public void setFieldValue(_Fields field, Object value) {
19506
      switch (field) {
19507
      case PROVIDER_ID:
19508
        if (value == null) {
19509
          unsetProviderId();
19510
        } else {
19511
          setProviderId((Long)value);
19512
        }
19513
        break;
19514
 
19515
      case RETURNED_ORDERS:
19516
        if (value == null) {
19517
          unsetReturnedOrders();
19518
        } else {
19519
          setReturnedOrders((Map<String,String>)value);
19520
        }
19521
        break;
19522
 
19523
      }
19524
    }
19525
 
19526
    public void setFieldValue(int fieldID, Object value) {
19527
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19528
    }
19529
 
19530
    public Object getFieldValue(_Fields field) {
19531
      switch (field) {
19532
      case PROVIDER_ID:
19533
        return new Long(getProviderId());
19534
 
19535
      case RETURNED_ORDERS:
19536
        return getReturnedOrders();
19537
 
19538
      }
19539
      throw new IllegalStateException();
19540
    }
19541
 
19542
    public Object getFieldValue(int fieldId) {
19543
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19544
    }
19545
 
19546
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19547
    public boolean isSet(_Fields field) {
19548
      switch (field) {
19549
      case PROVIDER_ID:
19550
        return isSetProviderId();
19551
      case RETURNED_ORDERS:
19552
        return isSetReturnedOrders();
19553
      }
19554
      throw new IllegalStateException();
19555
    }
19556
 
19557
    public boolean isSet(int fieldID) {
19558
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19559
    }
19560
 
19561
    @Override
19562
    public boolean equals(Object that) {
19563
      if (that == null)
19564
        return false;
19565
      if (that instanceof markOrdersAsFailed_args)
19566
        return this.equals((markOrdersAsFailed_args)that);
19567
      return false;
19568
    }
19569
 
19570
    public boolean equals(markOrdersAsFailed_args that) {
19571
      if (that == null)
19572
        return false;
19573
 
19574
      boolean this_present_providerId = true;
19575
      boolean that_present_providerId = true;
19576
      if (this_present_providerId || that_present_providerId) {
19577
        if (!(this_present_providerId && that_present_providerId))
19578
          return false;
19579
        if (this.providerId != that.providerId)
19580
          return false;
19581
      }
19582
 
19583
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
19584
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
19585
      if (this_present_returnedOrders || that_present_returnedOrders) {
19586
        if (!(this_present_returnedOrders && that_present_returnedOrders))
19587
          return false;
19588
        if (!this.returnedOrders.equals(that.returnedOrders))
19589
          return false;
19590
      }
19591
 
19592
      return true;
19593
    }
19594
 
19595
    @Override
19596
    public int hashCode() {
19597
      return 0;
19598
    }
19599
 
19600
    public void read(TProtocol iprot) throws TException {
19601
      TField field;
19602
      iprot.readStructBegin();
19603
      while (true)
19604
      {
19605
        field = iprot.readFieldBegin();
19606
        if (field.type == TType.STOP) { 
19607
          break;
19608
        }
19609
        _Fields fieldId = _Fields.findByThriftId(field.id);
19610
        if (fieldId == null) {
19611
          TProtocolUtil.skip(iprot, field.type);
19612
        } else {
19613
          switch (fieldId) {
19614
            case PROVIDER_ID:
19615
              if (field.type == TType.I64) {
19616
                this.providerId = iprot.readI64();
19617
                setProviderIdIsSet(true);
19618
              } else { 
19619
                TProtocolUtil.skip(iprot, field.type);
19620
              }
19621
              break;
19622
            case RETURNED_ORDERS:
19623
              if (field.type == TType.MAP) {
19624
                {
1221 chandransh 19625
                  TMap _map54 = iprot.readMapBegin();
19626
                  this.returnedOrders = new HashMap<String,String>(2*_map54.size);
19627
                  for (int _i55 = 0; _i55 < _map54.size; ++_i55)
1133 chandransh 19628
                  {
1221 chandransh 19629
                    String _key56;
19630
                    String _val57;
19631
                    _key56 = iprot.readString();
19632
                    _val57 = iprot.readString();
19633
                    this.returnedOrders.put(_key56, _val57);
1133 chandransh 19634
                  }
19635
                  iprot.readMapEnd();
19636
                }
19637
              } else { 
19638
                TProtocolUtil.skip(iprot, field.type);
19639
              }
19640
              break;
19641
          }
19642
          iprot.readFieldEnd();
19643
        }
19644
      }
19645
      iprot.readStructEnd();
19646
      validate();
19647
    }
19648
 
19649
    public void write(TProtocol oprot) throws TException {
19650
      validate();
19651
 
19652
      oprot.writeStructBegin(STRUCT_DESC);
19653
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
19654
      oprot.writeI64(this.providerId);
19655
      oprot.writeFieldEnd();
19656
      if (this.returnedOrders != null) {
19657
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
19658
        {
19659
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1221 chandransh 19660
          for (Map.Entry<String, String> _iter58 : this.returnedOrders.entrySet())
1133 chandransh 19661
          {
1221 chandransh 19662
            oprot.writeString(_iter58.getKey());
19663
            oprot.writeString(_iter58.getValue());
1133 chandransh 19664
          }
19665
          oprot.writeMapEnd();
19666
        }
19667
        oprot.writeFieldEnd();
19668
      }
19669
      oprot.writeFieldStop();
19670
      oprot.writeStructEnd();
19671
    }
19672
 
19673
    @Override
19674
    public String toString() {
19675
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
19676
      boolean first = true;
19677
 
19678
      sb.append("providerId:");
19679
      sb.append(this.providerId);
19680
      first = false;
19681
      if (!first) sb.append(", ");
19682
      sb.append("returnedOrders:");
19683
      if (this.returnedOrders == null) {
19684
        sb.append("null");
19685
      } else {
19686
        sb.append(this.returnedOrders);
19687
      }
19688
      first = false;
19689
      sb.append(")");
19690
      return sb.toString();
19691
    }
19692
 
19693
    public void validate() throws TException {
19694
      // check for required fields
19695
    }
19696
 
19697
  }
19698
 
19699
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
19700
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
19701
 
19702
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19703
 
19704
    private TransactionServiceException ex;
19705
 
19706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19707
    public enum _Fields implements TFieldIdEnum {
19708
      EX((short)1, "ex");
19709
 
19710
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19711
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19712
 
19713
      static {
19714
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19715
          byId.put((int)field._thriftId, field);
19716
          byName.put(field.getFieldName(), field);
19717
        }
19718
      }
19719
 
19720
      /**
19721
       * Find the _Fields constant that matches fieldId, or null if its not found.
19722
       */
19723
      public static _Fields findByThriftId(int fieldId) {
19724
        return byId.get(fieldId);
19725
      }
19726
 
19727
      /**
19728
       * Find the _Fields constant that matches fieldId, throwing an exception
19729
       * if it is not found.
19730
       */
19731
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19732
        _Fields fields = findByThriftId(fieldId);
19733
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19734
        return fields;
19735
      }
19736
 
19737
      /**
19738
       * Find the _Fields constant that matches name, or null if its not found.
19739
       */
19740
      public static _Fields findByName(String name) {
19741
        return byName.get(name);
19742
      }
19743
 
19744
      private final short _thriftId;
19745
      private final String _fieldName;
19746
 
19747
      _Fields(short thriftId, String fieldName) {
19748
        _thriftId = thriftId;
19749
        _fieldName = fieldName;
19750
      }
19751
 
19752
      public short getThriftFieldId() {
19753
        return _thriftId;
19754
      }
19755
 
19756
      public String getFieldName() {
19757
        return _fieldName;
19758
      }
19759
    }
19760
 
19761
    // isset id assignments
19762
 
19763
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19764
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19765
          new FieldValueMetaData(TType.STRUCT)));
19766
    }});
19767
 
19768
    static {
19769
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
19770
    }
19771
 
19772
    public markOrdersAsFailed_result() {
19773
    }
19774
 
19775
    public markOrdersAsFailed_result(
19776
      TransactionServiceException ex)
19777
    {
19778
      this();
19779
      this.ex = ex;
19780
    }
19781
 
19782
    /**
19783
     * Performs a deep copy on <i>other</i>.
19784
     */
19785
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
19786
      if (other.isSetEx()) {
19787
        this.ex = new TransactionServiceException(other.ex);
19788
      }
19789
    }
19790
 
19791
    public markOrdersAsFailed_result deepCopy() {
19792
      return new markOrdersAsFailed_result(this);
19793
    }
19794
 
19795
    @Deprecated
19796
    public markOrdersAsFailed_result clone() {
19797
      return new markOrdersAsFailed_result(this);
19798
    }
19799
 
19800
    public TransactionServiceException getEx() {
19801
      return this.ex;
19802
    }
19803
 
19804
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
19805
      this.ex = ex;
19806
      return this;
19807
    }
19808
 
19809
    public void unsetEx() {
19810
      this.ex = null;
19811
    }
19812
 
19813
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19814
    public boolean isSetEx() {
19815
      return this.ex != null;
19816
    }
19817
 
19818
    public void setExIsSet(boolean value) {
19819
      if (!value) {
19820
        this.ex = null;
19821
      }
19822
    }
19823
 
19824
    public void setFieldValue(_Fields field, Object value) {
19825
      switch (field) {
19826
      case EX:
19827
        if (value == null) {
19828
          unsetEx();
19829
        } else {
19830
          setEx((TransactionServiceException)value);
19831
        }
19832
        break;
19833
 
19834
      }
19835
    }
19836
 
19837
    public void setFieldValue(int fieldID, Object value) {
19838
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19839
    }
19840
 
19841
    public Object getFieldValue(_Fields field) {
19842
      switch (field) {
19843
      case EX:
19844
        return getEx();
19845
 
19846
      }
19847
      throw new IllegalStateException();
19848
    }
19849
 
19850
    public Object getFieldValue(int fieldId) {
19851
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19852
    }
19853
 
19854
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19855
    public boolean isSet(_Fields field) {
19856
      switch (field) {
19857
      case EX:
19858
        return isSetEx();
19859
      }
19860
      throw new IllegalStateException();
19861
    }
19862
 
19863
    public boolean isSet(int fieldID) {
19864
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19865
    }
19866
 
19867
    @Override
19868
    public boolean equals(Object that) {
19869
      if (that == null)
19870
        return false;
19871
      if (that instanceof markOrdersAsFailed_result)
19872
        return this.equals((markOrdersAsFailed_result)that);
19873
      return false;
19874
    }
19875
 
19876
    public boolean equals(markOrdersAsFailed_result that) {
19877
      if (that == null)
19878
        return false;
19879
 
19880
      boolean this_present_ex = true && this.isSetEx();
19881
      boolean that_present_ex = true && that.isSetEx();
19882
      if (this_present_ex || that_present_ex) {
19883
        if (!(this_present_ex && that_present_ex))
19884
          return false;
19885
        if (!this.ex.equals(that.ex))
19886
          return false;
19887
      }
19888
 
19889
      return true;
19890
    }
19891
 
19892
    @Override
19893
    public int hashCode() {
19894
      return 0;
19895
    }
19896
 
19897
    public int compareTo(markOrdersAsFailed_result other) {
19898
      if (!getClass().equals(other.getClass())) {
19899
        return getClass().getName().compareTo(other.getClass().getName());
19900
      }
19901
 
19902
      int lastComparison = 0;
19903
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
19904
 
19905
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19906
      if (lastComparison != 0) {
19907
        return lastComparison;
19908
      }
19909
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19910
      if (lastComparison != 0) {
19911
        return lastComparison;
19912
      }
19913
      return 0;
19914
    }
19915
 
19916
    public void read(TProtocol iprot) throws TException {
19917
      TField field;
19918
      iprot.readStructBegin();
19919
      while (true)
19920
      {
19921
        field = iprot.readFieldBegin();
19922
        if (field.type == TType.STOP) { 
19923
          break;
19924
        }
19925
        _Fields fieldId = _Fields.findByThriftId(field.id);
19926
        if (fieldId == null) {
19927
          TProtocolUtil.skip(iprot, field.type);
19928
        } else {
19929
          switch (fieldId) {
19930
            case EX:
19931
              if (field.type == TType.STRUCT) {
19932
                this.ex = new TransactionServiceException();
19933
                this.ex.read(iprot);
19934
              } else { 
19935
                TProtocolUtil.skip(iprot, field.type);
19936
              }
19937
              break;
19938
          }
19939
          iprot.readFieldEnd();
19940
        }
19941
      }
19942
      iprot.readStructEnd();
19943
      validate();
19944
    }
19945
 
19946
    public void write(TProtocol oprot) throws TException {
19947
      oprot.writeStructBegin(STRUCT_DESC);
19948
 
19949
      if (this.isSetEx()) {
19950
        oprot.writeFieldBegin(EX_FIELD_DESC);
19951
        this.ex.write(oprot);
19952
        oprot.writeFieldEnd();
19953
      }
19954
      oprot.writeFieldStop();
19955
      oprot.writeStructEnd();
19956
    }
19957
 
19958
    @Override
19959
    public String toString() {
19960
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
19961
      boolean first = true;
19962
 
19963
      sb.append("ex:");
19964
      if (this.ex == null) {
19965
        sb.append("null");
19966
      } else {
19967
        sb.append(this.ex);
19968
      }
19969
      first = false;
19970
      sb.append(")");
19971
      return sb.toString();
19972
    }
19973
 
19974
    public void validate() throws TException {
19975
      // check for required fields
19976
    }
19977
 
19978
  }
19979
 
305 ashish 19980
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
19981
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
19982
 
483 rajveer 19983
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 19984
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
19985
 
483 rajveer 19986
    private long orderId;
305 ashish 19987
    private boolean valid;
19988
 
19989
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19990
    public enum _Fields implements TFieldIdEnum {
483 rajveer 19991
      ORDER_ID((short)1, "orderId"),
305 ashish 19992
      VALID((short)2, "valid");
19993
 
19994
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19995
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19996
 
19997
      static {
19998
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19999
          byId.put((int)field._thriftId, field);
20000
          byName.put(field.getFieldName(), field);
20001
        }
20002
      }
20003
 
20004
      /**
20005
       * Find the _Fields constant that matches fieldId, or null if its not found.
20006
       */
20007
      public static _Fields findByThriftId(int fieldId) {
20008
        return byId.get(fieldId);
20009
      }
20010
 
20011
      /**
20012
       * Find the _Fields constant that matches fieldId, throwing an exception
20013
       * if it is not found.
20014
       */
20015
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20016
        _Fields fields = findByThriftId(fieldId);
20017
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20018
        return fields;
20019
      }
20020
 
20021
      /**
20022
       * Find the _Fields constant that matches name, or null if its not found.
20023
       */
20024
      public static _Fields findByName(String name) {
20025
        return byName.get(name);
20026
      }
20027
 
20028
      private final short _thriftId;
20029
      private final String _fieldName;
20030
 
20031
      _Fields(short thriftId, String fieldName) {
20032
        _thriftId = thriftId;
20033
        _fieldName = fieldName;
20034
      }
20035
 
20036
      public short getThriftFieldId() {
20037
        return _thriftId;
20038
      }
20039
 
20040
      public String getFieldName() {
20041
        return _fieldName;
20042
      }
20043
    }
20044
 
20045
    // isset id assignments
483 rajveer 20046
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 20047
    private static final int __VALID_ISSET_ID = 1;
20048
    private BitSet __isset_bit_vector = new BitSet(2);
20049
 
20050
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 20051
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 20052
          new FieldValueMetaData(TType.I64)));
20053
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
20054
          new FieldValueMetaData(TType.BOOL)));
20055
    }});
20056
 
20057
    static {
20058
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
20059
    }
20060
 
20061
    public getAlerts_args() {
20062
    }
20063
 
20064
    public getAlerts_args(
483 rajveer 20065
      long orderId,
305 ashish 20066
      boolean valid)
20067
    {
20068
      this();
483 rajveer 20069
      this.orderId = orderId;
20070
      setOrderIdIsSet(true);
305 ashish 20071
      this.valid = valid;
20072
      setValidIsSet(true);
20073
    }
20074
 
20075
    /**
20076
     * Performs a deep copy on <i>other</i>.
20077
     */
20078
    public getAlerts_args(getAlerts_args other) {
20079
      __isset_bit_vector.clear();
20080
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 20081
      this.orderId = other.orderId;
305 ashish 20082
      this.valid = other.valid;
20083
    }
20084
 
20085
    public getAlerts_args deepCopy() {
20086
      return new getAlerts_args(this);
20087
    }
20088
 
20089
    @Deprecated
20090
    public getAlerts_args clone() {
20091
      return new getAlerts_args(this);
20092
    }
20093
 
483 rajveer 20094
    public long getOrderId() {
20095
      return this.orderId;
305 ashish 20096
    }
20097
 
483 rajveer 20098
    public getAlerts_args setOrderId(long orderId) {
20099
      this.orderId = orderId;
20100
      setOrderIdIsSet(true);
305 ashish 20101
      return this;
20102
    }
20103
 
483 rajveer 20104
    public void unsetOrderId() {
20105
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 20106
    }
20107
 
483 rajveer 20108
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20109
    public boolean isSetOrderId() {
20110
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 20111
    }
20112
 
483 rajveer 20113
    public void setOrderIdIsSet(boolean value) {
20114
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 20115
    }
20116
 
20117
    public boolean isValid() {
20118
      return this.valid;
20119
    }
20120
 
20121
    public getAlerts_args setValid(boolean valid) {
20122
      this.valid = valid;
20123
      setValidIsSet(true);
20124
      return this;
20125
    }
20126
 
20127
    public void unsetValid() {
20128
      __isset_bit_vector.clear(__VALID_ISSET_ID);
20129
    }
20130
 
20131
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
20132
    public boolean isSetValid() {
20133
      return __isset_bit_vector.get(__VALID_ISSET_ID);
20134
    }
20135
 
20136
    public void setValidIsSet(boolean value) {
20137
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
20138
    }
20139
 
20140
    public void setFieldValue(_Fields field, Object value) {
20141
      switch (field) {
483 rajveer 20142
      case ORDER_ID:
305 ashish 20143
        if (value == null) {
483 rajveer 20144
          unsetOrderId();
305 ashish 20145
        } else {
483 rajveer 20146
          setOrderId((Long)value);
305 ashish 20147
        }
20148
        break;
20149
 
20150
      case VALID:
20151
        if (value == null) {
20152
          unsetValid();
20153
        } else {
20154
          setValid((Boolean)value);
20155
        }
20156
        break;
20157
 
20158
      }
20159
    }
20160
 
20161
    public void setFieldValue(int fieldID, Object value) {
20162
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20163
    }
20164
 
20165
    public Object getFieldValue(_Fields field) {
20166
      switch (field) {
483 rajveer 20167
      case ORDER_ID:
20168
        return new Long(getOrderId());
305 ashish 20169
 
20170
      case VALID:
20171
        return new Boolean(isValid());
20172
 
20173
      }
20174
      throw new IllegalStateException();
20175
    }
20176
 
20177
    public Object getFieldValue(int fieldId) {
20178
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20179
    }
20180
 
20181
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20182
    public boolean isSet(_Fields field) {
20183
      switch (field) {
483 rajveer 20184
      case ORDER_ID:
20185
        return isSetOrderId();
305 ashish 20186
      case VALID:
20187
        return isSetValid();
20188
      }
20189
      throw new IllegalStateException();
20190
    }
20191
 
20192
    public boolean isSet(int fieldID) {
20193
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20194
    }
20195
 
20196
    @Override
20197
    public boolean equals(Object that) {
20198
      if (that == null)
20199
        return false;
20200
      if (that instanceof getAlerts_args)
20201
        return this.equals((getAlerts_args)that);
20202
      return false;
20203
    }
20204
 
20205
    public boolean equals(getAlerts_args that) {
20206
      if (that == null)
20207
        return false;
20208
 
483 rajveer 20209
      boolean this_present_orderId = true;
20210
      boolean that_present_orderId = true;
20211
      if (this_present_orderId || that_present_orderId) {
20212
        if (!(this_present_orderId && that_present_orderId))
305 ashish 20213
          return false;
483 rajveer 20214
        if (this.orderId != that.orderId)
305 ashish 20215
          return false;
20216
      }
20217
 
20218
      boolean this_present_valid = true;
20219
      boolean that_present_valid = true;
20220
      if (this_present_valid || that_present_valid) {
20221
        if (!(this_present_valid && that_present_valid))
20222
          return false;
20223
        if (this.valid != that.valid)
20224
          return false;
20225
      }
20226
 
20227
      return true;
20228
    }
20229
 
20230
    @Override
20231
    public int hashCode() {
20232
      return 0;
20233
    }
20234
 
20235
    public int compareTo(getAlerts_args other) {
20236
      if (!getClass().equals(other.getClass())) {
20237
        return getClass().getName().compareTo(other.getClass().getName());
20238
      }
20239
 
20240
      int lastComparison = 0;
20241
      getAlerts_args typedOther = (getAlerts_args)other;
20242
 
483 rajveer 20243
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 20244
      if (lastComparison != 0) {
20245
        return lastComparison;
20246
      }
483 rajveer 20247
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 20248
      if (lastComparison != 0) {
20249
        return lastComparison;
20250
      }
20251
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
20252
      if (lastComparison != 0) {
20253
        return lastComparison;
20254
      }
20255
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
20256
      if (lastComparison != 0) {
20257
        return lastComparison;
20258
      }
20259
      return 0;
20260
    }
20261
 
20262
    public void read(TProtocol iprot) throws TException {
20263
      TField field;
20264
      iprot.readStructBegin();
20265
      while (true)
20266
      {
20267
        field = iprot.readFieldBegin();
20268
        if (field.type == TType.STOP) { 
20269
          break;
20270
        }
20271
        _Fields fieldId = _Fields.findByThriftId(field.id);
20272
        if (fieldId == null) {
20273
          TProtocolUtil.skip(iprot, field.type);
20274
        } else {
20275
          switch (fieldId) {
483 rajveer 20276
            case ORDER_ID:
305 ashish 20277
              if (field.type == TType.I64) {
483 rajveer 20278
                this.orderId = iprot.readI64();
20279
                setOrderIdIsSet(true);
305 ashish 20280
              } else { 
20281
                TProtocolUtil.skip(iprot, field.type);
20282
              }
20283
              break;
20284
            case VALID:
20285
              if (field.type == TType.BOOL) {
20286
                this.valid = iprot.readBool();
20287
                setValidIsSet(true);
20288
              } else { 
20289
                TProtocolUtil.skip(iprot, field.type);
20290
              }
20291
              break;
20292
          }
20293
          iprot.readFieldEnd();
20294
        }
20295
      }
20296
      iprot.readStructEnd();
20297
      validate();
20298
    }
20299
 
20300
    public void write(TProtocol oprot) throws TException {
20301
      validate();
20302
 
20303
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 20304
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20305
      oprot.writeI64(this.orderId);
305 ashish 20306
      oprot.writeFieldEnd();
20307
      oprot.writeFieldBegin(VALID_FIELD_DESC);
20308
      oprot.writeBool(this.valid);
20309
      oprot.writeFieldEnd();
20310
      oprot.writeFieldStop();
20311
      oprot.writeStructEnd();
20312
    }
20313
 
20314
    @Override
20315
    public String toString() {
20316
      StringBuilder sb = new StringBuilder("getAlerts_args(");
20317
      boolean first = true;
20318
 
483 rajveer 20319
      sb.append("orderId:");
20320
      sb.append(this.orderId);
305 ashish 20321
      first = false;
20322
      if (!first) sb.append(", ");
20323
      sb.append("valid:");
20324
      sb.append(this.valid);
20325
      first = false;
20326
      sb.append(")");
20327
      return sb.toString();
20328
    }
20329
 
20330
    public void validate() throws TException {
20331
      // check for required fields
20332
    }
20333
 
20334
  }
20335
 
20336
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
20337
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
20338
 
20339
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20340
 
20341
    private List<Alert> success;
20342
 
20343
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20344
    public enum _Fields implements TFieldIdEnum {
20345
      SUCCESS((short)0, "success");
20346
 
20347
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20348
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20349
 
20350
      static {
20351
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20352
          byId.put((int)field._thriftId, field);
20353
          byName.put(field.getFieldName(), field);
20354
        }
20355
      }
20356
 
20357
      /**
20358
       * Find the _Fields constant that matches fieldId, or null if its not found.
20359
       */
20360
      public static _Fields findByThriftId(int fieldId) {
20361
        return byId.get(fieldId);
20362
      }
20363
 
20364
      /**
20365
       * Find the _Fields constant that matches fieldId, throwing an exception
20366
       * if it is not found.
20367
       */
20368
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20369
        _Fields fields = findByThriftId(fieldId);
20370
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20371
        return fields;
20372
      }
20373
 
20374
      /**
20375
       * Find the _Fields constant that matches name, or null if its not found.
20376
       */
20377
      public static _Fields findByName(String name) {
20378
        return byName.get(name);
20379
      }
20380
 
20381
      private final short _thriftId;
20382
      private final String _fieldName;
20383
 
20384
      _Fields(short thriftId, String fieldName) {
20385
        _thriftId = thriftId;
20386
        _fieldName = fieldName;
20387
      }
20388
 
20389
      public short getThriftFieldId() {
20390
        return _thriftId;
20391
      }
20392
 
20393
      public String getFieldName() {
20394
        return _fieldName;
20395
      }
20396
    }
20397
 
20398
    // isset id assignments
20399
 
20400
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20401
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20402
          new ListMetaData(TType.LIST, 
20403
              new StructMetaData(TType.STRUCT, Alert.class))));
20404
    }});
20405
 
20406
    static {
20407
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
20408
    }
20409
 
20410
    public getAlerts_result() {
20411
    }
20412
 
20413
    public getAlerts_result(
20414
      List<Alert> success)
20415
    {
20416
      this();
20417
      this.success = success;
20418
    }
20419
 
20420
    /**
20421
     * Performs a deep copy on <i>other</i>.
20422
     */
20423
    public getAlerts_result(getAlerts_result other) {
20424
      if (other.isSetSuccess()) {
20425
        List<Alert> __this__success = new ArrayList<Alert>();
20426
        for (Alert other_element : other.success) {
20427
          __this__success.add(new Alert(other_element));
20428
        }
20429
        this.success = __this__success;
20430
      }
20431
    }
20432
 
20433
    public getAlerts_result deepCopy() {
20434
      return new getAlerts_result(this);
20435
    }
20436
 
20437
    @Deprecated
20438
    public getAlerts_result clone() {
20439
      return new getAlerts_result(this);
20440
    }
20441
 
20442
    public int getSuccessSize() {
20443
      return (this.success == null) ? 0 : this.success.size();
20444
    }
20445
 
20446
    public java.util.Iterator<Alert> getSuccessIterator() {
20447
      return (this.success == null) ? null : this.success.iterator();
20448
    }
20449
 
20450
    public void addToSuccess(Alert elem) {
20451
      if (this.success == null) {
20452
        this.success = new ArrayList<Alert>();
20453
      }
20454
      this.success.add(elem);
20455
    }
20456
 
20457
    public List<Alert> getSuccess() {
20458
      return this.success;
20459
    }
20460
 
20461
    public getAlerts_result setSuccess(List<Alert> success) {
20462
      this.success = success;
20463
      return this;
20464
    }
20465
 
20466
    public void unsetSuccess() {
20467
      this.success = null;
20468
    }
20469
 
20470
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20471
    public boolean isSetSuccess() {
20472
      return this.success != null;
20473
    }
20474
 
20475
    public void setSuccessIsSet(boolean value) {
20476
      if (!value) {
20477
        this.success = null;
20478
      }
20479
    }
20480
 
20481
    public void setFieldValue(_Fields field, Object value) {
20482
      switch (field) {
20483
      case SUCCESS:
20484
        if (value == null) {
20485
          unsetSuccess();
20486
        } else {
20487
          setSuccess((List<Alert>)value);
20488
        }
20489
        break;
20490
 
20491
      }
20492
    }
20493
 
20494
    public void setFieldValue(int fieldID, Object value) {
20495
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20496
    }
20497
 
20498
    public Object getFieldValue(_Fields field) {
20499
      switch (field) {
20500
      case SUCCESS:
20501
        return getSuccess();
20502
 
20503
      }
20504
      throw new IllegalStateException();
20505
    }
20506
 
20507
    public Object getFieldValue(int fieldId) {
20508
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20509
    }
20510
 
20511
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20512
    public boolean isSet(_Fields field) {
20513
      switch (field) {
20514
      case SUCCESS:
20515
        return isSetSuccess();
20516
      }
20517
      throw new IllegalStateException();
20518
    }
20519
 
20520
    public boolean isSet(int fieldID) {
20521
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20522
    }
20523
 
20524
    @Override
20525
    public boolean equals(Object that) {
20526
      if (that == null)
20527
        return false;
20528
      if (that instanceof getAlerts_result)
20529
        return this.equals((getAlerts_result)that);
20530
      return false;
20531
    }
20532
 
20533
    public boolean equals(getAlerts_result that) {
20534
      if (that == null)
20535
        return false;
20536
 
20537
      boolean this_present_success = true && this.isSetSuccess();
20538
      boolean that_present_success = true && that.isSetSuccess();
20539
      if (this_present_success || that_present_success) {
20540
        if (!(this_present_success && that_present_success))
20541
          return false;
20542
        if (!this.success.equals(that.success))
20543
          return false;
20544
      }
20545
 
20546
      return true;
20547
    }
20548
 
20549
    @Override
20550
    public int hashCode() {
20551
      return 0;
20552
    }
20553
 
20554
    public int compareTo(getAlerts_result other) {
20555
      if (!getClass().equals(other.getClass())) {
20556
        return getClass().getName().compareTo(other.getClass().getName());
20557
      }
20558
 
20559
      int lastComparison = 0;
20560
      getAlerts_result typedOther = (getAlerts_result)other;
20561
 
20562
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20563
      if (lastComparison != 0) {
20564
        return lastComparison;
20565
      }
20566
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20567
      if (lastComparison != 0) {
20568
        return lastComparison;
20569
      }
20570
      return 0;
20571
    }
20572
 
20573
    public void read(TProtocol iprot) throws TException {
20574
      TField field;
20575
      iprot.readStructBegin();
20576
      while (true)
20577
      {
20578
        field = iprot.readFieldBegin();
20579
        if (field.type == TType.STOP) { 
20580
          break;
20581
        }
20582
        _Fields fieldId = _Fields.findByThriftId(field.id);
20583
        if (fieldId == null) {
20584
          TProtocolUtil.skip(iprot, field.type);
20585
        } else {
20586
          switch (fieldId) {
20587
            case SUCCESS:
20588
              if (field.type == TType.LIST) {
20589
                {
1221 chandransh 20590
                  TList _list59 = iprot.readListBegin();
20591
                  this.success = new ArrayList<Alert>(_list59.size);
20592
                  for (int _i60 = 0; _i60 < _list59.size; ++_i60)
305 ashish 20593
                  {
1221 chandransh 20594
                    Alert _elem61;
20595
                    _elem61 = new Alert();
20596
                    _elem61.read(iprot);
20597
                    this.success.add(_elem61);
305 ashish 20598
                  }
20599
                  iprot.readListEnd();
20600
                }
20601
              } else { 
20602
                TProtocolUtil.skip(iprot, field.type);
20603
              }
20604
              break;
20605
          }
20606
          iprot.readFieldEnd();
20607
        }
20608
      }
20609
      iprot.readStructEnd();
20610
      validate();
20611
    }
20612
 
20613
    public void write(TProtocol oprot) throws TException {
20614
      oprot.writeStructBegin(STRUCT_DESC);
20615
 
20616
      if (this.isSetSuccess()) {
20617
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20618
        {
20619
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1221 chandransh 20620
          for (Alert _iter62 : this.success)
305 ashish 20621
          {
1221 chandransh 20622
            _iter62.write(oprot);
305 ashish 20623
          }
20624
          oprot.writeListEnd();
20625
        }
20626
        oprot.writeFieldEnd();
20627
      }
20628
      oprot.writeFieldStop();
20629
      oprot.writeStructEnd();
20630
    }
20631
 
20632
    @Override
20633
    public String toString() {
20634
      StringBuilder sb = new StringBuilder("getAlerts_result(");
20635
      boolean first = true;
20636
 
20637
      sb.append("success:");
20638
      if (this.success == null) {
20639
        sb.append("null");
20640
      } else {
20641
        sb.append(this.success);
20642
      }
20643
      first = false;
20644
      sb.append(")");
20645
      return sb.toString();
20646
    }
20647
 
20648
    public void validate() throws TException {
20649
      // check for required fields
20650
    }
20651
 
20652
  }
20653
 
20654
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
20655
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
20656
 
483 rajveer 20657
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 20658
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
20659
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
20660
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
20661
 
483 rajveer 20662
    private long orderId;
305 ashish 20663
    private boolean unset;
20664
    private long type;
20665
    private String comment;
20666
 
20667
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20668
    public enum _Fields implements TFieldIdEnum {
483 rajveer 20669
      ORDER_ID((short)1, "orderId"),
305 ashish 20670
      UNSET((short)2, "unset"),
20671
      TYPE((short)3, "type"),
20672
      COMMENT((short)4, "comment");
20673
 
20674
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20675
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20676
 
20677
      static {
20678
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20679
          byId.put((int)field._thriftId, field);
20680
          byName.put(field.getFieldName(), field);
20681
        }
20682
      }
20683
 
20684
      /**
20685
       * Find the _Fields constant that matches fieldId, or null if its not found.
20686
       */
20687
      public static _Fields findByThriftId(int fieldId) {
20688
        return byId.get(fieldId);
20689
      }
20690
 
20691
      /**
20692
       * Find the _Fields constant that matches fieldId, throwing an exception
20693
       * if it is not found.
20694
       */
20695
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20696
        _Fields fields = findByThriftId(fieldId);
20697
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20698
        return fields;
20699
      }
20700
 
20701
      /**
20702
       * Find the _Fields constant that matches name, or null if its not found.
20703
       */
20704
      public static _Fields findByName(String name) {
20705
        return byName.get(name);
20706
      }
20707
 
20708
      private final short _thriftId;
20709
      private final String _fieldName;
20710
 
20711
      _Fields(short thriftId, String fieldName) {
20712
        _thriftId = thriftId;
20713
        _fieldName = fieldName;
20714
      }
20715
 
20716
      public short getThriftFieldId() {
20717
        return _thriftId;
20718
      }
20719
 
20720
      public String getFieldName() {
20721
        return _fieldName;
20722
      }
20723
    }
20724
 
20725
    // isset id assignments
483 rajveer 20726
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 20727
    private static final int __UNSET_ISSET_ID = 1;
20728
    private static final int __TYPE_ISSET_ID = 2;
20729
    private BitSet __isset_bit_vector = new BitSet(3);
20730
 
20731
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 20732
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 20733
          new FieldValueMetaData(TType.I64)));
20734
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
20735
          new FieldValueMetaData(TType.BOOL)));
20736
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
20737
          new FieldValueMetaData(TType.I64)));
20738
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
20739
          new FieldValueMetaData(TType.STRING)));
20740
    }});
20741
 
20742
    static {
20743
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
20744
    }
20745
 
20746
    public setAlert_args() {
20747
    }
20748
 
20749
    public setAlert_args(
483 rajveer 20750
      long orderId,
305 ashish 20751
      boolean unset,
20752
      long type,
20753
      String comment)
20754
    {
20755
      this();
483 rajveer 20756
      this.orderId = orderId;
20757
      setOrderIdIsSet(true);
305 ashish 20758
      this.unset = unset;
20759
      setUnsetIsSet(true);
20760
      this.type = type;
20761
      setTypeIsSet(true);
20762
      this.comment = comment;
20763
    }
20764
 
20765
    /**
20766
     * Performs a deep copy on <i>other</i>.
20767
     */
20768
    public setAlert_args(setAlert_args other) {
20769
      __isset_bit_vector.clear();
20770
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 20771
      this.orderId = other.orderId;
305 ashish 20772
      this.unset = other.unset;
20773
      this.type = other.type;
20774
      if (other.isSetComment()) {
20775
        this.comment = other.comment;
20776
      }
20777
    }
20778
 
20779
    public setAlert_args deepCopy() {
20780
      return new setAlert_args(this);
20781
    }
20782
 
20783
    @Deprecated
20784
    public setAlert_args clone() {
20785
      return new setAlert_args(this);
20786
    }
20787
 
483 rajveer 20788
    public long getOrderId() {
20789
      return this.orderId;
305 ashish 20790
    }
20791
 
483 rajveer 20792
    public setAlert_args setOrderId(long orderId) {
20793
      this.orderId = orderId;
20794
      setOrderIdIsSet(true);
305 ashish 20795
      return this;
20796
    }
20797
 
483 rajveer 20798
    public void unsetOrderId() {
20799
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 20800
    }
20801
 
483 rajveer 20802
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20803
    public boolean isSetOrderId() {
20804
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 20805
    }
20806
 
483 rajveer 20807
    public void setOrderIdIsSet(boolean value) {
20808
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 20809
    }
20810
 
20811
    public boolean isUnset() {
20812
      return this.unset;
20813
    }
20814
 
20815
    public setAlert_args setUnset(boolean unset) {
20816
      this.unset = unset;
20817
      setUnsetIsSet(true);
20818
      return this;
20819
    }
20820
 
20821
    public void unsetUnset() {
20822
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
20823
    }
20824
 
20825
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
20826
    public boolean isSetUnset() {
20827
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
20828
    }
20829
 
20830
    public void setUnsetIsSet(boolean value) {
20831
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
20832
    }
20833
 
20834
    public long getType() {
20835
      return this.type;
20836
    }
20837
 
20838
    public setAlert_args setType(long type) {
20839
      this.type = type;
20840
      setTypeIsSet(true);
20841
      return this;
20842
    }
20843
 
20844
    public void unsetType() {
20845
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
20846
    }
20847
 
20848
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
20849
    public boolean isSetType() {
20850
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
20851
    }
20852
 
20853
    public void setTypeIsSet(boolean value) {
20854
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
20855
    }
20856
 
20857
    public String getComment() {
20858
      return this.comment;
20859
    }
20860
 
20861
    public setAlert_args setComment(String comment) {
20862
      this.comment = comment;
20863
      return this;
20864
    }
20865
 
20866
    public void unsetComment() {
20867
      this.comment = null;
20868
    }
20869
 
20870
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
20871
    public boolean isSetComment() {
20872
      return this.comment != null;
20873
    }
20874
 
20875
    public void setCommentIsSet(boolean value) {
20876
      if (!value) {
20877
        this.comment = null;
20878
      }
20879
    }
20880
 
20881
    public void setFieldValue(_Fields field, Object value) {
20882
      switch (field) {
483 rajveer 20883
      case ORDER_ID:
305 ashish 20884
        if (value == null) {
483 rajveer 20885
          unsetOrderId();
305 ashish 20886
        } else {
483 rajveer 20887
          setOrderId((Long)value);
305 ashish 20888
        }
20889
        break;
20890
 
20891
      case UNSET:
20892
        if (value == null) {
20893
          unsetUnset();
20894
        } else {
20895
          setUnset((Boolean)value);
20896
        }
20897
        break;
20898
 
20899
      case TYPE:
20900
        if (value == null) {
20901
          unsetType();
20902
        } else {
20903
          setType((Long)value);
20904
        }
20905
        break;
20906
 
20907
      case COMMENT:
20908
        if (value == null) {
20909
          unsetComment();
20910
        } else {
20911
          setComment((String)value);
20912
        }
20913
        break;
20914
 
20915
      }
20916
    }
20917
 
20918
    public void setFieldValue(int fieldID, Object value) {
20919
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20920
    }
20921
 
20922
    public Object getFieldValue(_Fields field) {
20923
      switch (field) {
483 rajveer 20924
      case ORDER_ID:
20925
        return new Long(getOrderId());
305 ashish 20926
 
20927
      case UNSET:
20928
        return new Boolean(isUnset());
20929
 
20930
      case TYPE:
20931
        return new Long(getType());
20932
 
20933
      case COMMENT:
20934
        return getComment();
20935
 
20936
      }
20937
      throw new IllegalStateException();
20938
    }
20939
 
20940
    public Object getFieldValue(int fieldId) {
20941
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20942
    }
20943
 
20944
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20945
    public boolean isSet(_Fields field) {
20946
      switch (field) {
483 rajveer 20947
      case ORDER_ID:
20948
        return isSetOrderId();
305 ashish 20949
      case UNSET:
20950
        return isSetUnset();
20951
      case TYPE:
20952
        return isSetType();
20953
      case COMMENT:
20954
        return isSetComment();
20955
      }
20956
      throw new IllegalStateException();
20957
    }
20958
 
20959
    public boolean isSet(int fieldID) {
20960
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20961
    }
20962
 
20963
    @Override
20964
    public boolean equals(Object that) {
20965
      if (that == null)
20966
        return false;
20967
      if (that instanceof setAlert_args)
20968
        return this.equals((setAlert_args)that);
20969
      return false;
20970
    }
20971
 
20972
    public boolean equals(setAlert_args that) {
20973
      if (that == null)
20974
        return false;
20975
 
483 rajveer 20976
      boolean this_present_orderId = true;
20977
      boolean that_present_orderId = true;
20978
      if (this_present_orderId || that_present_orderId) {
20979
        if (!(this_present_orderId && that_present_orderId))
305 ashish 20980
          return false;
483 rajveer 20981
        if (this.orderId != that.orderId)
305 ashish 20982
          return false;
20983
      }
20984
 
20985
      boolean this_present_unset = true;
20986
      boolean that_present_unset = true;
20987
      if (this_present_unset || that_present_unset) {
20988
        if (!(this_present_unset && that_present_unset))
20989
          return false;
20990
        if (this.unset != that.unset)
20991
          return false;
20992
      }
20993
 
20994
      boolean this_present_type = true;
20995
      boolean that_present_type = true;
20996
      if (this_present_type || that_present_type) {
20997
        if (!(this_present_type && that_present_type))
20998
          return false;
20999
        if (this.type != that.type)
21000
          return false;
21001
      }
21002
 
21003
      boolean this_present_comment = true && this.isSetComment();
21004
      boolean that_present_comment = true && that.isSetComment();
21005
      if (this_present_comment || that_present_comment) {
21006
        if (!(this_present_comment && that_present_comment))
21007
          return false;
21008
        if (!this.comment.equals(that.comment))
21009
          return false;
21010
      }
21011
 
21012
      return true;
21013
    }
21014
 
21015
    @Override
21016
    public int hashCode() {
21017
      return 0;
21018
    }
21019
 
21020
    public int compareTo(setAlert_args other) {
21021
      if (!getClass().equals(other.getClass())) {
21022
        return getClass().getName().compareTo(other.getClass().getName());
21023
      }
21024
 
21025
      int lastComparison = 0;
21026
      setAlert_args typedOther = (setAlert_args)other;
21027
 
483 rajveer 21028
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 21029
      if (lastComparison != 0) {
21030
        return lastComparison;
21031
      }
483 rajveer 21032
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 21033
      if (lastComparison != 0) {
21034
        return lastComparison;
21035
      }
21036
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
21037
      if (lastComparison != 0) {
21038
        return lastComparison;
21039
      }
21040
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
21041
      if (lastComparison != 0) {
21042
        return lastComparison;
21043
      }
21044
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
21045
      if (lastComparison != 0) {
21046
        return lastComparison;
21047
      }
21048
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
21049
      if (lastComparison != 0) {
21050
        return lastComparison;
21051
      }
21052
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
21053
      if (lastComparison != 0) {
21054
        return lastComparison;
21055
      }
21056
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
21057
      if (lastComparison != 0) {
21058
        return lastComparison;
21059
      }
21060
      return 0;
21061
    }
21062
 
21063
    public void read(TProtocol iprot) throws TException {
21064
      TField field;
21065
      iprot.readStructBegin();
21066
      while (true)
21067
      {
21068
        field = iprot.readFieldBegin();
21069
        if (field.type == TType.STOP) { 
21070
          break;
21071
        }
21072
        _Fields fieldId = _Fields.findByThriftId(field.id);
21073
        if (fieldId == null) {
21074
          TProtocolUtil.skip(iprot, field.type);
21075
        } else {
21076
          switch (fieldId) {
483 rajveer 21077
            case ORDER_ID:
305 ashish 21078
              if (field.type == TType.I64) {
483 rajveer 21079
                this.orderId = iprot.readI64();
21080
                setOrderIdIsSet(true);
305 ashish 21081
              } else { 
21082
                TProtocolUtil.skip(iprot, field.type);
21083
              }
21084
              break;
21085
            case UNSET:
21086
              if (field.type == TType.BOOL) {
21087
                this.unset = iprot.readBool();
21088
                setUnsetIsSet(true);
21089
              } else { 
21090
                TProtocolUtil.skip(iprot, field.type);
21091
              }
21092
              break;
21093
            case TYPE:
21094
              if (field.type == TType.I64) {
21095
                this.type = iprot.readI64();
21096
                setTypeIsSet(true);
21097
              } else { 
21098
                TProtocolUtil.skip(iprot, field.type);
21099
              }
21100
              break;
21101
            case COMMENT:
21102
              if (field.type == TType.STRING) {
21103
                this.comment = iprot.readString();
21104
              } else { 
21105
                TProtocolUtil.skip(iprot, field.type);
21106
              }
21107
              break;
21108
          }
21109
          iprot.readFieldEnd();
21110
        }
21111
      }
21112
      iprot.readStructEnd();
21113
      validate();
21114
    }
21115
 
21116
    public void write(TProtocol oprot) throws TException {
21117
      validate();
21118
 
21119
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 21120
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
21121
      oprot.writeI64(this.orderId);
305 ashish 21122
      oprot.writeFieldEnd();
21123
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
21124
      oprot.writeBool(this.unset);
21125
      oprot.writeFieldEnd();
21126
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
21127
      oprot.writeI64(this.type);
21128
      oprot.writeFieldEnd();
21129
      if (this.comment != null) {
21130
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
21131
        oprot.writeString(this.comment);
21132
        oprot.writeFieldEnd();
21133
      }
21134
      oprot.writeFieldStop();
21135
      oprot.writeStructEnd();
21136
    }
21137
 
21138
    @Override
21139
    public String toString() {
21140
      StringBuilder sb = new StringBuilder("setAlert_args(");
21141
      boolean first = true;
21142
 
483 rajveer 21143
      sb.append("orderId:");
21144
      sb.append(this.orderId);
305 ashish 21145
      first = false;
21146
      if (!first) sb.append(", ");
21147
      sb.append("unset:");
21148
      sb.append(this.unset);
21149
      first = false;
21150
      if (!first) sb.append(", ");
21151
      sb.append("type:");
21152
      sb.append(this.type);
21153
      first = false;
21154
      if (!first) sb.append(", ");
21155
      sb.append("comment:");
21156
      if (this.comment == null) {
21157
        sb.append("null");
21158
      } else {
21159
        sb.append(this.comment);
21160
      }
21161
      first = false;
21162
      sb.append(")");
21163
      return sb.toString();
21164
    }
21165
 
21166
    public void validate() throws TException {
21167
      // check for required fields
21168
    }
21169
 
21170
  }
21171
 
21172
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
21173
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
21174
 
21175
 
21176
 
21177
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21178
    public enum _Fields implements TFieldIdEnum {
21179
;
21180
 
21181
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21182
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21183
 
21184
      static {
21185
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21186
          byId.put((int)field._thriftId, field);
21187
          byName.put(field.getFieldName(), field);
21188
        }
21189
      }
21190
 
21191
      /**
21192
       * Find the _Fields constant that matches fieldId, or null if its not found.
21193
       */
21194
      public static _Fields findByThriftId(int fieldId) {
21195
        return byId.get(fieldId);
21196
      }
21197
 
21198
      /**
21199
       * Find the _Fields constant that matches fieldId, throwing an exception
21200
       * if it is not found.
21201
       */
21202
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21203
        _Fields fields = findByThriftId(fieldId);
21204
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21205
        return fields;
21206
      }
21207
 
21208
      /**
21209
       * Find the _Fields constant that matches name, or null if its not found.
21210
       */
21211
      public static _Fields findByName(String name) {
21212
        return byName.get(name);
21213
      }
21214
 
21215
      private final short _thriftId;
21216
      private final String _fieldName;
21217
 
21218
      _Fields(short thriftId, String fieldName) {
21219
        _thriftId = thriftId;
21220
        _fieldName = fieldName;
21221
      }
21222
 
21223
      public short getThriftFieldId() {
21224
        return _thriftId;
21225
      }
21226
 
21227
      public String getFieldName() {
21228
        return _fieldName;
21229
      }
21230
    }
21231
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21232
    }});
21233
 
21234
    static {
21235
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
21236
    }
21237
 
21238
    public setAlert_result() {
21239
    }
21240
 
21241
    /**
21242
     * Performs a deep copy on <i>other</i>.
21243
     */
21244
    public setAlert_result(setAlert_result other) {
21245
    }
21246
 
21247
    public setAlert_result deepCopy() {
21248
      return new setAlert_result(this);
21249
    }
21250
 
21251
    @Deprecated
21252
    public setAlert_result clone() {
21253
      return new setAlert_result(this);
21254
    }
21255
 
21256
    public void setFieldValue(_Fields field, Object value) {
21257
      switch (field) {
21258
      }
21259
    }
21260
 
21261
    public void setFieldValue(int fieldID, Object value) {
21262
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21263
    }
21264
 
21265
    public Object getFieldValue(_Fields field) {
21266
      switch (field) {
21267
      }
21268
      throw new IllegalStateException();
21269
    }
21270
 
21271
    public Object getFieldValue(int fieldId) {
21272
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21273
    }
21274
 
21275
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21276
    public boolean isSet(_Fields field) {
21277
      switch (field) {
21278
      }
21279
      throw new IllegalStateException();
21280
    }
21281
 
21282
    public boolean isSet(int fieldID) {
21283
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21284
    }
21285
 
21286
    @Override
21287
    public boolean equals(Object that) {
21288
      if (that == null)
21289
        return false;
21290
      if (that instanceof setAlert_result)
21291
        return this.equals((setAlert_result)that);
21292
      return false;
21293
    }
21294
 
21295
    public boolean equals(setAlert_result that) {
21296
      if (that == null)
21297
        return false;
21298
 
21299
      return true;
21300
    }
21301
 
21302
    @Override
21303
    public int hashCode() {
21304
      return 0;
21305
    }
21306
 
21307
    public int compareTo(setAlert_result other) {
21308
      if (!getClass().equals(other.getClass())) {
21309
        return getClass().getName().compareTo(other.getClass().getName());
21310
      }
21311
 
21312
      int lastComparison = 0;
21313
      setAlert_result typedOther = (setAlert_result)other;
21314
 
21315
      return 0;
21316
    }
21317
 
21318
    public void read(TProtocol iprot) throws TException {
21319
      TField field;
21320
      iprot.readStructBegin();
21321
      while (true)
21322
      {
21323
        field = iprot.readFieldBegin();
21324
        if (field.type == TType.STOP) { 
21325
          break;
21326
        }
21327
        _Fields fieldId = _Fields.findByThriftId(field.id);
21328
        if (fieldId == null) {
21329
          TProtocolUtil.skip(iprot, field.type);
21330
        } else {
21331
          switch (fieldId) {
21332
          }
21333
          iprot.readFieldEnd();
21334
        }
21335
      }
21336
      iprot.readStructEnd();
21337
      validate();
21338
    }
21339
 
21340
    public void write(TProtocol oprot) throws TException {
21341
      oprot.writeStructBegin(STRUCT_DESC);
21342
 
21343
      oprot.writeFieldStop();
21344
      oprot.writeStructEnd();
21345
    }
21346
 
21347
    @Override
21348
    public String toString() {
21349
      StringBuilder sb = new StringBuilder("setAlert_result(");
21350
      boolean first = true;
21351
 
21352
      sb.append(")");
21353
      return sb.toString();
21354
    }
21355
 
21356
    public void validate() throws TException {
21357
      // check for required fields
21358
    }
21359
 
21360
  }
21361
 
68 ashish 21362
}