Class Pagination


  • public class Pagination
    extends Object
    Defines pagination used during a request.
    Since:
    1.0.0
    Author:
    Steve Springett
    • Constructor Detail

      • Pagination

        public Pagination​(Pagination.Strategy strategy,
                          int o1,
                          int o2)
        Creates a new Pagination object with the specified offset and limit, or page number and size. If any parameters are null, a value of 0 will be used.
        Parameters:
        strategy - the pagination strategy to use
        o1 - the offset or page number to use
        o2 - the number of results to limit a result-set to (aka, the size of the page)
      • Pagination

        public Pagination​(Pagination.Strategy strategy,
                          String o1,
                          String o2)
        Creates a new Pagination object with the specified offset and limit, or page number and size. If any parameters are null, a value of 0 will be used.
        Parameters:
        strategy - the pagination strategy to use
        o1 - the offset or page number to use
        o2 - the number of results to limit a result-set to (aka, the size of the page)
    • Method Detail

      • getStrategy

        public Pagination.Strategy getStrategy()
        Returns the pagination strategy used.
        Returns:
        the pagination strategy
      • getOffset

        public int getOffset()
        Returns the offset.
        Returns:
        the offset
      • getLimit

        public int getLimit()
        Returns the limit.
        Returns:
        the limit
      • isPaginated

        public boolean isPaginated()
        Returns if pagination is being used for this request. A page number and page size greater than 0 will return true. If either of those are 0, method will return false.
        Returns:
        if paginiation is used for this request