com.ecebs.rtd.enabler.types
Class Outcome

java.lang.Object
  extended by com.ecebs.rtd.enabler.types.Outcome
All Implemented Interfaces:
Serializable

public class Outcome
extends Object
implements Serializable

Represents the outcome of an operation

Author:
kyleb
See Also:
Serialized Form

Nested Class Summary
static class Outcome.Code
          Represents the reason for an operation finishing
static class Outcome.State
          Represents the state of an operation
 
Constructor Summary
Outcome(Outcome.State state, Outcome.Code code)
           
Outcome(Outcome.State state, Outcome.Code code, String hint)
           
 
Method Summary
 Outcome.Code getCode()
          Get the code representing the reason for the operation finishing
 String getHint()
          In some instances, a hint will be returned, i.e.
 String getRequestId()
          Get the request ID, if one was created while carrying out the transaction
 Outcome.State getState()
          Get the state that the operation was in when it finished
 void setCode(Outcome.Code code)
           
 void setHint(String hint)
           
 void setRequestId(String requestId)
           
 void setState(Outcome.State state)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Outcome

public Outcome(Outcome.State state,
               Outcome.Code code)
Parameters:
state -
code -

Outcome

public Outcome(Outcome.State state,
               Outcome.Code code,
               String hint)
Parameters:
state -
code -
hint -
Method Detail

getState

public Outcome.State getState()
Get the state that the operation was in when it finished

Returns:
The state of the operation

getCode

public Outcome.Code getCode()
Get the code representing the reason for the operation finishing

Returns:
Reason code

getHint

public String getHint()
In some instances, a hint will be returned, i.e. if a field isn't set within a request object. If a hint has not been set, returns an empty string.

Returns:
Hint set by the operation, or empty string if not set

getRequestId

public String getRequestId()
Get the request ID, if one was created while carrying out the transaction

Returns:
Created request ID, or null if one wasn't created

setState

public void setState(Outcome.State state)
Parameters:
state -

setCode

public void setCode(Outcome.Code code)
Parameters:
code -

setHint

public void setHint(String hint)
Parameters:
hint -

setRequestId

public void setRequestId(String requestId)
Parameters:
requestId -

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Ecebs Ltd. All Rights Reserved.