Package org.forgerock.api.annotations
Annotation Type Query
-
@Retention(RUNTIME) @Target(METHOD) public @interface Query
Indicates an CREST query method on an annotated POJO. This annotation can only be used on collection resource request handlers.The annotated method's return type must be:
- A
Promise<QueryResponse, ? extends ResourceException>
promise.
- A
org.forgerock.json.resource.QueryResourceHandler
for the results of the query. - A
org.forgerock.json.resource.QueryRequest
for the request.
- A
Context
to be given the context.
- See Also:
RequestHandler
,SingletonProvider
,CollectionProvider
- A
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Operation
operationDescription
Describe the standard operation details of this action.QueryType
type
The type of query this method supports.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description CountPolicy[]
countPolicies
The count policies that can be used with this query.String
id
The query ID - required only whentype
isID
.PagingMode[]
pagingModes
The paging modes that can be used with this query.String[]
queryableFields
The set of fields that can be used in a query filter.String[]
sortKeys
The keys that can be used to sort the results of the query.
-
-
-
Element Detail
-
operationDescription
Operation operationDescription
Describe the standard operation details of this action.
-
-
-
type
QueryType type
The type of query this method supports.
-
-
-
pagingModes
PagingMode[] pagingModes
The paging modes that can be used with this query.- Default:
- {}
-
-
-
countPolicies
CountPolicy[] countPolicies
The count policies that can be used with this query. If the array is empty, this means that the query does not support any form of count policy, and no value for count policy should be specified- Default:
- {}
-
-
-
id
String id
The query ID - required only whentype
isID
. If not supplied but required, the name of the annotated method is used.- Default:
- ""
-
-
-
queryableFields
String[] queryableFields
The set of fields that can be used in a query filter. Required only when thetype
isFILTER
.- Default:
- {}
-
-
-
sortKeys
String[] sortKeys
The keys that can be used to sort the results of the query.- Default:
- {}
-
-