Package com.inteliqua.rest.common
Class APIEntityOperationResult<T extends BaseEntity>
- java.lang.Object
-
- com.inteliqua.rest.common.APIOperationResult
-
- com.inteliqua.rest.common.APIEntityOperationResult<T>
-
- Type Parameters:
T- The type of entity that extendsBaseEntity.
public class APIEntityOperationResult<T extends BaseEntity> extends APIOperationResult
Represents the result of an API operation that returns a single entity.This class extends
APIOperationResultand adds a specificBaseEntityresult, useful for returning detailed entity data alongside the operation status.- Author:
- nikritikos
-
-
Constructor Summary
Constructors Constructor Description APIEntityOperationResult(boolean successfull, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs a successful or failed operation result without an entity.APIEntityOperationResult(boolean successfull, com.qivos.util.rest.common.APIStatusCode apiStatusCode, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)Constructs a result with an API status and reply code.APIEntityOperationResult(boolean successfull, T entity, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs an operation result with an entity and success status.APIEntityOperationResult(String error)Constructs an operation result with an error message.APIEntityOperationResult(String error, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs an operation result with an error and API status code.APIEntityOperationResult(String error, com.qivos.util.rest.common.APIStatusCode apiStatusCode, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)Constructs an operation result with an error, API status code, and reply code.APIEntityOperationResult(String error, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)Constructs an operation result with an error and a reply code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetEntity()Gets the entity returned by the operation.voidsetEntity(T entity)Sets the entity returned by the operation.-
Methods inherited from class com.inteliqua.rest.common.APIOperationResult
addError, addErrors, addInfoMessage, addInfoMessages, getError, getErrorMessages, getErrorStatusCode, getInfoMessages, getReplyCode, isSuccessfull, setReplyCode, setSuccessfull
-
-
-
-
Constructor Detail
-
APIEntityOperationResult
public APIEntityOperationResult(boolean successfull, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs a successful or failed operation result without an entity.- Parameters:
successfull- Indicates whether the operation was successful.apiStatusCode- The status code representing the result.
-
APIEntityOperationResult
public APIEntityOperationResult(boolean successfull, com.qivos.util.rest.common.APIStatusCode apiStatusCode, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)Constructs a result with an API status and reply code.- Parameters:
successfull- Indicates whether the operation was successful.apiStatusCode- The status code representing the result.replyCode- The reply code with additional result context.
-
APIEntityOperationResult
public APIEntityOperationResult(String error)
Constructs an operation result with an error message.- Parameters:
error- The error message.
-
APIEntityOperationResult
public APIEntityOperationResult(String error, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)
Constructs an operation result with an error and a reply code.- Parameters:
error- The error message.replyCode- The reply code.
-
APIEntityOperationResult
public APIEntityOperationResult(boolean successfull, T entity, com.qivos.util.rest.common.APIStatusCode apiStatusCode)Constructs an operation result with an entity and success status.- Parameters:
successfull- Indicates whether the operation was successful.entity- The returned entity.apiStatusCode- The status code representing the result.
-
APIEntityOperationResult
public APIEntityOperationResult(String error, com.qivos.util.rest.common.APIStatusCode apiStatusCode)
Constructs an operation result with an error and API status code.- Parameters:
error- The error message.apiStatusCode- The status code.
-
APIEntityOperationResult
public APIEntityOperationResult(String error, com.qivos.util.rest.common.APIStatusCode apiStatusCode, com.qivos.util.rest.common.envelope.APIReplyCode replyCode)
Constructs an operation result with an error, API status code, and reply code.- Parameters:
error- The error message.apiStatusCode- The status code.replyCode- The reply code.
-
-