Package org.openehr.utils.operation
Class OperationOutcome<T>
- java.lang.Object
-
- org.openehr.utils.operation.OperationOutcome<T>
-
public class OperationOutcome<T> extends java.lang.ObjectClass representing the outcome of an operation including the return value, a flag indicating success or failure, and the exception thrown by the operation if any.
-
-
Constructor Summary
Constructors Constructor Description OperationOutcome(T result)OperationOutcome(T result, OperationOutcomeStatus status)OperationOutcome(T result, OperationOutcomeStatus status, java.lang.Exception exception)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ExceptiongetException()Returns the exception thrown by this operation.TgetResult()The result of the operation.OperationOutcomeStatusgetStatus()Returns the status of the operation.voidsetException(java.lang.Exception exception)Sets the exception thrown by this operation.voidsetResult(T result)Sets the result of the operation.voidsetStatus(OperationOutcomeStatus status)Sets the status of the operation.
-
-
-
Constructor Detail
-
OperationOutcome
public OperationOutcome(T result)
-
OperationOutcome
public OperationOutcome(T result, OperationOutcomeStatus status)
-
OperationOutcome
public OperationOutcome(T result, OperationOutcomeStatus status, java.lang.Exception exception)
-
-
Method Detail
-
getResult
public T getResult()
The result of the operation.- Returns:
-
setResult
public void setResult(T result)
Sets the result of the operation.- Parameters:
result-
-
getStatus
public OperationOutcomeStatus getStatus()
Returns the status of the operation.- Returns:
-
setStatus
public void setStatus(OperationOutcomeStatus status)
Sets the status of the operation.- Parameters:
status-
-
getException
public java.lang.Exception getException()
Returns the exception thrown by this operation.- Returns:
-
setException
public void setException(java.lang.Exception exception)
Sets the exception thrown by this operation.- Parameters:
exception-
-
-