Subversion Repositories SmartDukaan

Rev

Rev 4283 | Rev 4295 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4283 Rev 4285
Line 536... Line 536...
536
     * @param refundedBy
536
     * @param refundedBy
537
     * @param reason
537
     * @param reason
538
     */
538
     */
539
    public void refundTransaction(long transactionId, String refundedBy, String reason) throws TransactionServiceException, org.apache.thrift.TException;
539
    public void refundTransaction(long transactionId, String refundedBy, String reason) throws TransactionServiceException, org.apache.thrift.TException;
540
 
540
 
-
 
541
    /**
-
 
542
     * Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
-
 
543
     * given order is not a COD order, it also captures the payment if the same has not been captured.
-
 
544
     * 
-
 
545
     * @param itemId
-
 
546
     * @param inventory
-
 
547
     */
-
 
548
    public boolean acceptOrdersForItemId(long itemId, long inventory) throws TransactionServiceException, org.apache.thrift.TException;
-
 
549
 
541
  }
550
  }
542
 
551
 
543
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
552
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
544
 
553
 
545
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
554
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
Line 666... Line 675...
666
 
675
 
667
    public void markTransactionAsPaymentFlagRemoved(long transactionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markTransactionAsPaymentFlagRemoved_call> resultHandler) throws org.apache.thrift.TException;
676
    public void markTransactionAsPaymentFlagRemoved(long transactionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markTransactionAsPaymentFlagRemoved_call> resultHandler) throws org.apache.thrift.TException;
668
 
677
 
669
    public void refundTransaction(long transactionId, String refundedBy, String reason, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundTransaction_call> resultHandler) throws org.apache.thrift.TException;
678
    public void refundTransaction(long transactionId, String refundedBy, String reason, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundTransaction_call> resultHandler) throws org.apache.thrift.TException;
670
 
679
 
-
 
680
    public void acceptOrdersForItemId(long itemId, long inventory, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.acceptOrdersForItemId_call> resultHandler) throws org.apache.thrift.TException;
-
 
681
 
671
  }
682
  }
672
 
683
 
673
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
684
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
674
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
685
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
675
      public Factory() {}
686
      public Factory() {}
Line 2317... Line 2328...
2317
        throw result.ex;
2328
        throw result.ex;
2318
      }
2329
      }
2319
      return;
2330
      return;
2320
    }
2331
    }
2321
 
2332
 
-
 
2333
    public boolean acceptOrdersForItemId(long itemId, long inventory) throws TransactionServiceException, org.apache.thrift.TException
-
 
2334
    {
-
 
2335
      send_acceptOrdersForItemId(itemId, inventory);
-
 
2336
      return recv_acceptOrdersForItemId();
-
 
2337
    }
-
 
2338
 
-
 
2339
    public void send_acceptOrdersForItemId(long itemId, long inventory) throws org.apache.thrift.TException
-
 
2340
    {
-
 
2341
      acceptOrdersForItemId_args args = new acceptOrdersForItemId_args();
-
 
2342
      args.setItemId(itemId);
-
 
2343
      args.setInventory(inventory);
-
 
2344
      sendBase("acceptOrdersForItemId", args);
-
 
2345
    }
-
 
2346
 
-
 
2347
    public boolean recv_acceptOrdersForItemId() throws TransactionServiceException, org.apache.thrift.TException
-
 
2348
    {
-
 
2349
      acceptOrdersForItemId_result result = new acceptOrdersForItemId_result();
-
 
2350
      receiveBase(result, "acceptOrdersForItemId");
-
 
2351
      if (result.isSetSuccess()) {
-
 
2352
        return result.success;
-
 
2353
      }
-
 
2354
      if (result.ex != null) {
-
 
2355
        throw result.ex;
-
 
2356
      }
-
 
2357
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "acceptOrdersForItemId failed: unknown result");
-
 
2358
    }
-
 
2359
 
2322
  }
2360
  }
2323
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2361
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2324
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2362
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2325
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2363
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2326
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
2364
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 4531... Line 4569...
4531
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4569
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4532
        (new Client(prot)).recv_refundTransaction();
4570
        (new Client(prot)).recv_refundTransaction();
4533
      }
4571
      }
4534
    }
4572
    }
4535
 
4573
 
-
 
4574
    public void acceptOrdersForItemId(long itemId, long inventory, org.apache.thrift.async.AsyncMethodCallback<acceptOrdersForItemId_call> resultHandler) throws org.apache.thrift.TException {
-
 
4575
      checkReady();
-
 
4576
      acceptOrdersForItemId_call method_call = new acceptOrdersForItemId_call(itemId, inventory, resultHandler, this, ___protocolFactory, ___transport);
-
 
4577
      this.___currentMethod = method_call;
-
 
4578
      ___manager.call(method_call);
-
 
4579
    }
-
 
4580
 
-
 
4581
    public static class acceptOrdersForItemId_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
4582
      private long itemId;
-
 
4583
      private long inventory;
-
 
4584
      public acceptOrdersForItemId_call(long itemId, long inventory, org.apache.thrift.async.AsyncMethodCallback<acceptOrdersForItemId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
4585
        super(client, protocolFactory, transport, resultHandler, false);
-
 
4586
        this.itemId = itemId;
-
 
4587
        this.inventory = inventory;
-
 
4588
      }
-
 
4589
 
-
 
4590
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
4591
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("acceptOrdersForItemId", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
4592
        acceptOrdersForItemId_args args = new acceptOrdersForItemId_args();
-
 
4593
        args.setItemId(itemId);
-
 
4594
        args.setInventory(inventory);
-
 
4595
        args.write(prot);
-
 
4596
        prot.writeMessageEnd();
-
 
4597
      }
-
 
4598
 
-
 
4599
      public boolean getResult() throws TransactionServiceException, org.apache.thrift.TException {
-
 
4600
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
4601
          throw new IllegalStateException("Method call not finished!");
-
 
4602
        }
-
 
4603
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
4604
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
4605
        return (new Client(prot)).recv_acceptOrdersForItemId();
-
 
4606
      }
-
 
4607
    }
-
 
4608
 
4536
  }
4609
  }
4537
 
4610
 
4538
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
4611
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
4539
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
4612
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
4540
    public Processor(I iface) {
4613
    public Processor(I iface) {
Line 4607... Line 4680...
4607
      processMap.put("markOrderCancellationRequestReceived", new markOrderCancellationRequestReceived());
4680
      processMap.put("markOrderCancellationRequestReceived", new markOrderCancellationRequestReceived());
4608
      processMap.put("markOrderCancellationRequestConfirmed", new markOrderCancellationRequestConfirmed());
4681
      processMap.put("markOrderCancellationRequestConfirmed", new markOrderCancellationRequestConfirmed());
4609
      processMap.put("markOrderCancellationRequestDenied", new markOrderCancellationRequestDenied());
4682
      processMap.put("markOrderCancellationRequestDenied", new markOrderCancellationRequestDenied());
4610
      processMap.put("markTransactionAsPaymentFlagRemoved", new markTransactionAsPaymentFlagRemoved());
4683
      processMap.put("markTransactionAsPaymentFlagRemoved", new markTransactionAsPaymentFlagRemoved());
4611
      processMap.put("refundTransaction", new refundTransaction());
4684
      processMap.put("refundTransaction", new refundTransaction());
-
 
4685
      processMap.put("acceptOrdersForItemId", new acceptOrdersForItemId());
4612
      return processMap;
4686
      return processMap;
4613
    }
4687
    }
4614
 
4688
 
4615
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
4689
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
4616
      public createTransaction() {
4690
      public createTransaction() {
Line 5844... Line 5918...
5844
        }
5918
        }
5845
        return result;
5919
        return result;
5846
      }
5920
      }
5847
    }
5921
    }
5848
 
5922
 
-
 
5923
    private static class acceptOrdersForItemId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, acceptOrdersForItemId_args> {
-
 
5924
      public acceptOrdersForItemId() {
-
 
5925
        super("acceptOrdersForItemId");
-
 
5926
      }
-
 
5927
 
-
 
5928
      protected acceptOrdersForItemId_args getEmptyArgsInstance() {
-
 
5929
        return new acceptOrdersForItemId_args();
-
 
5930
      }
-
 
5931
 
-
 
5932
      protected acceptOrdersForItemId_result getResult(I iface, acceptOrdersForItemId_args args) throws org.apache.thrift.TException {
-
 
5933
        acceptOrdersForItemId_result result = new acceptOrdersForItemId_result();
-
 
5934
        try {
-
 
5935
          result.success = iface.acceptOrdersForItemId(args.itemId, args.inventory);
-
 
5936
          result.setSuccessIsSet(true);
-
 
5937
        } catch (TransactionServiceException ex) {
-
 
5938
          result.ex = ex;
-
 
5939
        }
-
 
5940
        return result;
-
 
5941
      }
-
 
5942
    }
-
 
5943
 
5849
  }
5944
  }
5850
 
5945
 
5851
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
5946
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
5852
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
5947
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
5853
 
5948
 
Line 26865... Line 26960...
26865
      }
26960
      }
26866
    }
26961
    }
26867
 
26962
 
26868
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
26963
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
26869
      try {
26964
      try {
26870
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
26871
        __isset_bit_vector = new BitSet(1);
-
 
26872
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
26965
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
26873
      } catch (org.apache.thrift.TException te) {
26966
      } catch (org.apache.thrift.TException te) {
26874
        throw new java.io.IOException(te);
26967
        throw new java.io.IOException(te);
26875
      }
26968
      }
26876
    }
26969
    }
Line 30193... Line 30286...
30193
      }
30286
      }
30194
    }
30287
    }
30195
 
30288
 
30196
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
30289
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
30197
      try {
30290
      try {
-
 
30291
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
30292
        __isset_bit_vector = new BitSet(1);
30198
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
30293
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
30199
      } catch (org.apache.thrift.TException te) {
30294
      } catch (org.apache.thrift.TException te) {
30200
        throw new java.io.IOException(te);
30295
        throw new java.io.IOException(te);
30201
      }
30296
      }
30202
    }
30297
    }
Line 52387... Line 52482...
52387
      }
52482
      }
52388
    }
52483
    }
52389
 
52484
 
52390
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
52485
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
52391
      try {
52486
      try {
52392
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
52393
        __isset_bit_vector = new BitSet(1);
-
 
52394
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
52487
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
52395
      } catch (org.apache.thrift.TException te) {
52488
      } catch (org.apache.thrift.TException te) {
52396
        throw new java.io.IOException(te);
52489
        throw new java.io.IOException(te);
52397
      }
52490
      }
52398
    }
52491
    }
Line 52663... Line 52756...
52663
      sb.append("ex:");
52756
      sb.append("ex:");
52664
      if (this.ex == null) {
52757
      if (this.ex == null) {
52665
        sb.append("null");
52758
        sb.append("null");
52666
      } else {
52759
      } else {
52667
        sb.append(this.ex);
52760
        sb.append(this.ex);
-
 
52761
      }
-
 
52762
      first = false;
-
 
52763
      sb.append(")");
-
 
52764
      return sb.toString();
-
 
52765
    }
-
 
52766
 
-
 
52767
    public void validate() throws org.apache.thrift.TException {
-
 
52768
      // check for required fields
-
 
52769
    }
-
 
52770
 
-
 
52771
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
52772
      try {
-
 
52773
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
52774
      } catch (org.apache.thrift.TException te) {
-
 
52775
        throw new java.io.IOException(te);
-
 
52776
      }
-
 
52777
    }
-
 
52778
 
-
 
52779
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
52780
      try {
-
 
52781
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
52782
      } catch (org.apache.thrift.TException te) {
-
 
52783
        throw new java.io.IOException(te);
-
 
52784
      }
-
 
52785
    }
-
 
52786
 
-
 
52787
  }
-
 
52788
 
-
 
52789
  public static class acceptOrdersForItemId_args implements org.apache.thrift.TBase<acceptOrdersForItemId_args, acceptOrdersForItemId_args._Fields>, java.io.Serializable, Cloneable   {
-
 
52790
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acceptOrdersForItemId_args");
-
 
52791
 
-
 
52792
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
52793
    private static final org.apache.thrift.protocol.TField INVENTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("inventory", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
52794
 
-
 
52795
    private long itemId; // required
-
 
52796
    private long inventory; // required
-
 
52797
 
-
 
52798
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
52799
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
52800
      ITEM_ID((short)1, "itemId"),
-
 
52801
      INVENTORY((short)2, "inventory");
-
 
52802
 
-
 
52803
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
52804
 
-
 
52805
      static {
-
 
52806
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
52807
          byName.put(field.getFieldName(), field);
-
 
52808
        }
-
 
52809
      }
-
 
52810
 
-
 
52811
      /**
-
 
52812
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
52813
       */
-
 
52814
      public static _Fields findByThriftId(int fieldId) {
-
 
52815
        switch(fieldId) {
-
 
52816
          case 1: // ITEM_ID
-
 
52817
            return ITEM_ID;
-
 
52818
          case 2: // INVENTORY
-
 
52819
            return INVENTORY;
-
 
52820
          default:
-
 
52821
            return null;
-
 
52822
        }
-
 
52823
      }
-
 
52824
 
-
 
52825
      /**
-
 
52826
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
52827
       * if it is not found.
-
 
52828
       */
-
 
52829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
52830
        _Fields fields = findByThriftId(fieldId);
-
 
52831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
52832
        return fields;
-
 
52833
      }
-
 
52834
 
-
 
52835
      /**
-
 
52836
       * Find the _Fields constant that matches name, or null if its not found.
-
 
52837
       */
-
 
52838
      public static _Fields findByName(String name) {
-
 
52839
        return byName.get(name);
-
 
52840
      }
-
 
52841
 
-
 
52842
      private final short _thriftId;
-
 
52843
      private final String _fieldName;
-
 
52844
 
-
 
52845
      _Fields(short thriftId, String fieldName) {
-
 
52846
        _thriftId = thriftId;
-
 
52847
        _fieldName = fieldName;
-
 
52848
      }
-
 
52849
 
-
 
52850
      public short getThriftFieldId() {
-
 
52851
        return _thriftId;
-
 
52852
      }
-
 
52853
 
-
 
52854
      public String getFieldName() {
-
 
52855
        return _fieldName;
-
 
52856
      }
-
 
52857
    }
-
 
52858
 
-
 
52859
    // isset id assignments
-
 
52860
    private static final int __ITEMID_ISSET_ID = 0;
-
 
52861
    private static final int __INVENTORY_ISSET_ID = 1;
-
 
52862
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
52863
 
-
 
52864
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
52865
    static {
-
 
52866
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
52867
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
52868
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
52869
      tmpMap.put(_Fields.INVENTORY, new org.apache.thrift.meta_data.FieldMetaData("inventory", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
52870
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
52871
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
52872
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acceptOrdersForItemId_args.class, metaDataMap);
-
 
52873
    }
-
 
52874
 
-
 
52875
    public acceptOrdersForItemId_args() {
-
 
52876
    }
-
 
52877
 
-
 
52878
    public acceptOrdersForItemId_args(
-
 
52879
      long itemId,
-
 
52880
      long inventory)
-
 
52881
    {
-
 
52882
      this();
-
 
52883
      this.itemId = itemId;
-
 
52884
      setItemIdIsSet(true);
-
 
52885
      this.inventory = inventory;
-
 
52886
      setInventoryIsSet(true);
-
 
52887
    }
-
 
52888
 
-
 
52889
    /**
-
 
52890
     * Performs a deep copy on <i>other</i>.
-
 
52891
     */
-
 
52892
    public acceptOrdersForItemId_args(acceptOrdersForItemId_args other) {
-
 
52893
      __isset_bit_vector.clear();
-
 
52894
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
52895
      this.itemId = other.itemId;
-
 
52896
      this.inventory = other.inventory;
-
 
52897
    }
-
 
52898
 
-
 
52899
    public acceptOrdersForItemId_args deepCopy() {
-
 
52900
      return new acceptOrdersForItemId_args(this);
-
 
52901
    }
-
 
52902
 
-
 
52903
    @Override
-
 
52904
    public void clear() {
-
 
52905
      setItemIdIsSet(false);
-
 
52906
      this.itemId = 0;
-
 
52907
      setInventoryIsSet(false);
-
 
52908
      this.inventory = 0;
-
 
52909
    }
-
 
52910
 
-
 
52911
    public long getItemId() {
-
 
52912
      return this.itemId;
-
 
52913
    }
-
 
52914
 
-
 
52915
    public void setItemId(long itemId) {
-
 
52916
      this.itemId = itemId;
-
 
52917
      setItemIdIsSet(true);
-
 
52918
    }
-
 
52919
 
-
 
52920
    public void unsetItemId() {
-
 
52921
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
52922
    }
-
 
52923
 
-
 
52924
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
-
 
52925
    public boolean isSetItemId() {
-
 
52926
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
52927
    }
-
 
52928
 
-
 
52929
    public void setItemIdIsSet(boolean value) {
-
 
52930
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
52931
    }
-
 
52932
 
-
 
52933
    public long getInventory() {
-
 
52934
      return this.inventory;
-
 
52935
    }
-
 
52936
 
-
 
52937
    public void setInventory(long inventory) {
-
 
52938
      this.inventory = inventory;
-
 
52939
      setInventoryIsSet(true);
-
 
52940
    }
-
 
52941
 
-
 
52942
    public void unsetInventory() {
-
 
52943
      __isset_bit_vector.clear(__INVENTORY_ISSET_ID);
-
 
52944
    }
-
 
52945
 
-
 
52946
    /** Returns true if field inventory is set (has been assigned a value) and false otherwise */
-
 
52947
    public boolean isSetInventory() {
-
 
52948
      return __isset_bit_vector.get(__INVENTORY_ISSET_ID);
-
 
52949
    }
-
 
52950
 
-
 
52951
    public void setInventoryIsSet(boolean value) {
-
 
52952
      __isset_bit_vector.set(__INVENTORY_ISSET_ID, value);
-
 
52953
    }
-
 
52954
 
-
 
52955
    public void setFieldValue(_Fields field, Object value) {
-
 
52956
      switch (field) {
-
 
52957
      case ITEM_ID:
-
 
52958
        if (value == null) {
-
 
52959
          unsetItemId();
-
 
52960
        } else {
-
 
52961
          setItemId((Long)value);
-
 
52962
        }
-
 
52963
        break;
-
 
52964
 
-
 
52965
      case INVENTORY:
-
 
52966
        if (value == null) {
-
 
52967
          unsetInventory();
-
 
52968
        } else {
-
 
52969
          setInventory((Long)value);
-
 
52970
        }
-
 
52971
        break;
-
 
52972
 
-
 
52973
      }
-
 
52974
    }
-
 
52975
 
-
 
52976
    public Object getFieldValue(_Fields field) {
-
 
52977
      switch (field) {
-
 
52978
      case ITEM_ID:
-
 
52979
        return Long.valueOf(getItemId());
-
 
52980
 
-
 
52981
      case INVENTORY:
-
 
52982
        return Long.valueOf(getInventory());
-
 
52983
 
-
 
52984
      }
-
 
52985
      throw new IllegalStateException();
-
 
52986
    }
-
 
52987
 
-
 
52988
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
52989
    public boolean isSet(_Fields field) {
-
 
52990
      if (field == null) {
-
 
52991
        throw new IllegalArgumentException();
-
 
52992
      }
-
 
52993
 
-
 
52994
      switch (field) {
-
 
52995
      case ITEM_ID:
-
 
52996
        return isSetItemId();
-
 
52997
      case INVENTORY:
-
 
52998
        return isSetInventory();
-
 
52999
      }
-
 
53000
      throw new IllegalStateException();
-
 
53001
    }
-
 
53002
 
-
 
53003
    @Override
-
 
53004
    public boolean equals(Object that) {
-
 
53005
      if (that == null)
-
 
53006
        return false;
-
 
53007
      if (that instanceof acceptOrdersForItemId_args)
-
 
53008
        return this.equals((acceptOrdersForItemId_args)that);
-
 
53009
      return false;
-
 
53010
    }
-
 
53011
 
-
 
53012
    public boolean equals(acceptOrdersForItemId_args that) {
-
 
53013
      if (that == null)
-
 
53014
        return false;
-
 
53015
 
-
 
53016
      boolean this_present_itemId = true;
-
 
53017
      boolean that_present_itemId = true;
-
 
53018
      if (this_present_itemId || that_present_itemId) {
-
 
53019
        if (!(this_present_itemId && that_present_itemId))
-
 
53020
          return false;
-
 
53021
        if (this.itemId != that.itemId)
-
 
53022
          return false;
-
 
53023
      }
-
 
53024
 
-
 
53025
      boolean this_present_inventory = true;
-
 
53026
      boolean that_present_inventory = true;
-
 
53027
      if (this_present_inventory || that_present_inventory) {
-
 
53028
        if (!(this_present_inventory && that_present_inventory))
-
 
53029
          return false;
-
 
53030
        if (this.inventory != that.inventory)
-
 
53031
          return false;
-
 
53032
      }
-
 
53033
 
-
 
53034
      return true;
-
 
53035
    }
-
 
53036
 
-
 
53037
    @Override
-
 
53038
    public int hashCode() {
-
 
53039
      return 0;
-
 
53040
    }
-
 
53041
 
-
 
53042
    public int compareTo(acceptOrdersForItemId_args other) {
-
 
53043
      if (!getClass().equals(other.getClass())) {
-
 
53044
        return getClass().getName().compareTo(other.getClass().getName());
-
 
53045
      }
-
 
53046
 
-
 
53047
      int lastComparison = 0;
-
 
53048
      acceptOrdersForItemId_args typedOther = (acceptOrdersForItemId_args)other;
-
 
53049
 
-
 
53050
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
-
 
53051
      if (lastComparison != 0) {
-
 
53052
        return lastComparison;
-
 
53053
      }
-
 
53054
      if (isSetItemId()) {
-
 
53055
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
-
 
53056
        if (lastComparison != 0) {
-
 
53057
          return lastComparison;
-
 
53058
        }
-
 
53059
      }
-
 
53060
      lastComparison = Boolean.valueOf(isSetInventory()).compareTo(typedOther.isSetInventory());
-
 
53061
      if (lastComparison != 0) {
-
 
53062
        return lastComparison;
-
 
53063
      }
-
 
53064
      if (isSetInventory()) {
-
 
53065
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventory, typedOther.inventory);
-
 
53066
        if (lastComparison != 0) {
-
 
53067
          return lastComparison;
-
 
53068
        }
-
 
53069
      }
-
 
53070
      return 0;
-
 
53071
    }
-
 
53072
 
-
 
53073
    public _Fields fieldForId(int fieldId) {
-
 
53074
      return _Fields.findByThriftId(fieldId);
-
 
53075
    }
-
 
53076
 
-
 
53077
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
53078
      org.apache.thrift.protocol.TField field;
-
 
53079
      iprot.readStructBegin();
-
 
53080
      while (true)
-
 
53081
      {
-
 
53082
        field = iprot.readFieldBegin();
-
 
53083
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
53084
          break;
-
 
53085
        }
-
 
53086
        switch (field.id) {
-
 
53087
          case 1: // ITEM_ID
-
 
53088
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
53089
              this.itemId = iprot.readI64();
-
 
53090
              setItemIdIsSet(true);
-
 
53091
            } else { 
-
 
53092
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53093
            }
-
 
53094
            break;
-
 
53095
          case 2: // INVENTORY
-
 
53096
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
53097
              this.inventory = iprot.readI64();
-
 
53098
              setInventoryIsSet(true);
-
 
53099
            } else { 
-
 
53100
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53101
            }
-
 
53102
            break;
-
 
53103
          default:
-
 
53104
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53105
        }
-
 
53106
        iprot.readFieldEnd();
-
 
53107
      }
-
 
53108
      iprot.readStructEnd();
-
 
53109
      validate();
-
 
53110
    }
-
 
53111
 
-
 
53112
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
53113
      validate();
-
 
53114
 
-
 
53115
      oprot.writeStructBegin(STRUCT_DESC);
-
 
53116
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
53117
      oprot.writeI64(this.itemId);
-
 
53118
      oprot.writeFieldEnd();
-
 
53119
      oprot.writeFieldBegin(INVENTORY_FIELD_DESC);
-
 
53120
      oprot.writeI64(this.inventory);
-
 
53121
      oprot.writeFieldEnd();
-
 
53122
      oprot.writeFieldStop();
-
 
53123
      oprot.writeStructEnd();
-
 
53124
    }
-
 
53125
 
-
 
53126
    @Override
-
 
53127
    public String toString() {
-
 
53128
      StringBuilder sb = new StringBuilder("acceptOrdersForItemId_args(");
-
 
53129
      boolean first = true;
-
 
53130
 
-
 
53131
      sb.append("itemId:");
-
 
53132
      sb.append(this.itemId);
-
 
53133
      first = false;
-
 
53134
      if (!first) sb.append(", ");
-
 
53135
      sb.append("inventory:");
-
 
53136
      sb.append(this.inventory);
-
 
53137
      first = false;
-
 
53138
      sb.append(")");
-
 
53139
      return sb.toString();
-
 
53140
    }
-
 
53141
 
-
 
53142
    public void validate() throws org.apache.thrift.TException {
-
 
53143
      // check for required fields
-
 
53144
    }
-
 
53145
 
-
 
53146
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
53147
      try {
-
 
53148
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
53149
      } catch (org.apache.thrift.TException te) {
-
 
53150
        throw new java.io.IOException(te);
-
 
53151
      }
-
 
53152
    }
-
 
53153
 
-
 
53154
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
53155
      try {
-
 
53156
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
53157
      } catch (org.apache.thrift.TException te) {
-
 
53158
        throw new java.io.IOException(te);
-
 
53159
      }
-
 
53160
    }
-
 
53161
 
-
 
53162
  }
-
 
53163
 
-
 
53164
  public static class acceptOrdersForItemId_result implements org.apache.thrift.TBase<acceptOrdersForItemId_result, acceptOrdersForItemId_result._Fields>, java.io.Serializable, Cloneable   {
-
 
53165
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acceptOrdersForItemId_result");
-
 
53166
 
-
 
53167
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
 
53168
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
53169
 
-
 
53170
    private boolean success; // required
-
 
53171
    private TransactionServiceException ex; // required
-
 
53172
 
-
 
53173
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
53174
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
53175
      SUCCESS((short)0, "success"),
-
 
53176
      EX((short)1, "ex");
-
 
53177
 
-
 
53178
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
53179
 
-
 
53180
      static {
-
 
53181
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
53182
          byName.put(field.getFieldName(), field);
-
 
53183
        }
-
 
53184
      }
-
 
53185
 
-
 
53186
      /**
-
 
53187
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
53188
       */
-
 
53189
      public static _Fields findByThriftId(int fieldId) {
-
 
53190
        switch(fieldId) {
-
 
53191
          case 0: // SUCCESS
-
 
53192
            return SUCCESS;
-
 
53193
          case 1: // EX
-
 
53194
            return EX;
-
 
53195
          default:
-
 
53196
            return null;
-
 
53197
        }
-
 
53198
      }
-
 
53199
 
-
 
53200
      /**
-
 
53201
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
53202
       * if it is not found.
-
 
53203
       */
-
 
53204
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
53205
        _Fields fields = findByThriftId(fieldId);
-
 
53206
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
53207
        return fields;
-
 
53208
      }
-
 
53209
 
-
 
53210
      /**
-
 
53211
       * Find the _Fields constant that matches name, or null if its not found.
-
 
53212
       */
-
 
53213
      public static _Fields findByName(String name) {
-
 
53214
        return byName.get(name);
-
 
53215
      }
-
 
53216
 
-
 
53217
      private final short _thriftId;
-
 
53218
      private final String _fieldName;
-
 
53219
 
-
 
53220
      _Fields(short thriftId, String fieldName) {
-
 
53221
        _thriftId = thriftId;
-
 
53222
        _fieldName = fieldName;
-
 
53223
      }
-
 
53224
 
-
 
53225
      public short getThriftFieldId() {
-
 
53226
        return _thriftId;
-
 
53227
      }
-
 
53228
 
-
 
53229
      public String getFieldName() {
-
 
53230
        return _fieldName;
-
 
53231
      }
-
 
53232
    }
-
 
53233
 
-
 
53234
    // isset id assignments
-
 
53235
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
53236
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
53237
 
-
 
53238
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
53239
    static {
-
 
53240
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
53241
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
53242
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
53243
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
53244
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
53245
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
53246
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acceptOrdersForItemId_result.class, metaDataMap);
-
 
53247
    }
-
 
53248
 
-
 
53249
    public acceptOrdersForItemId_result() {
-
 
53250
    }
-
 
53251
 
-
 
53252
    public acceptOrdersForItemId_result(
-
 
53253
      boolean success,
-
 
53254
      TransactionServiceException ex)
-
 
53255
    {
-
 
53256
      this();
-
 
53257
      this.success = success;
-
 
53258
      setSuccessIsSet(true);
-
 
53259
      this.ex = ex;
-
 
53260
    }
-
 
53261
 
-
 
53262
    /**
-
 
53263
     * Performs a deep copy on <i>other</i>.
-
 
53264
     */
-
 
53265
    public acceptOrdersForItemId_result(acceptOrdersForItemId_result other) {
-
 
53266
      __isset_bit_vector.clear();
-
 
53267
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
53268
      this.success = other.success;
-
 
53269
      if (other.isSetEx()) {
-
 
53270
        this.ex = new TransactionServiceException(other.ex);
-
 
53271
      }
-
 
53272
    }
-
 
53273
 
-
 
53274
    public acceptOrdersForItemId_result deepCopy() {
-
 
53275
      return new acceptOrdersForItemId_result(this);
-
 
53276
    }
-
 
53277
 
-
 
53278
    @Override
-
 
53279
    public void clear() {
-
 
53280
      setSuccessIsSet(false);
-
 
53281
      this.success = false;
-
 
53282
      this.ex = null;
-
 
53283
    }
-
 
53284
 
-
 
53285
    public boolean isSuccess() {
-
 
53286
      return this.success;
-
 
53287
    }
-
 
53288
 
-
 
53289
    public void setSuccess(boolean success) {
-
 
53290
      this.success = success;
-
 
53291
      setSuccessIsSet(true);
-
 
53292
    }
-
 
53293
 
-
 
53294
    public void unsetSuccess() {
-
 
53295
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
53296
    }
-
 
53297
 
-
 
53298
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
53299
    public boolean isSetSuccess() {
-
 
53300
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
53301
    }
-
 
53302
 
-
 
53303
    public void setSuccessIsSet(boolean value) {
-
 
53304
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
53305
    }
-
 
53306
 
-
 
53307
    public TransactionServiceException getEx() {
-
 
53308
      return this.ex;
-
 
53309
    }
-
 
53310
 
-
 
53311
    public void setEx(TransactionServiceException ex) {
-
 
53312
      this.ex = ex;
-
 
53313
    }
-
 
53314
 
-
 
53315
    public void unsetEx() {
-
 
53316
      this.ex = null;
-
 
53317
    }
-
 
53318
 
-
 
53319
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
-
 
53320
    public boolean isSetEx() {
-
 
53321
      return this.ex != null;
-
 
53322
    }
-
 
53323
 
-
 
53324
    public void setExIsSet(boolean value) {
-
 
53325
      if (!value) {
-
 
53326
        this.ex = null;
-
 
53327
      }
-
 
53328
    }
-
 
53329
 
-
 
53330
    public void setFieldValue(_Fields field, Object value) {
-
 
53331
      switch (field) {
-
 
53332
      case SUCCESS:
-
 
53333
        if (value == null) {
-
 
53334
          unsetSuccess();
-
 
53335
        } else {
-
 
53336
          setSuccess((Boolean)value);
-
 
53337
        }
-
 
53338
        break;
-
 
53339
 
-
 
53340
      case EX:
-
 
53341
        if (value == null) {
-
 
53342
          unsetEx();
-
 
53343
        } else {
-
 
53344
          setEx((TransactionServiceException)value);
-
 
53345
        }
-
 
53346
        break;
-
 
53347
 
-
 
53348
      }
-
 
53349
    }
-
 
53350
 
-
 
53351
    public Object getFieldValue(_Fields field) {
-
 
53352
      switch (field) {
-
 
53353
      case SUCCESS:
-
 
53354
        return Boolean.valueOf(isSuccess());
-
 
53355
 
-
 
53356
      case EX:
-
 
53357
        return getEx();
-
 
53358
 
-
 
53359
      }
-
 
53360
      throw new IllegalStateException();
-
 
53361
    }
-
 
53362
 
-
 
53363
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
53364
    public boolean isSet(_Fields field) {
-
 
53365
      if (field == null) {
-
 
53366
        throw new IllegalArgumentException();
-
 
53367
      }
-
 
53368
 
-
 
53369
      switch (field) {
-
 
53370
      case SUCCESS:
-
 
53371
        return isSetSuccess();
-
 
53372
      case EX:
-
 
53373
        return isSetEx();
-
 
53374
      }
-
 
53375
      throw new IllegalStateException();
-
 
53376
    }
-
 
53377
 
-
 
53378
    @Override
-
 
53379
    public boolean equals(Object that) {
-
 
53380
      if (that == null)
-
 
53381
        return false;
-
 
53382
      if (that instanceof acceptOrdersForItemId_result)
-
 
53383
        return this.equals((acceptOrdersForItemId_result)that);
-
 
53384
      return false;
-
 
53385
    }
-
 
53386
 
-
 
53387
    public boolean equals(acceptOrdersForItemId_result that) {
-
 
53388
      if (that == null)
-
 
53389
        return false;
-
 
53390
 
-
 
53391
      boolean this_present_success = true;
-
 
53392
      boolean that_present_success = true;
-
 
53393
      if (this_present_success || that_present_success) {
-
 
53394
        if (!(this_present_success && that_present_success))
-
 
53395
          return false;
-
 
53396
        if (this.success != that.success)
-
 
53397
          return false;
-
 
53398
      }
-
 
53399
 
-
 
53400
      boolean this_present_ex = true && this.isSetEx();
-
 
53401
      boolean that_present_ex = true && that.isSetEx();
-
 
53402
      if (this_present_ex || that_present_ex) {
-
 
53403
        if (!(this_present_ex && that_present_ex))
-
 
53404
          return false;
-
 
53405
        if (!this.ex.equals(that.ex))
-
 
53406
          return false;
-
 
53407
      }
-
 
53408
 
-
 
53409
      return true;
-
 
53410
    }
-
 
53411
 
-
 
53412
    @Override
-
 
53413
    public int hashCode() {
-
 
53414
      return 0;
-
 
53415
    }
-
 
53416
 
-
 
53417
    public int compareTo(acceptOrdersForItemId_result other) {
-
 
53418
      if (!getClass().equals(other.getClass())) {
-
 
53419
        return getClass().getName().compareTo(other.getClass().getName());
-
 
53420
      }
-
 
53421
 
-
 
53422
      int lastComparison = 0;
-
 
53423
      acceptOrdersForItemId_result typedOther = (acceptOrdersForItemId_result)other;
-
 
53424
 
-
 
53425
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
53426
      if (lastComparison != 0) {
-
 
53427
        return lastComparison;
-
 
53428
      }
-
 
53429
      if (isSetSuccess()) {
-
 
53430
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
53431
        if (lastComparison != 0) {
-
 
53432
          return lastComparison;
-
 
53433
        }
-
 
53434
      }
-
 
53435
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
-
 
53436
      if (lastComparison != 0) {
-
 
53437
        return lastComparison;
-
 
53438
      }
-
 
53439
      if (isSetEx()) {
-
 
53440
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
-
 
53441
        if (lastComparison != 0) {
-
 
53442
          return lastComparison;
-
 
53443
        }
-
 
53444
      }
-
 
53445
      return 0;
-
 
53446
    }
-
 
53447
 
-
 
53448
    public _Fields fieldForId(int fieldId) {
-
 
53449
      return _Fields.findByThriftId(fieldId);
-
 
53450
    }
-
 
53451
 
-
 
53452
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
53453
      org.apache.thrift.protocol.TField field;
-
 
53454
      iprot.readStructBegin();
-
 
53455
      while (true)
-
 
53456
      {
-
 
53457
        field = iprot.readFieldBegin();
-
 
53458
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
53459
          break;
-
 
53460
        }
-
 
53461
        switch (field.id) {
-
 
53462
          case 0: // SUCCESS
-
 
53463
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
53464
              this.success = iprot.readBool();
-
 
53465
              setSuccessIsSet(true);
-
 
53466
            } else { 
-
 
53467
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53468
            }
-
 
53469
            break;
-
 
53470
          case 1: // EX
-
 
53471
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
53472
              this.ex = new TransactionServiceException();
-
 
53473
              this.ex.read(iprot);
-
 
53474
            } else { 
-
 
53475
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53476
            }
-
 
53477
            break;
-
 
53478
          default:
-
 
53479
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53480
        }
-
 
53481
        iprot.readFieldEnd();
-
 
53482
      }
-
 
53483
      iprot.readStructEnd();
-
 
53484
      validate();
-
 
53485
    }
-
 
53486
 
-
 
53487
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
53488
      oprot.writeStructBegin(STRUCT_DESC);
-
 
53489
 
-
 
53490
      if (this.isSetSuccess()) {
-
 
53491
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
53492
        oprot.writeBool(this.success);
-
 
53493
        oprot.writeFieldEnd();
-
 
53494
      } else if (this.isSetEx()) {
-
 
53495
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
53496
        this.ex.write(oprot);
-
 
53497
        oprot.writeFieldEnd();
-
 
53498
      }
-
 
53499
      oprot.writeFieldStop();
-
 
53500
      oprot.writeStructEnd();
-
 
53501
    }
-
 
53502
 
-
 
53503
    @Override
-
 
53504
    public String toString() {
-
 
53505
      StringBuilder sb = new StringBuilder("acceptOrdersForItemId_result(");
-
 
53506
      boolean first = true;
-
 
53507
 
-
 
53508
      sb.append("success:");
-
 
53509
      sb.append(this.success);
-
 
53510
      first = false;
-
 
53511
      if (!first) sb.append(", ");
-
 
53512
      sb.append("ex:");
-
 
53513
      if (this.ex == null) {
-
 
53514
        sb.append("null");
-
 
53515
      } else {
-
 
53516
        sb.append(this.ex);
52668
      }
53517
      }
52669
      first = false;
53518
      first = false;
52670
      sb.append(")");
53519
      sb.append(")");
52671
      return sb.toString();
53520
      return sb.toString();
52672
    }
53521
    }