Class SearchResult
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.SearchResult
-
public final class SearchResult extends java.lang.Object
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SearchResult.CountPolicy
An enum of count policy types.
-
Field Summary
Fields Modifier and Type Field Description static int
NO_COUNT
The value provided when no count is known or can reasonably be supplied.
-
Constructor Summary
Constructors Constructor Description SearchResult()
Creates a new search result with anull
paged results cookie and no estimate of the total number of remaining results.SearchResult(java.lang.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(java.lang.String pagedResultsCookie, SearchResult.CountPolicy totalPagedResultsPolicy, int totalPagedResults, int remainingPagedResults)
Creates a new query response with the provided paged results cookie and a count of the total number of resources according tototalPagedResultsPolicy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getPagedResultsCookie()
Returns the opaque cookie which should be used with the next paged results search request.int
getRemainingPagedResults()
Returns an estimate of the total number of remaining results to be returned in subsequent paged results search requests.int
getTotalPagedResults()
Returns the total number of paged results in adherence with theOperationOptions.getTotalPagedResultsPolicy()
in the request orNO_COUNT
if paged results were not requested, the count policy isNONE
, or the total number of paged results is unknown.SearchResult.CountPolicy
getTotalPagedResultsPolicy()
Returns the policy that was used to calculate the totalPagedResults.int
hashCode()
-
-
-
Field Detail
-
NO_COUNT
public static final int NO_COUNT
The value provided when no count is known or can reasonably be supplied.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SearchResult
public SearchResult()
Creates a new search result with anull
paged results cookie and no estimate of the total number of remaining results.
-
SearchResult
public SearchResult(java.lang.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, ornull
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(java.lang.String pagedResultsCookie, SearchResult.CountPolicy totalPagedResultsPolicy, int totalPagedResults, int remainingPagedResults)
Creates a new query response with the provided paged results cookie and a count of the total number of resources according tototalPagedResultsPolicy
.- Parameters:
pagedResultsCookie
- The opaque cookie which should be used with the next paged results query request, ornull
if paged results were not requested, or if there are not more pages to be returned.totalPagedResultsPolicy
- The policy that was used to calculatetotalPagedResults
. If none is specified (null
), thenSearchResult.CountPolicy.NONE
is assumed.totalPagedResults
- The total number of paged results requested in adherence to theOperationOptions.getTotalPagedResultsPolicy()
in the request, orNO_COUNT
if paged results were not requested, the count policy isNONE
, or if the total number of results is unknown.remainingPagedResults
- An estimate of the total number of remaining results to be returned in subsequent paged results query requests, or-1
if paged results were not requested, or if the total number of remaining results is unknown.- Since:
- 1.5
-
-
Method Detail
-
getPagedResultsCookie
public java.lang.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.
-
getTotalPagedResultsPolicy
public SearchResult.CountPolicy getTotalPagedResultsPolicy()
Returns the policy that was used to calculate the totalPagedResults.- Returns:
- The count policy.
- Since:
- 1.5
- See Also:
getTotalPagedResults()
-
getTotalPagedResults
public int getTotalPagedResults()
Returns the total number of paged results in adherence with theOperationOptions.getTotalPagedResultsPolicy()
in the request orNO_COUNT
if paged results were not requested, the count policy isNONE
, or the total number of paged results is unknown.- Returns:
- A count of the total number of paged results to be returned in
subsequent paged results query requests, or
NO_COUNT
if paged results were not requested, or if the total number of paged results is unknown. - Since:
- 1.5
-
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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-