Package com.inteliqua.rest.common
Class APIObjectOperationResult<T>
- java.lang.Object
-
- com.inteliqua.rest.common.APIOperationResult
-
- com.inteliqua.rest.common.APIObjectOperationResult<T>
-
- Type Parameters:
T- The type of the object that holds the operation result.
public class APIObjectOperationResult<T> extends APIOperationResult
A generic class that represents the result of an API operation which may contain a data object. This class extendsAPIOperationResultand provides additional functionality to hold an object of typeTthat represents the result of the operation.
-
-
Constructor Summary
Constructors Constructor Description APIObjectOperationResult(boolean successfull, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs a successfulAPIObjectOperationResultwith a specified API status code.APIObjectOperationResult(boolean successfull, T object, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs a successfulAPIObjectOperationResultwith a specified object and API status code.APIObjectOperationResult(String error)Constructs an error result with the specified error message.APIObjectOperationResult(String error, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs an error result with the specified error message and API status code.APIObjectOperationResult(String error, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)Constructs an error result with the specified error message and reply code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetObject()Returns the object representing the result of the API operation.voidsetObject(T object)Sets the object representing the result of the API operation.-
Methods inherited from class com.inteliqua.rest.common.APIOperationResult
addError, addErrors, addInfoMessage, addInfoMessages, getError, getErrorMessages, getErrorStatusCode, getInfoMessages, getReplyCode, isSuccessfull, setReplyCode, setSuccessfull
-
-
-
-
Constructor Detail
-
APIObjectOperationResult
public APIObjectOperationResult(boolean successfull, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs a successfulAPIObjectOperationResultwith a specified API status code.- Parameters:
successfull- A flag indicating whether the operation was successful.apiStatusCode- The status code of the API response.
-
APIObjectOperationResult
public APIObjectOperationResult(String error)
Constructs an error result with the specified error message.- Parameters:
error- A string describing the error.
-
APIObjectOperationResult
public APIObjectOperationResult(String error, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)
Constructs an error result with the specified error message and reply code.- Parameters:
error- A string describing the error.replyCode- The reply code associated with the error.
-
APIObjectOperationResult
public APIObjectOperationResult(boolean successfull, T object, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs a successfulAPIObjectOperationResultwith a specified object and API status code.- Parameters:
successfull- A flag indicating whether the operation was successful.object- The object representing the result of the operation.apiStatusCode- The status code of the API response.
-
APIObjectOperationResult
public APIObjectOperationResult(String error, com.qivos.util.rest.common.APIStatusCode apiStatusCode)
Constructs an error result with the specified error message and API status code.- Parameters:
error- A string describing the error.apiStatusCode- The status code of the API response.
-
-
Method Detail
-
getObject
public T getObject()
Returns the object representing the result of the API operation.- Returns:
- The object representing the result.
-
setObject
public void setObject(T object)
Sets the object representing the result of the API operation.- Parameters:
object- The object representing the result.
-
-