Class EmptyCannedQueryResults<R>

java.lang.Object
org.alfresco.query.EmptyPagingResults<R>
org.alfresco.query.EmptyCannedQueryResults<R>
All Implemented Interfaces:
CannedQueryResults<R>, PagingResults<R>

public class EmptyCannedQueryResults<R> extends EmptyPagingResults<R> implements CannedQueryResults<R>
An always empty CannedQueryResults, used when you know you can short circuit a query when no results are found.
Since:
4.0
Author:
Nick Burch
  • Constructor Details

    • EmptyCannedQueryResults

      public EmptyCannedQueryResults(CannedQuery<R> query)
  • Method Details

    • getOriginatingQuery

      public CannedQuery<R> getOriginatingQuery()
      Description copied from interface: CannedQueryResults
      Get the instance of the query that generated these results.
      Specified by:
      getOriginatingQuery in interface CannedQueryResults<R>
      Returns:
      the query that generated these results.
    • getPageCount

      public int getPageCount()
      Description copied from interface: CannedQueryResults
      Get the number of pages available
      Specified by:
      getPageCount in interface CannedQueryResults<R>
      Returns:
      the number of pages available
    • getPagedResultCount

      public int getPagedResultCount()
      Description copied from interface: CannedQueryResults
      Get the total number of results available within the pages of this result. The count excludes results chopped out by the paging process i.e. it is only the count of results physically obtainable through this instance.
      Specified by:
      getPagedResultCount in interface CannedQueryResults<R>
      Returns:
      number of results available in the pages
    • getPages

      public List<List<R>> getPages()
      Description copied from interface: CannedQueryResults
      Get the paged results
      Specified by:
      getPages in interface CannedQueryResults<R>
      Returns:
      a list of paged results
    • getSingleResult

      public R getSingleResult()
      Description copied from interface: CannedQueryResults
      Get a single result if there is only one result expected.
      Specified by:
      getSingleResult in interface CannedQueryResults<R>
      Returns:
      a single result