Class PagingQuery<Query>

  • Type Parameters:
    Query - type of underlaying query.
    Direct Known Subclasses:
    SimplePagingQuery

    public class PagingQuery<Query>
    extends java.lang.Object
    Generic class for making paging queries.
    • Constructor Detail

      • PagingQuery

        public PagingQuery​(Query query)
        Create paging query.
        Parameters:
        query - underlaying query.
    • Method Detail

      • withLimit

        public PagingQuery<Query> withLimit​(int limit)
        Set the limit of query. Not more items will be in resulting list.
        Parameters:
        limit - new limit.
        Returns:
        same instance.
      • next

        public PagingQuery<Query> next​(java.lang.String nextCursor)
        Set next cursor. You should save it from the previous response and pass to the new query.
        Parameters:
        nextCursor - Value from previous PagingResult.
        Returns:
        same instance.
      • getQuery

        public Query getQuery()
        Returns:
        underlaying query.
      • getLimit

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

        public java.lang.String getNext()
        Returns:
        next cursor.