Package org.alfresco.query
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the instance of the query that generated these results.int
Get the number of pages availableint
Get the total number of results available within the pages of this result.getPages()
Get the paged resultsGet a single result if there is only one result expected.Methods inherited from class org.alfresco.query.EmptyPagingResults
getPage, getQueryExecutionId, getTotalResultCount, hasMoreItems
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.alfresco.query.PagingResults
getPage, getQueryExecutionId, getTotalResultCount, hasMoreItems
-
Constructor Details
-
EmptyCannedQueryResults
-
-
Method Details
-
getOriginatingQuery
Description copied from interface:CannedQueryResults
Get the instance of the query that generated these results.- Specified by:
getOriginatingQuery
in interfaceCannedQueryResults<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 interfaceCannedQueryResults<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 interfaceCannedQueryResults<R>
- Returns:
- number of results available in the pages
-
getPages
Description copied from interface:CannedQueryResults
Get the paged results- Specified by:
getPages
in interfaceCannedQueryResults<R>
- Returns:
- a list of paged results
-
getSingleResult
Description copied from interface:CannedQueryResults
Get a single result if there is only one result expected.- Specified by:
getSingleResult
in interfaceCannedQueryResults<R>
- Returns:
- a single result
-