Class SearchResponse

  • All Implemented Interfaces:
    java.io.Serializable

    public final class SearchResponse
    extends java.lang.Object
    implements java.io.Serializable
    Object describing the response to a searchRequest which may or may not contains results
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchResponse()  
      SearchResponse​(java.util.List<java.lang.String> highlights, java.util.List<Result> results, java.util.List<java.lang.String> errors, java.lang.Boolean complete)  
    • Method Summary

      Modifier and Type Method Description
      boolean complete()  
      boolean equals​(java.lang.Object o)  
      java.lang.Boolean getComplete()  
      java.util.List<java.lang.String> getErrors()  
      java.util.List<java.lang.String> getHighlights()  
      java.util.List<Result> getResults()  
      int hashCode()  
      void setComplete​(java.lang.Boolean complete)  
      void setErrors​(java.util.List<java.lang.String> errors)  
      void setHighlights​(java.util.List<java.lang.String> highlights)  
      void setResults​(java.util.List<Result> results)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SearchResponse

        public SearchResponse()
      • SearchResponse

        public SearchResponse​(java.util.List<java.lang.String> highlights,
                              java.util.List<Result> results,
                              java.util.List<java.lang.String> errors,
                              java.lang.Boolean complete)
        Parameters:
        highlights - A list of strings to highlight in the UI that should correlate with the search query.
        results - A list of result objects that each correspond to a resultRequest in the searchRequest
        errors - Any errors that have been generated during searching.
        complete - Complete means that the search has finished and there are no more results to come.
    • Method Detail

      • getHighlights

        public java.util.List<java.lang.String> getHighlights()
        Returns:
        A list of strings to highlight in the UI that should correlate with the search query.
      • setHighlights

        public void setHighlights​(java.util.List<java.lang.String> highlights)
      • setResults

        public void setResults​(java.util.List<Result> results)
      • getErrors

        public java.util.List<java.lang.String> getErrors()
        Returns:
        A list of errors found when performing the search
      • setErrors

        public void setErrors​(java.util.List<java.lang.String> errors)
      • getComplete

        public java.lang.Boolean getComplete()
        Returns:
        The completed status of the search. A value of false or null indicates the search has not yet found all results.
      • setComplete

        public void setComplete​(java.lang.Boolean complete)
      • complete

        public boolean complete()
        Returns:
        The completed status of the search. A value of false indicates the search has not yet found all results
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object