Subversion Repositories SmartDukaan

Rev

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

Rev 2538 Rev 2590
Line 248... Line 248...
248
    /**
248
    /**
249
     * If the order status is DOA_PICKUP_REQUESTED, it does the following
249
     * If the order status is DOA_PICKUP_REQUESTED, it does the following
250
     * 	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
250
     * 	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
251
     * 	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
251
     * 	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
252
     * 	3. Returns true
252
     * 	3. Returns true
253
     * If the order is any other status, it returns false.
253
     * If the order is in any other status, it returns false.
254
     * Throws an exception if the order with the given id couldn't be found.
254
     * Throws an exception if the order with the given id couldn't be found.
255
     * 
255
     * 
256
     * @param orderId
256
     * @param orderId
257
     * @param pickupNumber
257
     * @param pickupNumber
258
     */
258
     */
259
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
259
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
260
 
260
 
-
 
261
    /**
-
 
262
     * If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RETURNED and returns true.
-
 
263
     * If the order is in any other state, it returns false.
-
 
264
     * Throws an exception if the order with the given id couldn't be found.
-
 
265
     * 
-
 
266
     * @param orderId
-
 
267
     */
-
 
268
    public boolean acceptDoa(long orderId) throws TransactionServiceException, TException;
-
 
269
 
-
 
270
    /**
-
 
271
     * Used to validate the DOA certificate for an order in the DOA_RETURNED state. If the certificate is valid,
-
 
272
     * the order state is changed to DOA_PENDING and the warehouse executive gets to print a return receiving letter.
-
 
273
     * If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
-
 
274
     * If the order is in any other state, it returns false.
-
 
275
     * Throws an exception if the order with the given id couldn't be found.
-
 
276
     * 
-
 
277
     * @param orderId
-
 
278
     * @param isValid
-
 
279
     */
-
 
280
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException;
-
 
281
 
261
  }
282
  }
262
 
283
 
263
  public static class Client implements Iface {
284
  public static class Client implements Iface {
264
    public Client(TProtocol prot)
285
    public Client(TProtocol prot)
265
    {
286
    {
Line 1716... Line 1737...
1716
        throw result.ex;
1737
        throw result.ex;
1717
      }
1738
      }
1718
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1739
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1719
    }
1740
    }
1720
 
1741
 
-
 
1742
    public boolean acceptDoa(long orderId) throws TransactionServiceException, TException
-
 
1743
    {
-
 
1744
      send_acceptDoa(orderId);
-
 
1745
      return recv_acceptDoa();
-
 
1746
    }
-
 
1747
 
-
 
1748
    public void send_acceptDoa(long orderId) throws TException
-
 
1749
    {
-
 
1750
      oprot_.writeMessageBegin(new TMessage("acceptDoa", TMessageType.CALL, seqid_));
-
 
1751
      acceptDoa_args args = new acceptDoa_args();
-
 
1752
      args.orderId = orderId;
-
 
1753
      args.write(oprot_);
-
 
1754
      oprot_.writeMessageEnd();
-
 
1755
      oprot_.getTransport().flush();
-
 
1756
    }
-
 
1757
 
-
 
1758
    public boolean recv_acceptDoa() throws TransactionServiceException, TException
-
 
1759
    {
-
 
1760
      TMessage msg = iprot_.readMessageBegin();
-
 
1761
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1762
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1763
        iprot_.readMessageEnd();
-
 
1764
        throw x;
-
 
1765
      }
-
 
1766
      acceptDoa_result result = new acceptDoa_result();
-
 
1767
      result.read(iprot_);
-
 
1768
      iprot_.readMessageEnd();
-
 
1769
      if (result.isSetSuccess()) {
-
 
1770
        return result.success;
-
 
1771
      }
-
 
1772
      if (result.ex != null) {
-
 
1773
        throw result.ex;
-
 
1774
      }
-
 
1775
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptDoa failed: unknown result");
-
 
1776
    }
-
 
1777
 
-
 
1778
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException
-
 
1779
    {
-
 
1780
      send_validateDoa(orderId, isValid);
-
 
1781
      return recv_validateDoa();
-
 
1782
    }
-
 
1783
 
-
 
1784
    public void send_validateDoa(long orderId, boolean isValid) throws TException
-
 
1785
    {
-
 
1786
      oprot_.writeMessageBegin(new TMessage("validateDoa", TMessageType.CALL, seqid_));
-
 
1787
      validateDoa_args args = new validateDoa_args();
-
 
1788
      args.orderId = orderId;
-
 
1789
      args.isValid = isValid;
-
 
1790
      args.write(oprot_);
-
 
1791
      oprot_.writeMessageEnd();
-
 
1792
      oprot_.getTransport().flush();
-
 
1793
    }
-
 
1794
 
-
 
1795
    public boolean recv_validateDoa() throws TransactionServiceException, TException
-
 
1796
    {
-
 
1797
      TMessage msg = iprot_.readMessageBegin();
-
 
1798
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1799
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1800
        iprot_.readMessageEnd();
-
 
1801
        throw x;
-
 
1802
      }
-
 
1803
      validateDoa_result result = new validateDoa_result();
-
 
1804
      result.read(iprot_);
-
 
1805
      iprot_.readMessageEnd();
-
 
1806
      if (result.isSetSuccess()) {
-
 
1807
        return result.success;
-
 
1808
      }
-
 
1809
      if (result.ex != null) {
-
 
1810
        throw result.ex;
-
 
1811
      }
-
 
1812
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
-
 
1813
    }
-
 
1814
 
1721
  }
1815
  }
1722
  public static class Processor implements TProcessor {
1816
  public static class Processor implements TProcessor {
1723
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1817
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1724
    public Processor(Iface iface)
1818
    public Processor(Iface iface)
1725
    {
1819
    {
Line 1762... Line 1856...
1762
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1856
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1763
      processMap_.put("getValidOrders", new getValidOrders());
1857
      processMap_.put("getValidOrders", new getValidOrders());
1764
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
1858
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
1765
      processMap_.put("requestPickupNumber", new requestPickupNumber());
1859
      processMap_.put("requestPickupNumber", new requestPickupNumber());
1766
      processMap_.put("authorizePickup", new authorizePickup());
1860
      processMap_.put("authorizePickup", new authorizePickup());
-
 
1861
      processMap_.put("acceptDoa", new acceptDoa());
-
 
1862
      processMap_.put("validateDoa", new validateDoa());
1767
    }
1863
    }
1768
 
1864
 
1769
    protected static interface ProcessFunction {
1865
    protected static interface ProcessFunction {
1770
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1866
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1771
    }
1867
    }
Line 2829... Line 2925...
2829
        oprot.getTransport().flush();
2925
        oprot.getTransport().flush();
2830
      }
2926
      }
2831
 
2927
 
2832
    }
2928
    }
2833
 
2929
 
-
 
2930
    private class acceptDoa implements ProcessFunction {
-
 
2931
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2932
      {
-
 
2933
        acceptDoa_args args = new acceptDoa_args();
-
 
2934
        args.read(iprot);
-
 
2935
        iprot.readMessageEnd();
-
 
2936
        acceptDoa_result result = new acceptDoa_result();
-
 
2937
        try {
-
 
2938
          result.success = iface_.acceptDoa(args.orderId);
-
 
2939
          result.setSuccessIsSet(true);
-
 
2940
        } catch (TransactionServiceException ex) {
-
 
2941
          result.ex = ex;
-
 
2942
        } catch (Throwable th) {
-
 
2943
          LOGGER.error("Internal error processing acceptDoa", th);
-
 
2944
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptDoa");
-
 
2945
          oprot.writeMessageBegin(new TMessage("acceptDoa", TMessageType.EXCEPTION, seqid));
-
 
2946
          x.write(oprot);
-
 
2947
          oprot.writeMessageEnd();
-
 
2948
          oprot.getTransport().flush();
-
 
2949
          return;
-
 
2950
        }
-
 
2951
        oprot.writeMessageBegin(new TMessage("acceptDoa", TMessageType.REPLY, seqid));
-
 
2952
        result.write(oprot);
-
 
2953
        oprot.writeMessageEnd();
-
 
2954
        oprot.getTransport().flush();
-
 
2955
      }
-
 
2956
 
-
 
2957
    }
-
 
2958
 
-
 
2959
    private class validateDoa implements ProcessFunction {
-
 
2960
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2961
      {
-
 
2962
        validateDoa_args args = new validateDoa_args();
-
 
2963
        args.read(iprot);
-
 
2964
        iprot.readMessageEnd();
-
 
2965
        validateDoa_result result = new validateDoa_result();
-
 
2966
        try {
-
 
2967
          result.success = iface_.validateDoa(args.orderId, args.isValid);
-
 
2968
          result.setSuccessIsSet(true);
-
 
2969
        } catch (TransactionServiceException ex) {
-
 
2970
          result.ex = ex;
-
 
2971
        } catch (Throwable th) {
-
 
2972
          LOGGER.error("Internal error processing validateDoa", th);
-
 
2973
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateDoa");
-
 
2974
          oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.EXCEPTION, seqid));
-
 
2975
          x.write(oprot);
-
 
2976
          oprot.writeMessageEnd();
-
 
2977
          oprot.getTransport().flush();
-
 
2978
          return;
-
 
2979
        }
-
 
2980
        oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.REPLY, seqid));
-
 
2981
        result.write(oprot);
-
 
2982
        oprot.writeMessageEnd();
-
 
2983
        oprot.getTransport().flush();
-
 
2984
      }
-
 
2985
 
-
 
2986
    }
-
 
2987
 
2834
  }
2988
  }
2835
 
2989
 
2836
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2990
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2837
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2991
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2838
 
2992
 
Line 30566... Line 30720...
30566
      boolean first = true;
30720
      boolean first = true;
30567
 
30721
 
30568
      sb.append("success:");
30722
      sb.append("success:");
30569
      sb.append(this.success);
30723
      sb.append(this.success);
30570
      first = false;
30724
      first = false;
-
 
30725
      if (!first) sb.append(", ");
-
 
30726
      sb.append("ex:");
-
 
30727
      if (this.ex == null) {
-
 
30728
        sb.append("null");
-
 
30729
      } else {
-
 
30730
        sb.append(this.ex);
-
 
30731
      }
-
 
30732
      first = false;
-
 
30733
      sb.append(")");
-
 
30734
      return sb.toString();
-
 
30735
    }
-
 
30736
 
-
 
30737
    public void validate() throws TException {
-
 
30738
      // check for required fields
-
 
30739
    }
-
 
30740
 
-
 
30741
  }
-
 
30742
 
-
 
30743
  public static class acceptDoa_args implements TBase<acceptDoa_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptDoa_args>   {
-
 
30744
    private static final TStruct STRUCT_DESC = new TStruct("acceptDoa_args");
-
 
30745
 
-
 
30746
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
-
 
30747
 
-
 
30748
    private long orderId;
-
 
30749
 
-
 
30750
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
30751
    public enum _Fields implements TFieldIdEnum {
-
 
30752
      ORDER_ID((short)1, "orderId");
-
 
30753
 
-
 
30754
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
30755
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
30756
 
-
 
30757
      static {
-
 
30758
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
30759
          byId.put((int)field._thriftId, field);
-
 
30760
          byName.put(field.getFieldName(), field);
-
 
30761
        }
-
 
30762
      }
-
 
30763
 
-
 
30764
      /**
-
 
30765
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
30766
       */
-
 
30767
      public static _Fields findByThriftId(int fieldId) {
-
 
30768
        return byId.get(fieldId);
-
 
30769
      }
-
 
30770
 
-
 
30771
      /**
-
 
30772
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
30773
       * if it is not found.
-
 
30774
       */
-
 
30775
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
30776
        _Fields fields = findByThriftId(fieldId);
-
 
30777
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
30778
        return fields;
-
 
30779
      }
-
 
30780
 
-
 
30781
      /**
-
 
30782
       * Find the _Fields constant that matches name, or null if its not found.
-
 
30783
       */
-
 
30784
      public static _Fields findByName(String name) {
-
 
30785
        return byName.get(name);
-
 
30786
      }
-
 
30787
 
-
 
30788
      private final short _thriftId;
-
 
30789
      private final String _fieldName;
-
 
30790
 
-
 
30791
      _Fields(short thriftId, String fieldName) {
-
 
30792
        _thriftId = thriftId;
-
 
30793
        _fieldName = fieldName;
-
 
30794
      }
-
 
30795
 
-
 
30796
      public short getThriftFieldId() {
-
 
30797
        return _thriftId;
-
 
30798
      }
-
 
30799
 
-
 
30800
      public String getFieldName() {
-
 
30801
        return _fieldName;
-
 
30802
      }
-
 
30803
    }
-
 
30804
 
-
 
30805
    // isset id assignments
-
 
30806
    private static final int __ORDERID_ISSET_ID = 0;
-
 
30807
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
30808
 
-
 
30809
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
30810
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
-
 
30811
          new FieldValueMetaData(TType.I64)));
-
 
30812
    }});
-
 
30813
 
-
 
30814
    static {
-
 
30815
      FieldMetaData.addStructMetaDataMap(acceptDoa_args.class, metaDataMap);
-
 
30816
    }
-
 
30817
 
-
 
30818
    public acceptDoa_args() {
-
 
30819
    }
-
 
30820
 
-
 
30821
    public acceptDoa_args(
-
 
30822
      long orderId)
-
 
30823
    {
-
 
30824
      this();
-
 
30825
      this.orderId = orderId;
-
 
30826
      setOrderIdIsSet(true);
-
 
30827
    }
-
 
30828
 
-
 
30829
    /**
-
 
30830
     * Performs a deep copy on <i>other</i>.
-
 
30831
     */
-
 
30832
    public acceptDoa_args(acceptDoa_args other) {
-
 
30833
      __isset_bit_vector.clear();
-
 
30834
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
30835
      this.orderId = other.orderId;
-
 
30836
    }
-
 
30837
 
-
 
30838
    public acceptDoa_args deepCopy() {
-
 
30839
      return new acceptDoa_args(this);
-
 
30840
    }
-
 
30841
 
-
 
30842
    @Deprecated
-
 
30843
    public acceptDoa_args clone() {
-
 
30844
      return new acceptDoa_args(this);
-
 
30845
    }
-
 
30846
 
-
 
30847
    public long getOrderId() {
-
 
30848
      return this.orderId;
-
 
30849
    }
-
 
30850
 
-
 
30851
    public acceptDoa_args setOrderId(long orderId) {
-
 
30852
      this.orderId = orderId;
-
 
30853
      setOrderIdIsSet(true);
-
 
30854
      return this;
-
 
30855
    }
-
 
30856
 
-
 
30857
    public void unsetOrderId() {
-
 
30858
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
30859
    }
-
 
30860
 
-
 
30861
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
-
 
30862
    public boolean isSetOrderId() {
-
 
30863
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
30864
    }
-
 
30865
 
-
 
30866
    public void setOrderIdIsSet(boolean value) {
-
 
30867
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
30868
    }
-
 
30869
 
-
 
30870
    public void setFieldValue(_Fields field, Object value) {
-
 
30871
      switch (field) {
-
 
30872
      case ORDER_ID:
-
 
30873
        if (value == null) {
-
 
30874
          unsetOrderId();
-
 
30875
        } else {
-
 
30876
          setOrderId((Long)value);
-
 
30877
        }
-
 
30878
        break;
-
 
30879
 
-
 
30880
      }
-
 
30881
    }
-
 
30882
 
-
 
30883
    public void setFieldValue(int fieldID, Object value) {
-
 
30884
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
30885
    }
-
 
30886
 
-
 
30887
    public Object getFieldValue(_Fields field) {
-
 
30888
      switch (field) {
-
 
30889
      case ORDER_ID:
-
 
30890
        return new Long(getOrderId());
-
 
30891
 
-
 
30892
      }
-
 
30893
      throw new IllegalStateException();
-
 
30894
    }
-
 
30895
 
-
 
30896
    public Object getFieldValue(int fieldId) {
-
 
30897
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
30898
    }
-
 
30899
 
-
 
30900
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
30901
    public boolean isSet(_Fields field) {
-
 
30902
      switch (field) {
-
 
30903
      case ORDER_ID:
-
 
30904
        return isSetOrderId();
-
 
30905
      }
-
 
30906
      throw new IllegalStateException();
-
 
30907
    }
-
 
30908
 
-
 
30909
    public boolean isSet(int fieldID) {
-
 
30910
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
30911
    }
-
 
30912
 
-
 
30913
    @Override
-
 
30914
    public boolean equals(Object that) {
-
 
30915
      if (that == null)
-
 
30916
        return false;
-
 
30917
      if (that instanceof acceptDoa_args)
-
 
30918
        return this.equals((acceptDoa_args)that);
-
 
30919
      return false;
-
 
30920
    }
-
 
30921
 
-
 
30922
    public boolean equals(acceptDoa_args that) {
-
 
30923
      if (that == null)
-
 
30924
        return false;
-
 
30925
 
-
 
30926
      boolean this_present_orderId = true;
-
 
30927
      boolean that_present_orderId = true;
-
 
30928
      if (this_present_orderId || that_present_orderId) {
-
 
30929
        if (!(this_present_orderId && that_present_orderId))
-
 
30930
          return false;
-
 
30931
        if (this.orderId != that.orderId)
-
 
30932
          return false;
-
 
30933
      }
-
 
30934
 
-
 
30935
      return true;
-
 
30936
    }
-
 
30937
 
-
 
30938
    @Override
-
 
30939
    public int hashCode() {
-
 
30940
      return 0;
-
 
30941
    }
-
 
30942
 
-
 
30943
    public int compareTo(acceptDoa_args other) {
-
 
30944
      if (!getClass().equals(other.getClass())) {
-
 
30945
        return getClass().getName().compareTo(other.getClass().getName());
-
 
30946
      }
-
 
30947
 
-
 
30948
      int lastComparison = 0;
-
 
30949
      acceptDoa_args typedOther = (acceptDoa_args)other;
-
 
30950
 
-
 
30951
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
-
 
30952
      if (lastComparison != 0) {
-
 
30953
        return lastComparison;
-
 
30954
      }
-
 
30955
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
-
 
30956
      if (lastComparison != 0) {
-
 
30957
        return lastComparison;
-
 
30958
      }
-
 
30959
      return 0;
-
 
30960
    }
-
 
30961
 
-
 
30962
    public void read(TProtocol iprot) throws TException {
-
 
30963
      TField field;
-
 
30964
      iprot.readStructBegin();
-
 
30965
      while (true)
-
 
30966
      {
-
 
30967
        field = iprot.readFieldBegin();
-
 
30968
        if (field.type == TType.STOP) { 
-
 
30969
          break;
-
 
30970
        }
-
 
30971
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
30972
        if (fieldId == null) {
-
 
30973
          TProtocolUtil.skip(iprot, field.type);
-
 
30974
        } else {
-
 
30975
          switch (fieldId) {
-
 
30976
            case ORDER_ID:
-
 
30977
              if (field.type == TType.I64) {
-
 
30978
                this.orderId = iprot.readI64();
-
 
30979
                setOrderIdIsSet(true);
-
 
30980
              } else { 
-
 
30981
                TProtocolUtil.skip(iprot, field.type);
-
 
30982
              }
-
 
30983
              break;
-
 
30984
          }
-
 
30985
          iprot.readFieldEnd();
-
 
30986
        }
-
 
30987
      }
-
 
30988
      iprot.readStructEnd();
-
 
30989
      validate();
-
 
30990
    }
-
 
30991
 
-
 
30992
    public void write(TProtocol oprot) throws TException {
-
 
30993
      validate();
-
 
30994
 
-
 
30995
      oprot.writeStructBegin(STRUCT_DESC);
-
 
30996
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
30997
      oprot.writeI64(this.orderId);
-
 
30998
      oprot.writeFieldEnd();
-
 
30999
      oprot.writeFieldStop();
-
 
31000
      oprot.writeStructEnd();
-
 
31001
    }
-
 
31002
 
-
 
31003
    @Override
-
 
31004
    public String toString() {
-
 
31005
      StringBuilder sb = new StringBuilder("acceptDoa_args(");
-
 
31006
      boolean first = true;
-
 
31007
 
-
 
31008
      sb.append("orderId:");
-
 
31009
      sb.append(this.orderId);
-
 
31010
      first = false;
-
 
31011
      sb.append(")");
-
 
31012
      return sb.toString();
-
 
31013
    }
-
 
31014
 
-
 
31015
    public void validate() throws TException {
-
 
31016
      // check for required fields
-
 
31017
    }
-
 
31018
 
-
 
31019
  }
-
 
31020
 
-
 
31021
  public static class acceptDoa_result implements TBase<acceptDoa_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptDoa_result>   {
-
 
31022
    private static final TStruct STRUCT_DESC = new TStruct("acceptDoa_result");
-
 
31023
 
-
 
31024
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
31025
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
31026
 
-
 
31027
    private boolean success;
-
 
31028
    private TransactionServiceException ex;
-
 
31029
 
-
 
31030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
31031
    public enum _Fields implements TFieldIdEnum {
-
 
31032
      SUCCESS((short)0, "success"),
-
 
31033
      EX((short)1, "ex");
-
 
31034
 
-
 
31035
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
31036
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
31037
 
-
 
31038
      static {
-
 
31039
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
31040
          byId.put((int)field._thriftId, field);
-
 
31041
          byName.put(field.getFieldName(), field);
-
 
31042
        }
-
 
31043
      }
-
 
31044
 
-
 
31045
      /**
-
 
31046
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
31047
       */
-
 
31048
      public static _Fields findByThriftId(int fieldId) {
-
 
31049
        return byId.get(fieldId);
-
 
31050
      }
-
 
31051
 
-
 
31052
      /**
-
 
31053
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
31054
       * if it is not found.
-
 
31055
       */
-
 
31056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
31057
        _Fields fields = findByThriftId(fieldId);
-
 
31058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
31059
        return fields;
-
 
31060
      }
-
 
31061
 
-
 
31062
      /**
-
 
31063
       * Find the _Fields constant that matches name, or null if its not found.
-
 
31064
       */
-
 
31065
      public static _Fields findByName(String name) {
-
 
31066
        return byName.get(name);
-
 
31067
      }
-
 
31068
 
-
 
31069
      private final short _thriftId;
-
 
31070
      private final String _fieldName;
-
 
31071
 
-
 
31072
      _Fields(short thriftId, String fieldName) {
-
 
31073
        _thriftId = thriftId;
-
 
31074
        _fieldName = fieldName;
-
 
31075
      }
-
 
31076
 
-
 
31077
      public short getThriftFieldId() {
-
 
31078
        return _thriftId;
-
 
31079
      }
-
 
31080
 
-
 
31081
      public String getFieldName() {
-
 
31082
        return _fieldName;
-
 
31083
      }
-
 
31084
    }
-
 
31085
 
-
 
31086
    // isset id assignments
-
 
31087
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
31088
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
31089
 
-
 
31090
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
31091
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
31092
          new FieldValueMetaData(TType.BOOL)));
-
 
31093
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
31094
          new FieldValueMetaData(TType.STRUCT)));
-
 
31095
    }});
-
 
31096
 
-
 
31097
    static {
-
 
31098
      FieldMetaData.addStructMetaDataMap(acceptDoa_result.class, metaDataMap);
-
 
31099
    }
-
 
31100
 
-
 
31101
    public acceptDoa_result() {
-
 
31102
    }
-
 
31103
 
-
 
31104
    public acceptDoa_result(
-
 
31105
      boolean success,
-
 
31106
      TransactionServiceException ex)
-
 
31107
    {
-
 
31108
      this();
-
 
31109
      this.success = success;
-
 
31110
      setSuccessIsSet(true);
-
 
31111
      this.ex = ex;
-
 
31112
    }
-
 
31113
 
-
 
31114
    /**
-
 
31115
     * Performs a deep copy on <i>other</i>.
-
 
31116
     */
-
 
31117
    public acceptDoa_result(acceptDoa_result other) {
-
 
31118
      __isset_bit_vector.clear();
-
 
31119
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
31120
      this.success = other.success;
-
 
31121
      if (other.isSetEx()) {
-
 
31122
        this.ex = new TransactionServiceException(other.ex);
-
 
31123
      }
-
 
31124
    }
-
 
31125
 
-
 
31126
    public acceptDoa_result deepCopy() {
-
 
31127
      return new acceptDoa_result(this);
-
 
31128
    }
-
 
31129
 
-
 
31130
    @Deprecated
-
 
31131
    public acceptDoa_result clone() {
-
 
31132
      return new acceptDoa_result(this);
-
 
31133
    }
-
 
31134
 
-
 
31135
    public boolean isSuccess() {
-
 
31136
      return this.success;
-
 
31137
    }
-
 
31138
 
-
 
31139
    public acceptDoa_result setSuccess(boolean success) {
-
 
31140
      this.success = success;
-
 
31141
      setSuccessIsSet(true);
-
 
31142
      return this;
-
 
31143
    }
-
 
31144
 
-
 
31145
    public void unsetSuccess() {
-
 
31146
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
31147
    }
-
 
31148
 
-
 
31149
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
31150
    public boolean isSetSuccess() {
-
 
31151
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
31152
    }
-
 
31153
 
-
 
31154
    public void setSuccessIsSet(boolean value) {
-
 
31155
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
31156
    }
-
 
31157
 
-
 
31158
    public TransactionServiceException getEx() {
-
 
31159
      return this.ex;
-
 
31160
    }
-
 
31161
 
-
 
31162
    public acceptDoa_result setEx(TransactionServiceException ex) {
-
 
31163
      this.ex = ex;
-
 
31164
      return this;
-
 
31165
    }
-
 
31166
 
-
 
31167
    public void unsetEx() {
-
 
31168
      this.ex = null;
-
 
31169
    }
-
 
31170
 
-
 
31171
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
31172
    public boolean isSetEx() {
-
 
31173
      return this.ex != null;
-
 
31174
    }
-
 
31175
 
-
 
31176
    public void setExIsSet(boolean value) {
-
 
31177
      if (!value) {
-
 
31178
        this.ex = null;
-
 
31179
      }
-
 
31180
    }
-
 
31181
 
-
 
31182
    public void setFieldValue(_Fields field, Object value) {
-
 
31183
      switch (field) {
-
 
31184
      case SUCCESS:
-
 
31185
        if (value == null) {
-
 
31186
          unsetSuccess();
-
 
31187
        } else {
-
 
31188
          setSuccess((Boolean)value);
-
 
31189
        }
-
 
31190
        break;
-
 
31191
 
-
 
31192
      case EX:
-
 
31193
        if (value == null) {
-
 
31194
          unsetEx();
-
 
31195
        } else {
-
 
31196
          setEx((TransactionServiceException)value);
-
 
31197
        }
-
 
31198
        break;
-
 
31199
 
-
 
31200
      }
-
 
31201
    }
-
 
31202
 
-
 
31203
    public void setFieldValue(int fieldID, Object value) {
-
 
31204
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
31205
    }
-
 
31206
 
-
 
31207
    public Object getFieldValue(_Fields field) {
-
 
31208
      switch (field) {
-
 
31209
      case SUCCESS:
-
 
31210
        return new Boolean(isSuccess());
-
 
31211
 
-
 
31212
      case EX:
-
 
31213
        return getEx();
-
 
31214
 
-
 
31215
      }
-
 
31216
      throw new IllegalStateException();
-
 
31217
    }
-
 
31218
 
-
 
31219
    public Object getFieldValue(int fieldId) {
-
 
31220
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
31221
    }
-
 
31222
 
-
 
31223
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
31224
    public boolean isSet(_Fields field) {
-
 
31225
      switch (field) {
-
 
31226
      case SUCCESS:
-
 
31227
        return isSetSuccess();
-
 
31228
      case EX:
-
 
31229
        return isSetEx();
-
 
31230
      }
-
 
31231
      throw new IllegalStateException();
-
 
31232
    }
-
 
31233
 
-
 
31234
    public boolean isSet(int fieldID) {
-
 
31235
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
31236
    }
-
 
31237
 
-
 
31238
    @Override
-
 
31239
    public boolean equals(Object that) {
-
 
31240
      if (that == null)
-
 
31241
        return false;
-
 
31242
      if (that instanceof acceptDoa_result)
-
 
31243
        return this.equals((acceptDoa_result)that);
-
 
31244
      return false;
-
 
31245
    }
-
 
31246
 
-
 
31247
    public boolean equals(acceptDoa_result that) {
-
 
31248
      if (that == null)
-
 
31249
        return false;
-
 
31250
 
-
 
31251
      boolean this_present_success = true;
-
 
31252
      boolean that_present_success = true;
-
 
31253
      if (this_present_success || that_present_success) {
-
 
31254
        if (!(this_present_success && that_present_success))
-
 
31255
          return false;
-
 
31256
        if (this.success != that.success)
-
 
31257
          return false;
-
 
31258
      }
-
 
31259
 
-
 
31260
      boolean this_present_ex = true && this.isSetEx();
-
 
31261
      boolean that_present_ex = true && that.isSetEx();
-
 
31262
      if (this_present_ex || that_present_ex) {
-
 
31263
        if (!(this_present_ex && that_present_ex))
-
 
31264
          return false;
-
 
31265
        if (!this.ex.equals(that.ex))
-
 
31266
          return false;
-
 
31267
      }
-
 
31268
 
-
 
31269
      return true;
-
 
31270
    }
-
 
31271
 
-
 
31272
    @Override
-
 
31273
    public int hashCode() {
-
 
31274
      return 0;
-
 
31275
    }
-
 
31276
 
-
 
31277
    public int compareTo(acceptDoa_result other) {
-
 
31278
      if (!getClass().equals(other.getClass())) {
-
 
31279
        return getClass().getName().compareTo(other.getClass().getName());
-
 
31280
      }
-
 
31281
 
-
 
31282
      int lastComparison = 0;
-
 
31283
      acceptDoa_result typedOther = (acceptDoa_result)other;
-
 
31284
 
-
 
31285
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
31286
      if (lastComparison != 0) {
-
 
31287
        return lastComparison;
-
 
31288
      }
-
 
31289
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
31290
      if (lastComparison != 0) {
-
 
31291
        return lastComparison;
-
 
31292
      }
-
 
31293
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
31294
      if (lastComparison != 0) {
-
 
31295
        return lastComparison;
-
 
31296
      }
-
 
31297
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
31298
      if (lastComparison != 0) {
-
 
31299
        return lastComparison;
-
 
31300
      }
-
 
31301
      return 0;
-
 
31302
    }
-
 
31303
 
-
 
31304
    public void read(TProtocol iprot) throws TException {
-
 
31305
      TField field;
-
 
31306
      iprot.readStructBegin();
-
 
31307
      while (true)
-
 
31308
      {
-
 
31309
        field = iprot.readFieldBegin();
-
 
31310
        if (field.type == TType.STOP) { 
-
 
31311
          break;
-
 
31312
        }
-
 
31313
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
31314
        if (fieldId == null) {
-
 
31315
          TProtocolUtil.skip(iprot, field.type);
-
 
31316
        } else {
-
 
31317
          switch (fieldId) {
-
 
31318
            case SUCCESS:
-
 
31319
              if (field.type == TType.BOOL) {
-
 
31320
                this.success = iprot.readBool();
-
 
31321
                setSuccessIsSet(true);
-
 
31322
              } else { 
-
 
31323
                TProtocolUtil.skip(iprot, field.type);
-
 
31324
              }
-
 
31325
              break;
-
 
31326
            case EX:
-
 
31327
              if (field.type == TType.STRUCT) {
-
 
31328
                this.ex = new TransactionServiceException();
-
 
31329
                this.ex.read(iprot);
-
 
31330
              } else { 
-
 
31331
                TProtocolUtil.skip(iprot, field.type);
-
 
31332
              }
-
 
31333
              break;
-
 
31334
          }
-
 
31335
          iprot.readFieldEnd();
-
 
31336
        }
-
 
31337
      }
-
 
31338
      iprot.readStructEnd();
-
 
31339
      validate();
-
 
31340
    }
-
 
31341
 
-
 
31342
    public void write(TProtocol oprot) throws TException {
-
 
31343
      oprot.writeStructBegin(STRUCT_DESC);
-
 
31344
 
-
 
31345
      if (this.isSetSuccess()) {
-
 
31346
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
31347
        oprot.writeBool(this.success);
-
 
31348
        oprot.writeFieldEnd();
-
 
31349
      } else if (this.isSetEx()) {
-
 
31350
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
31351
        this.ex.write(oprot);
-
 
31352
        oprot.writeFieldEnd();
-
 
31353
      }
-
 
31354
      oprot.writeFieldStop();
-
 
31355
      oprot.writeStructEnd();
-
 
31356
    }
-
 
31357
 
-
 
31358
    @Override
-
 
31359
    public String toString() {
-
 
31360
      StringBuilder sb = new StringBuilder("acceptDoa_result(");
-
 
31361
      boolean first = true;
-
 
31362
 
-
 
31363
      sb.append("success:");
-
 
31364
      sb.append(this.success);
-
 
31365
      first = false;
-
 
31366
      if (!first) sb.append(", ");
-
 
31367
      sb.append("ex:");
-
 
31368
      if (this.ex == null) {
-
 
31369
        sb.append("null");
-
 
31370
      } else {
-
 
31371
        sb.append(this.ex);
-
 
31372
      }
-
 
31373
      first = false;
-
 
31374
      sb.append(")");
-
 
31375
      return sb.toString();
-
 
31376
    }
-
 
31377
 
-
 
31378
    public void validate() throws TException {
-
 
31379
      // check for required fields
-
 
31380
    }
-
 
31381
 
-
 
31382
  }
-
 
31383
 
-
 
31384
  public static class validateDoa_args implements TBase<validateDoa_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_args>   {
-
 
31385
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_args");
-
 
31386
 
-
 
31387
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
-
 
31388
    private static final TField IS_VALID_FIELD_DESC = new TField("isValid", TType.BOOL, (short)2);
-
 
31389
 
-
 
31390
    private long orderId;
-
 
31391
    private boolean isValid;
-
 
31392
 
-
 
31393
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
31394
    public enum _Fields implements TFieldIdEnum {
-
 
31395
      ORDER_ID((short)1, "orderId"),
-
 
31396
      IS_VALID((short)2, "isValid");
-
 
31397
 
-
 
31398
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
31399
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
31400
 
-
 
31401
      static {
-
 
31402
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
31403
          byId.put((int)field._thriftId, field);
-
 
31404
          byName.put(field.getFieldName(), field);
-
 
31405
        }
-
 
31406
      }
-
 
31407
 
-
 
31408
      /**
-
 
31409
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
31410
       */
-
 
31411
      public static _Fields findByThriftId(int fieldId) {
-
 
31412
        return byId.get(fieldId);
-
 
31413
      }
-
 
31414
 
-
 
31415
      /**
-
 
31416
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
31417
       * if it is not found.
-
 
31418
       */
-
 
31419
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
31420
        _Fields fields = findByThriftId(fieldId);
-
 
31421
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
31422
        return fields;
-
 
31423
      }
-
 
31424
 
-
 
31425
      /**
-
 
31426
       * Find the _Fields constant that matches name, or null if its not found.
-
 
31427
       */
-
 
31428
      public static _Fields findByName(String name) {
-
 
31429
        return byName.get(name);
-
 
31430
      }
-
 
31431
 
-
 
31432
      private final short _thriftId;
-
 
31433
      private final String _fieldName;
-
 
31434
 
-
 
31435
      _Fields(short thriftId, String fieldName) {
-
 
31436
        _thriftId = thriftId;
-
 
31437
        _fieldName = fieldName;
-
 
31438
      }
-
 
31439
 
-
 
31440
      public short getThriftFieldId() {
-
 
31441
        return _thriftId;
-
 
31442
      }
-
 
31443
 
-
 
31444
      public String getFieldName() {
-
 
31445
        return _fieldName;
-
 
31446
      }
-
 
31447
    }
-
 
31448
 
-
 
31449
    // isset id assignments
-
 
31450
    private static final int __ORDERID_ISSET_ID = 0;
-
 
31451
    private static final int __ISVALID_ISSET_ID = 1;
-
 
31452
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
31453
 
-
 
31454
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
31455
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
-
 
31456
          new FieldValueMetaData(TType.I64)));
-
 
31457
      put(_Fields.IS_VALID, new FieldMetaData("isValid", TFieldRequirementType.DEFAULT, 
-
 
31458
          new FieldValueMetaData(TType.BOOL)));
-
 
31459
    }});
-
 
31460
 
-
 
31461
    static {
-
 
31462
      FieldMetaData.addStructMetaDataMap(validateDoa_args.class, metaDataMap);
-
 
31463
    }
-
 
31464
 
-
 
31465
    public validateDoa_args() {
-
 
31466
    }
-
 
31467
 
-
 
31468
    public validateDoa_args(
-
 
31469
      long orderId,
-
 
31470
      boolean isValid)
-
 
31471
    {
-
 
31472
      this();
-
 
31473
      this.orderId = orderId;
-
 
31474
      setOrderIdIsSet(true);
-
 
31475
      this.isValid = isValid;
-
 
31476
      setIsValidIsSet(true);
-
 
31477
    }
-
 
31478
 
-
 
31479
    /**
-
 
31480
     * Performs a deep copy on <i>other</i>.
-
 
31481
     */
-
 
31482
    public validateDoa_args(validateDoa_args other) {
-
 
31483
      __isset_bit_vector.clear();
-
 
31484
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
31485
      this.orderId = other.orderId;
-
 
31486
      this.isValid = other.isValid;
-
 
31487
    }
-
 
31488
 
-
 
31489
    public validateDoa_args deepCopy() {
-
 
31490
      return new validateDoa_args(this);
-
 
31491
    }
-
 
31492
 
-
 
31493
    @Deprecated
-
 
31494
    public validateDoa_args clone() {
-
 
31495
      return new validateDoa_args(this);
-
 
31496
    }
-
 
31497
 
-
 
31498
    public long getOrderId() {
-
 
31499
      return this.orderId;
-
 
31500
    }
-
 
31501
 
-
 
31502
    public validateDoa_args setOrderId(long orderId) {
-
 
31503
      this.orderId = orderId;
-
 
31504
      setOrderIdIsSet(true);
-
 
31505
      return this;
-
 
31506
    }
-
 
31507
 
-
 
31508
    public void unsetOrderId() {
-
 
31509
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
31510
    }
-
 
31511
 
-
 
31512
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
-
 
31513
    public boolean isSetOrderId() {
-
 
31514
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
31515
    }
-
 
31516
 
-
 
31517
    public void setOrderIdIsSet(boolean value) {
-
 
31518
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
31519
    }
-
 
31520
 
-
 
31521
    public boolean isIsValid() {
-
 
31522
      return this.isValid;
-
 
31523
    }
-
 
31524
 
-
 
31525
    public validateDoa_args setIsValid(boolean isValid) {
-
 
31526
      this.isValid = isValid;
-
 
31527
      setIsValidIsSet(true);
-
 
31528
      return this;
-
 
31529
    }
-
 
31530
 
-
 
31531
    public void unsetIsValid() {
-
 
31532
      __isset_bit_vector.clear(__ISVALID_ISSET_ID);
-
 
31533
    }
-
 
31534
 
-
 
31535
    /** Returns true if field isValid is set (has been asigned a value) and false otherwise */
-
 
31536
    public boolean isSetIsValid() {
-
 
31537
      return __isset_bit_vector.get(__ISVALID_ISSET_ID);
-
 
31538
    }
-
 
31539
 
-
 
31540
    public void setIsValidIsSet(boolean value) {
-
 
31541
      __isset_bit_vector.set(__ISVALID_ISSET_ID, value);
-
 
31542
    }
-
 
31543
 
-
 
31544
    public void setFieldValue(_Fields field, Object value) {
-
 
31545
      switch (field) {
-
 
31546
      case ORDER_ID:
-
 
31547
        if (value == null) {
-
 
31548
          unsetOrderId();
-
 
31549
        } else {
-
 
31550
          setOrderId((Long)value);
-
 
31551
        }
-
 
31552
        break;
-
 
31553
 
-
 
31554
      case IS_VALID:
-
 
31555
        if (value == null) {
-
 
31556
          unsetIsValid();
-
 
31557
        } else {
-
 
31558
          setIsValid((Boolean)value);
-
 
31559
        }
-
 
31560
        break;
-
 
31561
 
-
 
31562
      }
-
 
31563
    }
-
 
31564
 
-
 
31565
    public void setFieldValue(int fieldID, Object value) {
-
 
31566
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
31567
    }
-
 
31568
 
-
 
31569
    public Object getFieldValue(_Fields field) {
-
 
31570
      switch (field) {
-
 
31571
      case ORDER_ID:
-
 
31572
        return new Long(getOrderId());
-
 
31573
 
-
 
31574
      case IS_VALID:
-
 
31575
        return new Boolean(isIsValid());
-
 
31576
 
-
 
31577
      }
-
 
31578
      throw new IllegalStateException();
-
 
31579
    }
-
 
31580
 
-
 
31581
    public Object getFieldValue(int fieldId) {
-
 
31582
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
31583
    }
-
 
31584
 
-
 
31585
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
31586
    public boolean isSet(_Fields field) {
-
 
31587
      switch (field) {
-
 
31588
      case ORDER_ID:
-
 
31589
        return isSetOrderId();
-
 
31590
      case IS_VALID:
-
 
31591
        return isSetIsValid();
-
 
31592
      }
-
 
31593
      throw new IllegalStateException();
-
 
31594
    }
-
 
31595
 
-
 
31596
    public boolean isSet(int fieldID) {
-
 
31597
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
31598
    }
-
 
31599
 
-
 
31600
    @Override
-
 
31601
    public boolean equals(Object that) {
-
 
31602
      if (that == null)
-
 
31603
        return false;
-
 
31604
      if (that instanceof validateDoa_args)
-
 
31605
        return this.equals((validateDoa_args)that);
-
 
31606
      return false;
-
 
31607
    }
-
 
31608
 
-
 
31609
    public boolean equals(validateDoa_args that) {
-
 
31610
      if (that == null)
-
 
31611
        return false;
-
 
31612
 
-
 
31613
      boolean this_present_orderId = true;
-
 
31614
      boolean that_present_orderId = true;
-
 
31615
      if (this_present_orderId || that_present_orderId) {
-
 
31616
        if (!(this_present_orderId && that_present_orderId))
-
 
31617
          return false;
-
 
31618
        if (this.orderId != that.orderId)
-
 
31619
          return false;
-
 
31620
      }
-
 
31621
 
-
 
31622
      boolean this_present_isValid = true;
-
 
31623
      boolean that_present_isValid = true;
-
 
31624
      if (this_present_isValid || that_present_isValid) {
-
 
31625
        if (!(this_present_isValid && that_present_isValid))
-
 
31626
          return false;
-
 
31627
        if (this.isValid != that.isValid)
-
 
31628
          return false;
-
 
31629
      }
-
 
31630
 
-
 
31631
      return true;
-
 
31632
    }
-
 
31633
 
-
 
31634
    @Override
-
 
31635
    public int hashCode() {
-
 
31636
      return 0;
-
 
31637
    }
-
 
31638
 
-
 
31639
    public int compareTo(validateDoa_args other) {
-
 
31640
      if (!getClass().equals(other.getClass())) {
-
 
31641
        return getClass().getName().compareTo(other.getClass().getName());
-
 
31642
      }
-
 
31643
 
-
 
31644
      int lastComparison = 0;
-
 
31645
      validateDoa_args typedOther = (validateDoa_args)other;
-
 
31646
 
-
 
31647
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
-
 
31648
      if (lastComparison != 0) {
-
 
31649
        return lastComparison;
-
 
31650
      }
-
 
31651
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
-
 
31652
      if (lastComparison != 0) {
-
 
31653
        return lastComparison;
-
 
31654
      }
-
 
31655
      lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(isSetIsValid());
-
 
31656
      if (lastComparison != 0) {
-
 
31657
        return lastComparison;
-
 
31658
      }
-
 
31659
      lastComparison = TBaseHelper.compareTo(isValid, typedOther.isValid);
-
 
31660
      if (lastComparison != 0) {
-
 
31661
        return lastComparison;
-
 
31662
      }
-
 
31663
      return 0;
-
 
31664
    }
-
 
31665
 
-
 
31666
    public void read(TProtocol iprot) throws TException {
-
 
31667
      TField field;
-
 
31668
      iprot.readStructBegin();
-
 
31669
      while (true)
-
 
31670
      {
-
 
31671
        field = iprot.readFieldBegin();
-
 
31672
        if (field.type == TType.STOP) { 
-
 
31673
          break;
-
 
31674
        }
-
 
31675
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
31676
        if (fieldId == null) {
-
 
31677
          TProtocolUtil.skip(iprot, field.type);
-
 
31678
        } else {
-
 
31679
          switch (fieldId) {
-
 
31680
            case ORDER_ID:
-
 
31681
              if (field.type == TType.I64) {
-
 
31682
                this.orderId = iprot.readI64();
-
 
31683
                setOrderIdIsSet(true);
-
 
31684
              } else { 
-
 
31685
                TProtocolUtil.skip(iprot, field.type);
-
 
31686
              }
-
 
31687
              break;
-
 
31688
            case IS_VALID:
-
 
31689
              if (field.type == TType.BOOL) {
-
 
31690
                this.isValid = iprot.readBool();
-
 
31691
                setIsValidIsSet(true);
-
 
31692
              } else { 
-
 
31693
                TProtocolUtil.skip(iprot, field.type);
-
 
31694
              }
-
 
31695
              break;
-
 
31696
          }
-
 
31697
          iprot.readFieldEnd();
-
 
31698
        }
-
 
31699
      }
-
 
31700
      iprot.readStructEnd();
-
 
31701
      validate();
-
 
31702
    }
-
 
31703
 
-
 
31704
    public void write(TProtocol oprot) throws TException {
-
 
31705
      validate();
-
 
31706
 
-
 
31707
      oprot.writeStructBegin(STRUCT_DESC);
-
 
31708
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
31709
      oprot.writeI64(this.orderId);
-
 
31710
      oprot.writeFieldEnd();
-
 
31711
      oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
-
 
31712
      oprot.writeBool(this.isValid);
-
 
31713
      oprot.writeFieldEnd();
-
 
31714
      oprot.writeFieldStop();
-
 
31715
      oprot.writeStructEnd();
-
 
31716
    }
-
 
31717
 
-
 
31718
    @Override
-
 
31719
    public String toString() {
-
 
31720
      StringBuilder sb = new StringBuilder("validateDoa_args(");
-
 
31721
      boolean first = true;
-
 
31722
 
-
 
31723
      sb.append("orderId:");
-
 
31724
      sb.append(this.orderId);
-
 
31725
      first = false;
-
 
31726
      if (!first) sb.append(", ");
-
 
31727
      sb.append("isValid:");
-
 
31728
      sb.append(this.isValid);
-
 
31729
      first = false;
-
 
31730
      sb.append(")");
-
 
31731
      return sb.toString();
-
 
31732
    }
-
 
31733
 
-
 
31734
    public void validate() throws TException {
-
 
31735
      // check for required fields
-
 
31736
    }
-
 
31737
 
-
 
31738
  }
-
 
31739
 
-
 
31740
  public static class validateDoa_result implements TBase<validateDoa_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_result>   {
-
 
31741
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_result");
-
 
31742
 
-
 
31743
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
31744
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
31745
 
-
 
31746
    private boolean success;
-
 
31747
    private TransactionServiceException ex;
-
 
31748
 
-
 
31749
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
31750
    public enum _Fields implements TFieldIdEnum {
-
 
31751
      SUCCESS((short)0, "success"),
-
 
31752
      EX((short)1, "ex");
-
 
31753
 
-
 
31754
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
31755
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
31756
 
-
 
31757
      static {
-
 
31758
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
31759
          byId.put((int)field._thriftId, field);
-
 
31760
          byName.put(field.getFieldName(), field);
-
 
31761
        }
-
 
31762
      }
-
 
31763
 
-
 
31764
      /**
-
 
31765
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
31766
       */
-
 
31767
      public static _Fields findByThriftId(int fieldId) {
-
 
31768
        return byId.get(fieldId);
-
 
31769
      }
-
 
31770
 
-
 
31771
      /**
-
 
31772
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
31773
       * if it is not found.
-
 
31774
       */
-
 
31775
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
31776
        _Fields fields = findByThriftId(fieldId);
-
 
31777
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
31778
        return fields;
-
 
31779
      }
-
 
31780
 
-
 
31781
      /**
-
 
31782
       * Find the _Fields constant that matches name, or null if its not found.
-
 
31783
       */
-
 
31784
      public static _Fields findByName(String name) {
-
 
31785
        return byName.get(name);
-
 
31786
      }
-
 
31787
 
-
 
31788
      private final short _thriftId;
-
 
31789
      private final String _fieldName;
-
 
31790
 
-
 
31791
      _Fields(short thriftId, String fieldName) {
-
 
31792
        _thriftId = thriftId;
-
 
31793
        _fieldName = fieldName;
-
 
31794
      }
-
 
31795
 
-
 
31796
      public short getThriftFieldId() {
-
 
31797
        return _thriftId;
-
 
31798
      }
-
 
31799
 
-
 
31800
      public String getFieldName() {
-
 
31801
        return _fieldName;
-
 
31802
      }
-
 
31803
    }
-
 
31804
 
-
 
31805
    // isset id assignments
-
 
31806
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
31807
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
31808
 
-
 
31809
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
31810
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
31811
          new FieldValueMetaData(TType.BOOL)));
-
 
31812
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
31813
          new FieldValueMetaData(TType.STRUCT)));
-
 
31814
    }});
-
 
31815
 
-
 
31816
    static {
-
 
31817
      FieldMetaData.addStructMetaDataMap(validateDoa_result.class, metaDataMap);
-
 
31818
    }
-
 
31819
 
-
 
31820
    public validateDoa_result() {
-
 
31821
    }
-
 
31822
 
-
 
31823
    public validateDoa_result(
-
 
31824
      boolean success,
-
 
31825
      TransactionServiceException ex)
-
 
31826
    {
-
 
31827
      this();
-
 
31828
      this.success = success;
-
 
31829
      setSuccessIsSet(true);
-
 
31830
      this.ex = ex;
-
 
31831
    }
-
 
31832
 
-
 
31833
    /**
-
 
31834
     * Performs a deep copy on <i>other</i>.
-
 
31835
     */
-
 
31836
    public validateDoa_result(validateDoa_result other) {
-
 
31837
      __isset_bit_vector.clear();
-
 
31838
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
31839
      this.success = other.success;
-
 
31840
      if (other.isSetEx()) {
-
 
31841
        this.ex = new TransactionServiceException(other.ex);
-
 
31842
      }
-
 
31843
    }
-
 
31844
 
-
 
31845
    public validateDoa_result deepCopy() {
-
 
31846
      return new validateDoa_result(this);
-
 
31847
    }
-
 
31848
 
-
 
31849
    @Deprecated
-
 
31850
    public validateDoa_result clone() {
-
 
31851
      return new validateDoa_result(this);
-
 
31852
    }
-
 
31853
 
-
 
31854
    public boolean isSuccess() {
-
 
31855
      return this.success;
-
 
31856
    }
-
 
31857
 
-
 
31858
    public validateDoa_result setSuccess(boolean success) {
-
 
31859
      this.success = success;
-
 
31860
      setSuccessIsSet(true);
-
 
31861
      return this;
-
 
31862
    }
-
 
31863
 
-
 
31864
    public void unsetSuccess() {
-
 
31865
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
31866
    }
-
 
31867
 
-
 
31868
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
31869
    public boolean isSetSuccess() {
-
 
31870
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
31871
    }
-
 
31872
 
-
 
31873
    public void setSuccessIsSet(boolean value) {
-
 
31874
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
31875
    }
-
 
31876
 
-
 
31877
    public TransactionServiceException getEx() {
-
 
31878
      return this.ex;
-
 
31879
    }
-
 
31880
 
-
 
31881
    public validateDoa_result setEx(TransactionServiceException ex) {
-
 
31882
      this.ex = ex;
-
 
31883
      return this;
-
 
31884
    }
-
 
31885
 
-
 
31886
    public void unsetEx() {
-
 
31887
      this.ex = null;
-
 
31888
    }
-
 
31889
 
-
 
31890
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
31891
    public boolean isSetEx() {
-
 
31892
      return this.ex != null;
-
 
31893
    }
-
 
31894
 
-
 
31895
    public void setExIsSet(boolean value) {
-
 
31896
      if (!value) {
-
 
31897
        this.ex = null;
-
 
31898
      }
-
 
31899
    }
-
 
31900
 
-
 
31901
    public void setFieldValue(_Fields field, Object value) {
-
 
31902
      switch (field) {
-
 
31903
      case SUCCESS:
-
 
31904
        if (value == null) {
-
 
31905
          unsetSuccess();
-
 
31906
        } else {
-
 
31907
          setSuccess((Boolean)value);
-
 
31908
        }
-
 
31909
        break;
-
 
31910
 
-
 
31911
      case EX:
-
 
31912
        if (value == null) {
-
 
31913
          unsetEx();
-
 
31914
        } else {
-
 
31915
          setEx((TransactionServiceException)value);
-
 
31916
        }
-
 
31917
        break;
-
 
31918
 
-
 
31919
      }
-
 
31920
    }
-
 
31921
 
-
 
31922
    public void setFieldValue(int fieldID, Object value) {
-
 
31923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
31924
    }
-
 
31925
 
-
 
31926
    public Object getFieldValue(_Fields field) {
-
 
31927
      switch (field) {
-
 
31928
      case SUCCESS:
-
 
31929
        return new Boolean(isSuccess());
-
 
31930
 
-
 
31931
      case EX:
-
 
31932
        return getEx();
-
 
31933
 
-
 
31934
      }
-
 
31935
      throw new IllegalStateException();
-
 
31936
    }
-
 
31937
 
-
 
31938
    public Object getFieldValue(int fieldId) {
-
 
31939
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
31940
    }
-
 
31941
 
-
 
31942
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
31943
    public boolean isSet(_Fields field) {
-
 
31944
      switch (field) {
-
 
31945
      case SUCCESS:
-
 
31946
        return isSetSuccess();
-
 
31947
      case EX:
-
 
31948
        return isSetEx();
-
 
31949
      }
-
 
31950
      throw new IllegalStateException();
-
 
31951
    }
-
 
31952
 
-
 
31953
    public boolean isSet(int fieldID) {
-
 
31954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
31955
    }
-
 
31956
 
-
 
31957
    @Override
-
 
31958
    public boolean equals(Object that) {
-
 
31959
      if (that == null)
-
 
31960
        return false;
-
 
31961
      if (that instanceof validateDoa_result)
-
 
31962
        return this.equals((validateDoa_result)that);
-
 
31963
      return false;
-
 
31964
    }
-
 
31965
 
-
 
31966
    public boolean equals(validateDoa_result that) {
-
 
31967
      if (that == null)
-
 
31968
        return false;
-
 
31969
 
-
 
31970
      boolean this_present_success = true;
-
 
31971
      boolean that_present_success = true;
-
 
31972
      if (this_present_success || that_present_success) {
-
 
31973
        if (!(this_present_success && that_present_success))
-
 
31974
          return false;
-
 
31975
        if (this.success != that.success)
-
 
31976
          return false;
-
 
31977
      }
-
 
31978
 
-
 
31979
      boolean this_present_ex = true && this.isSetEx();
-
 
31980
      boolean that_present_ex = true && that.isSetEx();
-
 
31981
      if (this_present_ex || that_present_ex) {
-
 
31982
        if (!(this_present_ex && that_present_ex))
-
 
31983
          return false;
-
 
31984
        if (!this.ex.equals(that.ex))
-
 
31985
          return false;
-
 
31986
      }
-
 
31987
 
-
 
31988
      return true;
-
 
31989
    }
-
 
31990
 
-
 
31991
    @Override
-
 
31992
    public int hashCode() {
-
 
31993
      return 0;
-
 
31994
    }
-
 
31995
 
-
 
31996
    public int compareTo(validateDoa_result other) {
-
 
31997
      if (!getClass().equals(other.getClass())) {
-
 
31998
        return getClass().getName().compareTo(other.getClass().getName());
-
 
31999
      }
-
 
32000
 
-
 
32001
      int lastComparison = 0;
-
 
32002
      validateDoa_result typedOther = (validateDoa_result)other;
-
 
32003
 
-
 
32004
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
32005
      if (lastComparison != 0) {
-
 
32006
        return lastComparison;
-
 
32007
      }
-
 
32008
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
32009
      if (lastComparison != 0) {
-
 
32010
        return lastComparison;
-
 
32011
      }
-
 
32012
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
32013
      if (lastComparison != 0) {
-
 
32014
        return lastComparison;
-
 
32015
      }
-
 
32016
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
32017
      if (lastComparison != 0) {
-
 
32018
        return lastComparison;
-
 
32019
      }
-
 
32020
      return 0;
-
 
32021
    }
-
 
32022
 
-
 
32023
    public void read(TProtocol iprot) throws TException {
-
 
32024
      TField field;
-
 
32025
      iprot.readStructBegin();
-
 
32026
      while (true)
-
 
32027
      {
-
 
32028
        field = iprot.readFieldBegin();
-
 
32029
        if (field.type == TType.STOP) { 
-
 
32030
          break;
-
 
32031
        }
-
 
32032
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
32033
        if (fieldId == null) {
-
 
32034
          TProtocolUtil.skip(iprot, field.type);
-
 
32035
        } else {
-
 
32036
          switch (fieldId) {
-
 
32037
            case SUCCESS:
-
 
32038
              if (field.type == TType.BOOL) {
-
 
32039
                this.success = iprot.readBool();
-
 
32040
                setSuccessIsSet(true);
-
 
32041
              } else { 
-
 
32042
                TProtocolUtil.skip(iprot, field.type);
-
 
32043
              }
-
 
32044
              break;
-
 
32045
            case EX:
-
 
32046
              if (field.type == TType.STRUCT) {
-
 
32047
                this.ex = new TransactionServiceException();
-
 
32048
                this.ex.read(iprot);
-
 
32049
              } else { 
-
 
32050
                TProtocolUtil.skip(iprot, field.type);
-
 
32051
              }
-
 
32052
              break;
-
 
32053
          }
-
 
32054
          iprot.readFieldEnd();
-
 
32055
        }
-
 
32056
      }
-
 
32057
      iprot.readStructEnd();
-
 
32058
      validate();
-
 
32059
    }
-
 
32060
 
-
 
32061
    public void write(TProtocol oprot) throws TException {
-
 
32062
      oprot.writeStructBegin(STRUCT_DESC);
-
 
32063
 
-
 
32064
      if (this.isSetSuccess()) {
-
 
32065
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
32066
        oprot.writeBool(this.success);
-
 
32067
        oprot.writeFieldEnd();
-
 
32068
      } else if (this.isSetEx()) {
-
 
32069
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
32070
        this.ex.write(oprot);
-
 
32071
        oprot.writeFieldEnd();
-
 
32072
      }
-
 
32073
      oprot.writeFieldStop();
-
 
32074
      oprot.writeStructEnd();
-
 
32075
    }
-
 
32076
 
-
 
32077
    @Override
-
 
32078
    public String toString() {
-
 
32079
      StringBuilder sb = new StringBuilder("validateDoa_result(");
-
 
32080
      boolean first = true;
-
 
32081
 
-
 
32082
      sb.append("success:");
-
 
32083
      sb.append(this.success);
-
 
32084
      first = false;
30571
      if (!first) sb.append(", ");
32085
      if (!first) sb.append(", ");
30572
      sb.append("ex:");
32086
      sb.append("ex:");
30573
      if (this.ex == null) {
32087
      if (this.ex == null) {
30574
        sb.append("null");
32088
        sb.append("null");
30575
      } else {
32089
      } else {