Class PagedResponse<T>

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    CursorPagedResponse

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

      Nested Classes 
      Modifier and Type Class Description
      static class  PagedResponse.Builder<T>  
    • Field Summary

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

      Constructors 
      Modifier Constructor Description
        PagedResponse()  
      protected PagedResponse​(long total, long offset, long limit, List<T> results)  
    • Field Detail

      • 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 Detail

      • PagedResponse

        public PagedResponse()
      • PagedResponse

        protected PagedResponse​(long total,
                                long offset,
                                long limit,
                                List<T> results)
    • Method Detail

      • 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
      • 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