Class PagedResponse<T>

Object
PagedResponse<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ActivityPagedResponse, CursorPagedResponse

public class PagedResponse<T> extends Object implements Serializable
Response containing the paged information.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected long
    Deprecated.
    This field will become private in the next major release.
    protected long
    Deprecated.
    This field will become private in the next major release.
    protected long
    Deprecated.
    This field will become private in the next major release.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    PagedResponse(long total, long offset, long limit, List<T> results)
    Deprecated.
    This field will become private in the next major release.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> PagedResponse.Builder<T>
     
    protected boolean
     
    boolean
     
    long
    Returns the maximum number of results to be returned.
    long
    Returns the offset for the results.
    The list of results.
    long
    Returns the total number of results.
    int
     
    void
    setLimit(long limit)
    Sets the maximum number of results to be returned.
    void
    setOffset(long offset)
    Sets the offset for the results.
    void
    setResults(List<T> results)
    The list of results.
    void
    setTotal(long total)
    Sets the total number of results.
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • total

      @Deprecated protected long total
      Deprecated.
      This field will become private in the next major release. Methods getTotal(), setTotal(long) should be used instead.
      The total number of results.
    • offset

      @Deprecated protected long offset
      Deprecated.
      This field will become private in the next major release. Methods getOffset(), setOffset(long) should be used instead.
      The offset for the results.
    • limit

      @Deprecated protected long limit
      Deprecated.
      This field will become private in the next major release. Methods getLimit(), setLimit(long) should be used instead.
      The maximum number of results to be returned.
  • Constructor Details

    • PagedResponse

      public PagedResponse()
    • PagedResponse

      protected PagedResponse(long total, long offset, long limit, List<T> results)
      Deprecated.
      This field will become private in the next major release. Methods getTotal(), setTotal(long) should be used instead.
      Creates a new PagedResponse instance.
      Parameters:
      total - The total number of results.
      offset - The offset for the results.
      limit - The maximum number of results to be returned.
      results - The list of results.
  • Method Details

    • getOffset

      public long getOffset()
      Returns the offset for the results.
      Returns:
      the offset for the results
    • setOffset

      public void setOffset(long offset)
      Sets the offset for the results.
      Parameters:
      offset - the offset for the results
    • getLimit

      public long getLimit()
      Returns the maximum number of results to be returned.
      Returns:
      the maximum number of results to be returned
    • setLimit

      public void setLimit(long limit)
      Sets the maximum number of results to be returned.
      Parameters:
      limit - the maximum number of results to be returned
    • getTotal

      public long getTotal()
      Returns the total number of results.
      Returns:
      the total number of results
    • setTotal

      public void setTotal(long total)
      Sets the total number of results.
      Parameters:
      total - the total number of results
    • builder

      public static <T> PagedResponse.Builder<T> builder()
    • getResults

      public List<T> getResults()
      The list of results.
    • setResults

      public void setResults(List<T> results)
      The list of results.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object