Class PagingParams


  • public class PagingParams
    extends java.lang.Object
    This class represents Paging Parameters that can be used to limit results from the return List object that could potentially contain a large number of results. The results by default will use a PagingParams.limit of 50 items starting at the 0th item, using an offset of 0. To retrieve the next group, set the offset to 50 to skip ahead 50 items.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static PagingParams Default
      A PagingParams object that represents the default settings (offset at 0, and limit at 50)
    • Constructor Summary

      Constructors 
      Constructor Description
      PagingParams​(java.lang.Integer offset, java.lang.Integer limit)
      Constructs
    • Field Detail

      • Default

        public static PagingParams Default
        A PagingParams object that represents the default settings (offset at 0, and limit at 50)
    • Constructor Detail

      • PagingParams

        public PagingParams​(java.lang.Integer offset,
                            java.lang.Integer limit)
        Constructs
        Parameters:
        offset - The number of result to skip. Defaults to 0.
        limit - The maximum number of results to retrieve. Defaults to 50.
    • Method Detail

      • getOffset

        public int getOffset()
        Get the offset for this PagingParams object
        Returns:
        The number of items to skip
      • setOffset

        public void setOffset​(int offset)
        Set the offset for this PagingParams object
        Parameters:
        offset - The number of items to skip
      • getLimit

        public int getLimit()
        Get the limit for this PagingParams object
        Returns:
        The number of items to retrieve
      • setLimit

        public void setLimit​(int limit)
        Set the limit for this PagingParams object
        Parameters:
        limit - The number of items to retrieve
      • toParameters

        public java.util.Map<java.lang.String,​java.lang.Object> toParameters()
        internal

        Converts this object to a Map used to build the query string parameters for a request

        Returns:
        A Map containing the parameters to be included as querystrings on the request.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object