Class ObjectResponse<T>

java.lang.Object
io.getlime.core.rest.model.base.response.Response
io.getlime.core.rest.model.base.response.ObjectResponse<T>
Type Parameters:
T - Type of the response object
Direct Known Subclasses:
ErrorResponse

public class ObjectResponse<T>
extends Response
Generic response with status and object object of a custom class.
Author:
Petr Dvorak, petr@wultra.com
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.getlime.core.rest.model.base.response.Response

    Response.Status
  • Field Summary

    Fields inherited from class io.getlime.core.rest.model.base.response.Response

    status
  • Constructor Summary

    Constructors
    Constructor Description
    ObjectResponse()
    Default constructor
    ObjectResponse​(java.lang.String status, T responseObject)
    Constructor with response status and response object
    ObjectResponse​(T responseObject)
    Constructor with OK response status and response object
  • Method Summary

    Modifier and Type Method Description
    T getResponseObject()
    Get response object.
    java.lang.String getStatus()
    Get response status.
    void setResponseObject​(T responseObject)
    Set response object.
    void setStatus​(java.lang.String status)
    Set response status.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ObjectResponse

      public ObjectResponse()
      Default constructor
    • ObjectResponse

      public ObjectResponse​(T responseObject)
      Constructor with OK response status and response object
      Parameters:
      responseObject - Response object.
    • ObjectResponse

      public ObjectResponse​(java.lang.String status, T responseObject)
      Constructor with response status and response object
      Parameters:
      status - Response status, use static constant from Response.Status class.
      responseObject - Response object.
  • Method Details

    • getStatus

      public java.lang.String getStatus()
      Get response status.
      Overrides:
      getStatus in class Response
      Returns:
      Response status.
    • setStatus

      public void setStatus​(java.lang.String status)
      Set response status.
      Overrides:
      setStatus in class Response
      Parameters:
      status - Response status.
    • getResponseObject

      public T getResponseObject()
      Get response object.
      Returns:
      Response object.
    • setResponseObject

      public void setResponseObject​(T responseObject)
      Set response object.
      Parameters:
      responseObject - Response object.