public interface QueryResponse extends Response
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_ERROR
The name of the field which contains the error in the JSON
representation.
|
static String |
FIELD_PAGED_RESULTS_COOKIE
The name of the field which contains the paged results cookie in the JSON
representation.
|
static String |
FIELD_REMAINING_PAGED_RESULTS
The name of the field which contains the remaining paged results in the
JSON representation.
|
static String |
FIELD_RESULT
The name of the field which contains the array of matching resources in
the JSON representation.
|
static String |
FIELD_RESULT_COUNT
The name of the field which contains the result count in the JSON
representation.
|
static String |
FIELD_TOTAL_PAGED_RESULTS
The name of the field which contains the total paged results in the JSON
representation.
|
static String |
FIELD_TOTAL_PAGED_RESULTS_POLICY
The name of the field which contains the policy used for calculating
the total number of paged results in the JSON representation.
|
static int |
NO_COUNT
The value provided when no count is known or can reasonably be supplied.
|
Modifier and Type | Method and Description |
---|---|
Promise<QueryResponse,ResourceException> |
asPromise()
Return this response as a result Promise.
|
String |
getPagedResultsCookie()
Returns the opaque cookie which can be used for the next cookie-based
paged request.
|
int |
getRemainingPagedResults()
Returns an estimate of the total number of remaining results to be
returned in subsequent paged results query requests.
|
int |
getTotalPagedResults()
Returns the total number of paged results in adherence with
the
QueryRequest.getTotalPagedResultsPolicy() in the request
or QueryResponse.NO_COUNT if paged results were not requested, the count
policy is NONE , or the total number of paged
results is unknown. |
CountPolicy |
getTotalPagedResultsPolicy()
Returns the policy that was used to calculate the totalPagedResults.
|
getResourceApiVersion, setResourceApiVersion
static final String FIELD_ERROR
static final String FIELD_PAGED_RESULTS_COOKIE
static final String FIELD_TOTAL_PAGED_RESULTS_POLICY
static final String FIELD_TOTAL_PAGED_RESULTS
static final String FIELD_REMAINING_PAGED_RESULTS
static final String FIELD_RESULT_COUNT
static final String FIELD_RESULT
static final int NO_COUNT
CountPolicy getTotalPagedResultsPolicy()
QueryResponse.getTotalPagedResults()
String getPagedResultsCookie()
pageSize
. Cookies are only
guaranteed for QueryFilter
-based
queries. Implicit sorting may be supported by the resource provider
but it is not required. Given the arbitrary nature of query expressions
(and expression-backed queryIds) there can be no guarantee made of
cookie support for these queries.
Note:Cookies have a limited lifespan. They should not be stored long-term. Cookies should only be used on immediate subsequent requests or behavior is undefined.
null
if paged results were not
requested, there are no more pages to be returned, or cookies are not
supported for this query.QueryRequest.getPagedResultsCookie()
,
QueryRequest.setPagedResultsCookie(String)
,
QueryRequest.addSortKey(SortKey...)
,
QueryRequest.addSortKey(String...)
int getTotalPagedResults()
QueryRequest.getTotalPagedResultsPolicy()
in the request
or QueryResponse.NO_COUNT
if paged results were not requested, the count
policy is NONE
, or the total number of paged
results is unknown.QueryResponse.NO_COUNT
if paged results were not requested, or if the total
number of paged results is unknown.int getRemainingPagedResults()
-1
if paged results were not requested, or if the total
number of remaining results is unknown.Promise<QueryResponse,ResourceException> asPromise()
Copyright © 2010-2018, ForgeRock All Rights Reserved.