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()
CommandResultisSuccessful in interface CommandResultpublic java.util.Collection getMessages()
CommandResultgetMessages in interface CommandResultpublic java.lang.Throwable getException()
CommandResultgetException in interface CommandResultpublic java.lang.Object getResult()
CommandResultgetResult in interface CommandResultpublic 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