public class GenericResponse
extends java.lang.Object
Constructor and Description |
---|
GenericResponse()
Default constructor.
|
GenericResponse(boolean success)
Constructor.
|
GenericResponse(boolean success,
java.lang.String errorMessage)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorMessage() |
boolean |
isSuccess() |
void |
setErrorMessage(java.lang.String errorMessage) |
void |
setSuccess(boolean success) |
public GenericResponse()
public GenericResponse(boolean success, java.lang.String errorMessage)
success
- Indicates success (true) or failure (false) of the performed operation.errorMessage
- An optional error message, in case the operation failed.public GenericResponse(boolean success)
success
- Indicates success (true) or failure (false) of the performed operation.public boolean isSuccess()
true
if the operation was successful.
false
if the operation failed.public void setSuccess(boolean success)
success
- true
if the operation was successful.
false
if the operation failed.public java.lang.String getErrorMessage()
public void setErrorMessage(java.lang.String errorMessage)
errorMessage
- The error message, for a failed operation.