Interface LimitableQuery<Self extends LimitableQuery<Self>>

  • All Known Subinterfaces:
    IndexQuery<T>
    All Known Implementing Classes:
    IndexQueryImpl

    public interface LimitableQuery<Self extends LimitableQuery<Self>>
    Extension for Query that indicates that a query can limit its results.
    Author:
    Andreas Holstenson
    • Method Summary

      Modifier and Type Method Description
      Self limit​(long limit)
      Set the number of results this query can return.
      Self offset​(long offset)
      Set the offset of this query.
      default Self paginate​(int page, int pageSize)
      Paginate this query, this will invoke offset(long) and limit(long) with arguments calculated from the page.
    • Method Detail

      • offset

        Self offset​(long offset)
        Set the offset of this query.
        Parameters:
        offset -
        Returns:
      • limit

        Self limit​(long limit)
        Set the number of results this query can return.
        Parameters:
        limit -
        Returns:
      • paginate

        default Self paginate​(int page,
                              int pageSize)
        Paginate this query, this will invoke offset(long) and limit(long) with arguments calculated from the page.
        Parameters:
        page -
        pageSize -
        Returns: