Subversion Repositories SmartDukaan

Rev

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

Rev 1148 Rev 1209
Line 88... Line 88...
88
    public Order getOrder(long id) throws TransactionServiceException, TException;
88
    public Order getOrder(long id) throws TransactionServiceException, TException;
89
 
89
 
90
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
90
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
91
 
91
 
92
    /**
92
    /**
-
 
93
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
-
 
94
     * 
-
 
95
     * 
-
 
96
     * @param orderId
-
 
97
     */
-
 
98
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
-
 
99
 
-
 
100
    /**
93
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
101
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
94
     * 
102
     * 
95
     * @param warehouseId
103
     * @param warehouseId
96
     * @param providerId
104
     * @param providerId
97
     */
105
     */
Line 853... Line 861...
853
        throw result.ex;
861
        throw result.ex;
854
      }
862
      }
855
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
863
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
856
    }
864
    }
857
 
865
 
-
 
866
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
-
 
867
    {
-
 
868
      send_markOrderAsOutOfStock(orderId);
-
 
869
      return recv_markOrderAsOutOfStock();
-
 
870
    }
-
 
871
 
-
 
872
    public void send_markOrderAsOutOfStock(long orderId) throws TException
-
 
873
    {
-
 
874
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
-
 
875
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
-
 
876
      args.orderId = orderId;
-
 
877
      args.write(oprot_);
-
 
878
      oprot_.writeMessageEnd();
-
 
879
      oprot_.getTransport().flush();
-
 
880
    }
-
 
881
 
-
 
882
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
-
 
883
    {
-
 
884
      TMessage msg = iprot_.readMessageBegin();
-
 
885
      if (msg.type == TMessageType.EXCEPTION) {
-
 
886
        TApplicationException x = TApplicationException.read(iprot_);
-
 
887
        iprot_.readMessageEnd();
-
 
888
        throw x;
-
 
889
      }
-
 
890
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
-
 
891
      result.read(iprot_);
-
 
892
      iprot_.readMessageEnd();
-
 
893
      if (result.isSetSuccess()) {
-
 
894
        return result.success;
-
 
895
      }
-
 
896
      if (result.ex != null) {
-
 
897
        throw result.ex;
-
 
898
      }
-
 
899
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
-
 
900
    }
-
 
901
 
858
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
902
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
859
    {
903
    {
860
      send_markOrdersAsManifested(warehouseId, providerId);
904
      send_markOrdersAsManifested(warehouseId, providerId);
861
      return recv_markOrdersAsManifested();
905
      return recv_markOrdersAsManifested();
862
    }
906
    }
Line 1087... Line 1131...
1087
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1131
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1088
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1132
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1089
      processMap_.put("createOrder", new createOrder());
1133
      processMap_.put("createOrder", new createOrder());
1090
      processMap_.put("getOrder", new getOrder());
1134
      processMap_.put("getOrder", new getOrder());
1091
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1135
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
-
 
1136
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
1092
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1137
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1093
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1138
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1094
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1139
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1095
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1140
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1096
      processMap_.put("getAlerts", new getAlerts());
1141
      processMap_.put("getAlerts", new getAlerts());
Line 1648... Line 1693...
1648
        oprot.getTransport().flush();
1693
        oprot.getTransport().flush();
1649
      }
1694
      }
1650
 
1695
 
1651
    }
1696
    }
1652
 
1697
 
-
 
1698
    private class markOrderAsOutOfStock implements ProcessFunction {
-
 
1699
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
1700
      {
-
 
1701
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
-
 
1702
        args.read(iprot);
-
 
1703
        iprot.readMessageEnd();
-
 
1704
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
-
 
1705
        try {
-
 
1706
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
-
 
1707
          result.setSuccessIsSet(true);
-
 
1708
        } catch (TransactionServiceException ex) {
-
 
1709
          result.ex = ex;
-
 
1710
        } catch (Throwable th) {
-
 
1711
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
-
 
1712
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
-
 
1713
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
-
 
1714
          x.write(oprot);
-
 
1715
          oprot.writeMessageEnd();
-
 
1716
          oprot.getTransport().flush();
-
 
1717
          return;
-
 
1718
        }
-
 
1719
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
-
 
1720
        result.write(oprot);
-
 
1721
        oprot.writeMessageEnd();
-
 
1722
        oprot.getTransport().flush();
-
 
1723
      }
-
 
1724
 
-
 
1725
    }
-
 
1726
 
1653
    private class markOrdersAsManifested implements ProcessFunction {
1727
    private class markOrdersAsManifested implements ProcessFunction {
1654
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1728
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1655
      {
1729
      {
1656
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1730
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1657
        args.read(iprot);
1731
        args.read(iprot);
Line 15668... Line 15742...
15668
      first = false;
15742
      first = false;
15669
      if (!first) sb.append(", ");
15743
      if (!first) sb.append(", ");
15670
      sb.append("ex:");
15744
      sb.append("ex:");
15671
      if (this.ex == null) {
15745
      if (this.ex == null) {
15672
        sb.append("null");
15746
        sb.append("null");
-
 
15747
      } else {
-
 
15748
        sb.append(this.ex);
-
 
15749
      }
-
 
15750
      first = false;
-
 
15751
      sb.append(")");
-
 
15752
      return sb.toString();
-
 
15753
    }
-
 
15754
 
-
 
15755
    public void validate() throws TException {
-
 
15756
      // check for required fields
-
 
15757
    }
-
 
15758
 
-
 
15759
  }
-
 
15760
 
-
 
15761
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
-
 
15762
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
-
 
15763
 
-
 
15764
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
-
 
15765
 
-
 
15766
    private long orderId;
-
 
15767
 
-
 
15768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
15769
    public enum _Fields implements TFieldIdEnum {
-
 
15770
      ORDER_ID((short)1, "orderId");
-
 
15771
 
-
 
15772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
15773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
15774
 
-
 
15775
      static {
-
 
15776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
15777
          byId.put((int)field._thriftId, field);
-
 
15778
          byName.put(field.getFieldName(), field);
-
 
15779
        }
-
 
15780
      }
-
 
15781
 
-
 
15782
      /**
-
 
15783
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
15784
       */
-
 
15785
      public static _Fields findByThriftId(int fieldId) {
-
 
15786
        return byId.get(fieldId);
-
 
15787
      }
-
 
15788
 
-
 
15789
      /**
-
 
15790
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
15791
       * if it is not found.
-
 
15792
       */
-
 
15793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
15794
        _Fields fields = findByThriftId(fieldId);
-
 
15795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
15796
        return fields;
-
 
15797
      }
-
 
15798
 
-
 
15799
      /**
-
 
15800
       * Find the _Fields constant that matches name, or null if its not found.
-
 
15801
       */
-
 
15802
      public static _Fields findByName(String name) {
-
 
15803
        return byName.get(name);
-
 
15804
      }
-
 
15805
 
-
 
15806
      private final short _thriftId;
-
 
15807
      private final String _fieldName;
-
 
15808
 
-
 
15809
      _Fields(short thriftId, String fieldName) {
-
 
15810
        _thriftId = thriftId;
-
 
15811
        _fieldName = fieldName;
-
 
15812
      }
-
 
15813
 
-
 
15814
      public short getThriftFieldId() {
-
 
15815
        return _thriftId;
-
 
15816
      }
-
 
15817
 
-
 
15818
      public String getFieldName() {
-
 
15819
        return _fieldName;
-
 
15820
      }
-
 
15821
    }
-
 
15822
 
-
 
15823
    // isset id assignments
-
 
15824
    private static final int __ORDERID_ISSET_ID = 0;
-
 
15825
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
15826
 
-
 
15827
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
15828
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
-
 
15829
          new FieldValueMetaData(TType.I64)));
-
 
15830
    }});
-
 
15831
 
-
 
15832
    static {
-
 
15833
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
-
 
15834
    }
-
 
15835
 
-
 
15836
    public markOrderAsOutOfStock_args() {
-
 
15837
    }
-
 
15838
 
-
 
15839
    public markOrderAsOutOfStock_args(
-
 
15840
      long orderId)
-
 
15841
    {
-
 
15842
      this();
-
 
15843
      this.orderId = orderId;
-
 
15844
      setOrderIdIsSet(true);
-
 
15845
    }
-
 
15846
 
-
 
15847
    /**
-
 
15848
     * Performs a deep copy on <i>other</i>.
-
 
15849
     */
-
 
15850
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
-
 
15851
      __isset_bit_vector.clear();
-
 
15852
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
15853
      this.orderId = other.orderId;
-
 
15854
    }
-
 
15855
 
-
 
15856
    public markOrderAsOutOfStock_args deepCopy() {
-
 
15857
      return new markOrderAsOutOfStock_args(this);
-
 
15858
    }
-
 
15859
 
-
 
15860
    @Deprecated
-
 
15861
    public markOrderAsOutOfStock_args clone() {
-
 
15862
      return new markOrderAsOutOfStock_args(this);
-
 
15863
    }
-
 
15864
 
-
 
15865
    public long getOrderId() {
-
 
15866
      return this.orderId;
-
 
15867
    }
-
 
15868
 
-
 
15869
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
-
 
15870
      this.orderId = orderId;
-
 
15871
      setOrderIdIsSet(true);
-
 
15872
      return this;
-
 
15873
    }
-
 
15874
 
-
 
15875
    public void unsetOrderId() {
-
 
15876
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
15877
    }
-
 
15878
 
-
 
15879
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
-
 
15880
    public boolean isSetOrderId() {
-
 
15881
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
15882
    }
-
 
15883
 
-
 
15884
    public void setOrderIdIsSet(boolean value) {
-
 
15885
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
15886
    }
-
 
15887
 
-
 
15888
    public void setFieldValue(_Fields field, Object value) {
-
 
15889
      switch (field) {
-
 
15890
      case ORDER_ID:
-
 
15891
        if (value == null) {
-
 
15892
          unsetOrderId();
-
 
15893
        } else {
-
 
15894
          setOrderId((Long)value);
-
 
15895
        }
-
 
15896
        break;
-
 
15897
 
-
 
15898
      }
-
 
15899
    }
-
 
15900
 
-
 
15901
    public void setFieldValue(int fieldID, Object value) {
-
 
15902
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
15903
    }
-
 
15904
 
-
 
15905
    public Object getFieldValue(_Fields field) {
-
 
15906
      switch (field) {
-
 
15907
      case ORDER_ID:
-
 
15908
        return new Long(getOrderId());
-
 
15909
 
-
 
15910
      }
-
 
15911
      throw new IllegalStateException();
-
 
15912
    }
-
 
15913
 
-
 
15914
    public Object getFieldValue(int fieldId) {
-
 
15915
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
15916
    }
-
 
15917
 
-
 
15918
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
15919
    public boolean isSet(_Fields field) {
-
 
15920
      switch (field) {
-
 
15921
      case ORDER_ID:
-
 
15922
        return isSetOrderId();
-
 
15923
      }
-
 
15924
      throw new IllegalStateException();
-
 
15925
    }
-
 
15926
 
-
 
15927
    public boolean isSet(int fieldID) {
-
 
15928
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
15929
    }
-
 
15930
 
-
 
15931
    @Override
-
 
15932
    public boolean equals(Object that) {
-
 
15933
      if (that == null)
-
 
15934
        return false;
-
 
15935
      if (that instanceof markOrderAsOutOfStock_args)
-
 
15936
        return this.equals((markOrderAsOutOfStock_args)that);
-
 
15937
      return false;
-
 
15938
    }
-
 
15939
 
-
 
15940
    public boolean equals(markOrderAsOutOfStock_args that) {
-
 
15941
      if (that == null)
-
 
15942
        return false;
-
 
15943
 
-
 
15944
      boolean this_present_orderId = true;
-
 
15945
      boolean that_present_orderId = true;
-
 
15946
      if (this_present_orderId || that_present_orderId) {
-
 
15947
        if (!(this_present_orderId && that_present_orderId))
-
 
15948
          return false;
-
 
15949
        if (this.orderId != that.orderId)
-
 
15950
          return false;
-
 
15951
      }
-
 
15952
 
-
 
15953
      return true;
-
 
15954
    }
-
 
15955
 
-
 
15956
    @Override
-
 
15957
    public int hashCode() {
-
 
15958
      return 0;
-
 
15959
    }
-
 
15960
 
-
 
15961
    public int compareTo(markOrderAsOutOfStock_args other) {
-
 
15962
      if (!getClass().equals(other.getClass())) {
-
 
15963
        return getClass().getName().compareTo(other.getClass().getName());
-
 
15964
      }
-
 
15965
 
-
 
15966
      int lastComparison = 0;
-
 
15967
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
-
 
15968
 
-
 
15969
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
-
 
15970
      if (lastComparison != 0) {
-
 
15971
        return lastComparison;
-
 
15972
      }
-
 
15973
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
-
 
15974
      if (lastComparison != 0) {
-
 
15975
        return lastComparison;
-
 
15976
      }
-
 
15977
      return 0;
-
 
15978
    }
-
 
15979
 
-
 
15980
    public void read(TProtocol iprot) throws TException {
-
 
15981
      TField field;
-
 
15982
      iprot.readStructBegin();
-
 
15983
      while (true)
-
 
15984
      {
-
 
15985
        field = iprot.readFieldBegin();
-
 
15986
        if (field.type == TType.STOP) { 
-
 
15987
          break;
-
 
15988
        }
-
 
15989
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
15990
        if (fieldId == null) {
-
 
15991
          TProtocolUtil.skip(iprot, field.type);
-
 
15992
        } else {
-
 
15993
          switch (fieldId) {
-
 
15994
            case ORDER_ID:
-
 
15995
              if (field.type == TType.I64) {
-
 
15996
                this.orderId = iprot.readI64();
-
 
15997
                setOrderIdIsSet(true);
-
 
15998
              } else { 
-
 
15999
                TProtocolUtil.skip(iprot, field.type);
-
 
16000
              }
-
 
16001
              break;
-
 
16002
          }
-
 
16003
          iprot.readFieldEnd();
-
 
16004
        }
-
 
16005
      }
-
 
16006
      iprot.readStructEnd();
-
 
16007
      validate();
-
 
16008
    }
-
 
16009
 
-
 
16010
    public void write(TProtocol oprot) throws TException {
-
 
16011
      validate();
-
 
16012
 
-
 
16013
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16014
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
16015
      oprot.writeI64(this.orderId);
-
 
16016
      oprot.writeFieldEnd();
-
 
16017
      oprot.writeFieldStop();
-
 
16018
      oprot.writeStructEnd();
-
 
16019
    }
-
 
16020
 
-
 
16021
    @Override
-
 
16022
    public String toString() {
-
 
16023
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
-
 
16024
      boolean first = true;
-
 
16025
 
-
 
16026
      sb.append("orderId:");
-
 
16027
      sb.append(this.orderId);
-
 
16028
      first = false;
-
 
16029
      sb.append(")");
-
 
16030
      return sb.toString();
-
 
16031
    }
-
 
16032
 
-
 
16033
    public void validate() throws TException {
-
 
16034
      // check for required fields
-
 
16035
    }
-
 
16036
 
-
 
16037
  }
-
 
16038
 
-
 
16039
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
-
 
16040
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
-
 
16041
 
-
 
16042
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
16043
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
16044
 
-
 
16045
    private boolean success;
-
 
16046
    private TransactionServiceException ex;
-
 
16047
 
-
 
16048
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
16049
    public enum _Fields implements TFieldIdEnum {
-
 
16050
      SUCCESS((short)0, "success"),
-
 
16051
      EX((short)1, "ex");
-
 
16052
 
-
 
16053
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
16054
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
16055
 
-
 
16056
      static {
-
 
16057
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
16058
          byId.put((int)field._thriftId, field);
-
 
16059
          byName.put(field.getFieldName(), field);
-
 
16060
        }
-
 
16061
      }
-
 
16062
 
-
 
16063
      /**
-
 
16064
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
16065
       */
-
 
16066
      public static _Fields findByThriftId(int fieldId) {
-
 
16067
        return byId.get(fieldId);
-
 
16068
      }
-
 
16069
 
-
 
16070
      /**
-
 
16071
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
16072
       * if it is not found.
-
 
16073
       */
-
 
16074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
16075
        _Fields fields = findByThriftId(fieldId);
-
 
16076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
16077
        return fields;
-
 
16078
      }
-
 
16079
 
-
 
16080
      /**
-
 
16081
       * Find the _Fields constant that matches name, or null if its not found.
-
 
16082
       */
-
 
16083
      public static _Fields findByName(String name) {
-
 
16084
        return byName.get(name);
-
 
16085
      }
-
 
16086
 
-
 
16087
      private final short _thriftId;
-
 
16088
      private final String _fieldName;
-
 
16089
 
-
 
16090
      _Fields(short thriftId, String fieldName) {
-
 
16091
        _thriftId = thriftId;
-
 
16092
        _fieldName = fieldName;
-
 
16093
      }
-
 
16094
 
-
 
16095
      public short getThriftFieldId() {
-
 
16096
        return _thriftId;
-
 
16097
      }
-
 
16098
 
-
 
16099
      public String getFieldName() {
-
 
16100
        return _fieldName;
-
 
16101
      }
-
 
16102
    }
-
 
16103
 
-
 
16104
    // isset id assignments
-
 
16105
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
16106
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
16107
 
-
 
16108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
16109
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
16110
          new FieldValueMetaData(TType.BOOL)));
-
 
16111
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
16112
          new FieldValueMetaData(TType.STRUCT)));
-
 
16113
    }});
-
 
16114
 
-
 
16115
    static {
-
 
16116
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
-
 
16117
    }
-
 
16118
 
-
 
16119
    public markOrderAsOutOfStock_result() {
-
 
16120
    }
-
 
16121
 
-
 
16122
    public markOrderAsOutOfStock_result(
-
 
16123
      boolean success,
-
 
16124
      TransactionServiceException ex)
-
 
16125
    {
-
 
16126
      this();
-
 
16127
      this.success = success;
-
 
16128
      setSuccessIsSet(true);
-
 
16129
      this.ex = ex;
-
 
16130
    }
-
 
16131
 
-
 
16132
    /**
-
 
16133
     * Performs a deep copy on <i>other</i>.
-
 
16134
     */
-
 
16135
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
-
 
16136
      __isset_bit_vector.clear();
-
 
16137
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
16138
      this.success = other.success;
-
 
16139
      if (other.isSetEx()) {
-
 
16140
        this.ex = new TransactionServiceException(other.ex);
-
 
16141
      }
-
 
16142
    }
-
 
16143
 
-
 
16144
    public markOrderAsOutOfStock_result deepCopy() {
-
 
16145
      return new markOrderAsOutOfStock_result(this);
-
 
16146
    }
-
 
16147
 
-
 
16148
    @Deprecated
-
 
16149
    public markOrderAsOutOfStock_result clone() {
-
 
16150
      return new markOrderAsOutOfStock_result(this);
-
 
16151
    }
-
 
16152
 
-
 
16153
    public boolean isSuccess() {
-
 
16154
      return this.success;
-
 
16155
    }
-
 
16156
 
-
 
16157
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
-
 
16158
      this.success = success;
-
 
16159
      setSuccessIsSet(true);
-
 
16160
      return this;
-
 
16161
    }
-
 
16162
 
-
 
16163
    public void unsetSuccess() {
-
 
16164
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
16165
    }
-
 
16166
 
-
 
16167
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
16168
    public boolean isSetSuccess() {
-
 
16169
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
16170
    }
-
 
16171
 
-
 
16172
    public void setSuccessIsSet(boolean value) {
-
 
16173
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
16174
    }
-
 
16175
 
-
 
16176
    public TransactionServiceException getEx() {
-
 
16177
      return this.ex;
-
 
16178
    }
-
 
16179
 
-
 
16180
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
-
 
16181
      this.ex = ex;
-
 
16182
      return this;
-
 
16183
    }
-
 
16184
 
-
 
16185
    public void unsetEx() {
-
 
16186
      this.ex = null;
-
 
16187
    }
-
 
16188
 
-
 
16189
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
16190
    public boolean isSetEx() {
-
 
16191
      return this.ex != null;
-
 
16192
    }
-
 
16193
 
-
 
16194
    public void setExIsSet(boolean value) {
-
 
16195
      if (!value) {
-
 
16196
        this.ex = null;
-
 
16197
      }
-
 
16198
    }
-
 
16199
 
-
 
16200
    public void setFieldValue(_Fields field, Object value) {
-
 
16201
      switch (field) {
-
 
16202
      case SUCCESS:
-
 
16203
        if (value == null) {
-
 
16204
          unsetSuccess();
-
 
16205
        } else {
-
 
16206
          setSuccess((Boolean)value);
-
 
16207
        }
-
 
16208
        break;
-
 
16209
 
-
 
16210
      case EX:
-
 
16211
        if (value == null) {
-
 
16212
          unsetEx();
-
 
16213
        } else {
-
 
16214
          setEx((TransactionServiceException)value);
-
 
16215
        }
-
 
16216
        break;
-
 
16217
 
-
 
16218
      }
-
 
16219
    }
-
 
16220
 
-
 
16221
    public void setFieldValue(int fieldID, Object value) {
-
 
16222
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
16223
    }
-
 
16224
 
-
 
16225
    public Object getFieldValue(_Fields field) {
-
 
16226
      switch (field) {
-
 
16227
      case SUCCESS:
-
 
16228
        return new Boolean(isSuccess());
-
 
16229
 
-
 
16230
      case EX:
-
 
16231
        return getEx();
-
 
16232
 
-
 
16233
      }
-
 
16234
      throw new IllegalStateException();
-
 
16235
    }
-
 
16236
 
-
 
16237
    public Object getFieldValue(int fieldId) {
-
 
16238
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
16239
    }
-
 
16240
 
-
 
16241
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
16242
    public boolean isSet(_Fields field) {
-
 
16243
      switch (field) {
-
 
16244
      case SUCCESS:
-
 
16245
        return isSetSuccess();
-
 
16246
      case EX:
-
 
16247
        return isSetEx();
-
 
16248
      }
-
 
16249
      throw new IllegalStateException();
-
 
16250
    }
-
 
16251
 
-
 
16252
    public boolean isSet(int fieldID) {
-
 
16253
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
16254
    }
-
 
16255
 
-
 
16256
    @Override
-
 
16257
    public boolean equals(Object that) {
-
 
16258
      if (that == null)
-
 
16259
        return false;
-
 
16260
      if (that instanceof markOrderAsOutOfStock_result)
-
 
16261
        return this.equals((markOrderAsOutOfStock_result)that);
-
 
16262
      return false;
-
 
16263
    }
-
 
16264
 
-
 
16265
    public boolean equals(markOrderAsOutOfStock_result that) {
-
 
16266
      if (that == null)
-
 
16267
        return false;
-
 
16268
 
-
 
16269
      boolean this_present_success = true;
-
 
16270
      boolean that_present_success = true;
-
 
16271
      if (this_present_success || that_present_success) {
-
 
16272
        if (!(this_present_success && that_present_success))
-
 
16273
          return false;
-
 
16274
        if (this.success != that.success)
-
 
16275
          return false;
-
 
16276
      }
-
 
16277
 
-
 
16278
      boolean this_present_ex = true && this.isSetEx();
-
 
16279
      boolean that_present_ex = true && that.isSetEx();
-
 
16280
      if (this_present_ex || that_present_ex) {
-
 
16281
        if (!(this_present_ex && that_present_ex))
-
 
16282
          return false;
-
 
16283
        if (!this.ex.equals(that.ex))
-
 
16284
          return false;
-
 
16285
      }
-
 
16286
 
-
 
16287
      return true;
-
 
16288
    }
-
 
16289
 
-
 
16290
    @Override
-
 
16291
    public int hashCode() {
-
 
16292
      return 0;
-
 
16293
    }
-
 
16294
 
-
 
16295
    public int compareTo(markOrderAsOutOfStock_result other) {
-
 
16296
      if (!getClass().equals(other.getClass())) {
-
 
16297
        return getClass().getName().compareTo(other.getClass().getName());
-
 
16298
      }
-
 
16299
 
-
 
16300
      int lastComparison = 0;
-
 
16301
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
-
 
16302
 
-
 
16303
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
16304
      if (lastComparison != 0) {
-
 
16305
        return lastComparison;
-
 
16306
      }
-
 
16307
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
16308
      if (lastComparison != 0) {
-
 
16309
        return lastComparison;
-
 
16310
      }
-
 
16311
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
16312
      if (lastComparison != 0) {
-
 
16313
        return lastComparison;
-
 
16314
      }
-
 
16315
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
16316
      if (lastComparison != 0) {
-
 
16317
        return lastComparison;
-
 
16318
      }
-
 
16319
      return 0;
-
 
16320
    }
-
 
16321
 
-
 
16322
    public void read(TProtocol iprot) throws TException {
-
 
16323
      TField field;
-
 
16324
      iprot.readStructBegin();
-
 
16325
      while (true)
-
 
16326
      {
-
 
16327
        field = iprot.readFieldBegin();
-
 
16328
        if (field.type == TType.STOP) { 
-
 
16329
          break;
-
 
16330
        }
-
 
16331
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
16332
        if (fieldId == null) {
-
 
16333
          TProtocolUtil.skip(iprot, field.type);
-
 
16334
        } else {
-
 
16335
          switch (fieldId) {
-
 
16336
            case SUCCESS:
-
 
16337
              if (field.type == TType.BOOL) {
-
 
16338
                this.success = iprot.readBool();
-
 
16339
                setSuccessIsSet(true);
-
 
16340
              } else { 
-
 
16341
                TProtocolUtil.skip(iprot, field.type);
-
 
16342
              }
-
 
16343
              break;
-
 
16344
            case EX:
-
 
16345
              if (field.type == TType.STRUCT) {
-
 
16346
                this.ex = new TransactionServiceException();
-
 
16347
                this.ex.read(iprot);
-
 
16348
              } else { 
-
 
16349
                TProtocolUtil.skip(iprot, field.type);
-
 
16350
              }
-
 
16351
              break;
-
 
16352
          }
-
 
16353
          iprot.readFieldEnd();
-
 
16354
        }
-
 
16355
      }
-
 
16356
      iprot.readStructEnd();
-
 
16357
      validate();
-
 
16358
    }
-
 
16359
 
-
 
16360
    public void write(TProtocol oprot) throws TException {
-
 
16361
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16362
 
-
 
16363
      if (this.isSetSuccess()) {
-
 
16364
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
16365
        oprot.writeBool(this.success);
-
 
16366
        oprot.writeFieldEnd();
-
 
16367
      } else if (this.isSetEx()) {
-
 
16368
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
16369
        this.ex.write(oprot);
-
 
16370
        oprot.writeFieldEnd();
-
 
16371
      }
-
 
16372
      oprot.writeFieldStop();
-
 
16373
      oprot.writeStructEnd();
-
 
16374
    }
-
 
16375
 
-
 
16376
    @Override
-
 
16377
    public String toString() {
-
 
16378
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
-
 
16379
      boolean first = true;
-
 
16380
 
-
 
16381
      sb.append("success:");
-
 
16382
      sb.append(this.success);
-
 
16383
      first = false;
-
 
16384
      if (!first) sb.append(", ");
-
 
16385
      sb.append("ex:");
-
 
16386
      if (this.ex == null) {
-
 
16387
        sb.append("null");
15673
      } else {
16388
      } else {
15674
        sb.append(this.ex);
16389
        sb.append(this.ex);
15675
      }
16390
      }
15676
      first = false;
16391
      first = false;
15677
      sb.append(")");
16392
      sb.append(")");