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>

public class SearchPageResponse<T> extends Object implements PageResponse<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.
  • Constructor Details

    • SearchPageResponse

      public SearchPageResponse(List<T> results, boolean hasMore, String cqlQuery, PageRequest pageRequest, int totalSize, int searchDuration, Optional<Integer> archivedResultCount)
  • Method Details

    • getResults

      public List<T> getResults()
      Specified by:
      getResults in interface PageResponse<T>
      Returns:
      the results
    • size

      public int size()
      Specified by:
      size in interface PageResponse<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

      public Optional<Integer> 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 interface PageResponse<T>
      Returns:
      true if there are more results
    • getPageRequest

      public PageRequest getPageRequest()
      Specified by:
      getPageRequest in interface PageResponse<T>
      Returns:
      the request used to produce this response
    • getCqlQuery

      public String getCqlQuery()
      Returns:
      the CQL query used to query this set of results
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • builder

      public static <T> SearchPageResponse.Builder<T> builder()