Class EmptyPagingResults<R>

  • All Implemented Interfaces:
    PagingResults<R>
    Direct Known Subclasses:
    EmptyCannedQueryResults

    public class EmptyPagingResults<R>
    extends java.lang.Object
    implements PagingResults<R>
    An always empty PagingResults, used when you know you can short circuit a query when no results are found.
    Since:
    4.0
    Author:
    Nick Burch
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<R> getPage()
      Returns an empty page
      java.lang.String getQueryExecutionId()
      There is no unique query ID, as no query was done
      Pair<java.lang.Integer,​java.lang.Integer> getTotalResultCount()
      There are no results
      boolean hasMoreItems()
      No more items remain
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmptyPagingResults

        public EmptyPagingResults()
    • Method Detail

      • getPage

        public java.util.List<R> getPage()
        Returns an empty page
        Specified by:
        getPage in interface PagingResults<R>
        Returns:
        the results - possibly empty but never null
      • hasMoreItems

        public boolean hasMoreItems()
        No more items remain
        Specified by:
        hasMoreItems in interface PagingResults<R>
        Returns:
        true if more items (eg. on next page)
        - true => at least one more page (or incomplete page - if cutoff)
        - false => last page (or incomplete page - if cutoff)
      • getTotalResultCount

        public Pair<java.lang.Integer,​java.lang.Integer> getTotalResultCount()
        There are no results
        Specified by:
        getTotalResultCount in interface PagingResults<R>
        Returns:
        Returns the total results as a range (all results, including the paged results returned)
      • getQueryExecutionId

        public java.lang.String getQueryExecutionId()
        There is no unique query ID, as no query was done
        Specified by:
        getQueryExecutionId in interface PagingResults<R>
        Returns:
        a unique ID associated with the query execution results