public class CommandResultImpl extends java.lang.Object implements CommandResult
Constructor and Description |
---|
CommandResultImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addWarnings(java.lang.String msg)
Adds a localized warning message.
|
java.lang.Throwable |
getException()
Gets the exception if the command execution failed.
|
java.util.Collection |
getMessages()
Gets warning messages if there is any.
|
java.lang.Object |
getResult()
Gets the result of the command execution if the execution is successful.
|
boolean |
isSuccessful()
Returns if the last command execution is successful or not.
|
void |
reset()
This method should be called first to fill in the execution result.
|
void |
setException(java.lang.Throwable thisThrowable)
Sets the exception for result if any exception is thrown.
|
void |
setResult(java.lang.Object obj)
Adds an object command execution result.
|
java.lang.String |
toString() |
public void reset()
public boolean isSuccessful()
CommandResult
isSuccessful
in interface CommandResult
public java.util.Collection getMessages()
CommandResult
getMessages
in interface CommandResult
public java.lang.Throwable getException()
CommandResult
getException
in interface CommandResult
public java.lang.Object getResult()
CommandResult
getResult
in interface CommandResult
public void setException(java.lang.Throwable thisThrowable)
public void addWarnings(java.lang.String msg)
public void setResult(java.lang.Object obj)
public java.lang.String toString()
toString
in class java.lang.Object