Class 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 extends APIOperationResult and provides additional functionality to hold an object of type T that represents the result of the operation.
    • Constructor Detail

      • APIObjectOperationResult

        public APIObjectOperationResult​(boolean successfull,
                                        com.qivos.util.rest.common.APIStatusCode apiStatusCode)
        Constructs a successful APIObjectOperationResult with 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 successful APIObjectOperationResult with 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.