Class SearchPageResponse<T>
java.lang.Object
com.atlassian.confluence.api.model.search.SearchPageResponse<T>
- Type Parameters:
T
- the type of entity in the collection of search results
- All Implemented Interfaces:
PageResponse<T>
,Iterable<T>
A page response impl for the search service which provides the total size of the
result set, along with the CQL Query that was used to generate the result set.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSearchPageResponse
(List<T> results, boolean hasMore, String cqlQuery, PageRequest pageRequest, int totalSize, int searchDuration, Optional<Integer> archivedResultCount) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SearchPageResponse.Builder<T>
builder()
int
boolean
hasMore()
Indicates whether the source has more results after this page.iterator()
int
size()
int
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.atlassian.confluence.api.model.pagination.PageResponse
getNextCursor, getPrevCursor, getTotalCount
-
Constructor Details
-
SearchPageResponse
-
-
Method Details
-
getResults
- Specified by:
getResults
in interfacePageResponse<T>
- Returns:
- the results
-
size
public int size()- Specified by:
size
in interfacePageResponse<T>
- Returns:
- the number of results in this page of results
-
totalSize
public int totalSize()- Returns:
- the total size of the requested result set, this equal to or greater than the number of results returned in the page response.
-
getSearchDuration
public int getSearchDuration()- Returns:
- search duration in milliseconds
-
archivedResultCount
- Returns:
- number of hits from archived spaces. Only shown if the original search returned no results.
- Since:
- 7.0.1
-
hasMore
public boolean hasMore()Description copied from interface:PageResponse
Indicates whether the source has more results after this page.- Specified by:
hasMore
in interfacePageResponse<T>
- Returns:
- true if there are more results
-
getPageRequest
- Specified by:
getPageRequest
in interfacePageResponse<T>
- Returns:
- the request used to produce this response
-
getCqlQuery
- Returns:
- the CQL query used to query this set of results
-
iterator
-
builder
-