Class SearchResults<T>


  • public class SearchResults<T>
    extends Object
    This class encapsulates search results data.
    • Field Detail

      • SIZE_LIMIT_EXCEEDED

        public static final int SIZE_LIMIT_EXCEEDED
        Search was unsuccessful because the size limit is reached.
        See Also:
        Constant Field Values
      • TIME_LIMIT_EXCEEDED

        public static final int TIME_LIMIT_EXCEEDED
        Search was unsuccessful because the time limit is reached.
        See Also:
        Constant Field Values
      • UNDEFINED_RESULT_COUNT

        public static final int UNDEFINED_RESULT_COUNT
        Search size when search fails.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SearchResults

        public SearchResults​(int count,
                             Set<T> results,
                             int errorCode)
        Constructs the SearchResults object.
        Parameters:
        count - Number of entries which match the search criteria.
        results - Set of DNs from the search.
        errorCode - Error Code.
    • Method Detail

      • getSearchResults

        public Set<T> getSearchResults()
        Returns the search results.
        Returns:
        Search results.
      • getTotalResultCount

        public int getTotalResultCount()
        Returns the size of all results which match the search criteria. This number may be different from the size of set of search results which can be retrieved from getSearchResults() method. They are different when the size/time limits is reached.
        Returns:
        size of results matching the search. Returns UNDEFINED_RESULT_COUNT if search fails.
      • getErrorCode

        public int getErrorCode()
        Returns the error code of search.
        Returns:
        Error code of search.