Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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