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