Package com.sun.identity.common
Class SearchResults<T>
- java.lang.Object
-
- com.sun.identity.common.SearchResults<T>
-
public class SearchResults<T> extends Object
This class encapsulates search results data.
-
-
Field Summary
Fields Modifier and Type Field Description static intSIZE_LIMIT_EXCEEDEDSearch was unsuccessful because the size limit is reached.static intSUCCESSSuccessful search.static intTIME_LIMIT_EXCEEDEDSearch was unsuccessful because the time limit is reached.static intUNDEFINED_RESULT_COUNTSearch size when search fails.
-
Constructor Summary
Constructors Constructor Description SearchResults(int count, Set<T> results, int errorCode)Constructs theSearchResultsobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorCode()Returns the error code of search.Set<T>getSearchResults()Returns the search results.intgetTotalResultCount()Returns the size of all results which match the search criteria.
-
-
-
Field Detail
-
SUCCESS
public static final int SUCCESS
Successful search.- See Also:
- Constant Field Values
-
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
-
-
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 fromgetSearchResults()method. They are different when the size/time limits is reached.- Returns:
- size of results matching the search. Returns
UNDEFINED_RESULT_COUNTif search fails.
-
getErrorCode
public int getErrorCode()
Returns the error code of search.- Returns:
- Error code of search.
-
-