Class SearchResult

  • All Implemented Interfaces:
    Serializable

    public final class SearchResult
    extends Object
    implements Serializable
    The final result of a query request returned after all connector objects matching the request have been returned. In addition to indicating that no more objects are to be returned by the search, the search result will contain page results state information if result paging has been enabled for the search.
    Since:
    1.4
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchResult()
      Creates a new search result with a null paged results cookie and no estimate of the total number of remaining results.
      SearchResult​(String pagedResultsCookie, int remainingPagedResults)
      Creates a new search result with the provided paged results cookie and estimate of the total number of remaining results.
      SearchResult​(String pagedResultsCookie, int remainingPagedResults, boolean allResultsReturned)
      Creates a new search result with the provided paged results cookie and estimate of the total number of remaining results.
    • Constructor Detail

      • SearchResult

        public SearchResult()
        Creates a new search result with a null paged results cookie and no estimate of the total number of remaining results.
      • SearchResult

        public SearchResult​(String pagedResultsCookie,
                            int remainingPagedResults)
        Creates a new search result with the provided paged results cookie and estimate of the total number of remaining results.
        Parameters:
        pagedResultsCookie - The opaque cookie which should be used with the next paged results search request, or null if paged results were not requested, or if there are not more pages to be returned.
        remainingPagedResults - An estimate of the total number of remaining results to be returned in subsequent paged results search requests, or -1 if paged results were not requested, or if the total number of remaining results is unknown.
      • SearchResult

        public SearchResult​(String pagedResultsCookie,
                            int remainingPagedResults,
                            boolean allResultsReturned)
        Creates a new search result with the provided paged results cookie and estimate of the total number of remaining results.
        Parameters:
        pagedResultsCookie - The opaque cookie which should be used with the next paged results search request, or null if paged results were not requested, or if there are not more pages to be returned.
        remainingPagedResults - An estimate of the total number of remaining results to be returned in subsequent paged results search requests, or -1 if paged results were not requested, or if the total number of remaining results is unknown.
        allResultsReturned - Set to true if the search returned all the results that match the query. Set to false if the returned result is not complete, e.g. if the server returned only part of the results due to server limits, errors, etc.
    • Method Detail

      • getPagedResultsCookie

        public String getPagedResultsCookie()
        Returns the opaque cookie which should be used with the next paged results search request.
        Returns:
        The opaque cookie which should be used with the next paged results search request, or null if paged results were not requested, or if there are not more pages to be returned.
      • getRemainingPagedResults

        public int getRemainingPagedResults()
        Returns an estimate of the total number of remaining results to be returned in subsequent paged results search requests.
        Returns:
        An estimate of the total number of remaining results to be returned in subsequent paged results search requests, or -1 if paged results were not requested, or if the total number of remaining results is unknown.
      • isAllResultsReturned

        public boolean isAllResultsReturned()
        Returns a flag indicating whether all the results that match a search query were returned.
        Returns:
        Returns true if the search returned all the results that match the query. Returns false if the returned result is not complete, e.g. if the server returned only part of the results due to server limits, errors, etc.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object