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.QueryResourceHandlerfor the results of the query. - A
org.forgerock.json.resource.QueryRequestfor the request.
- A
Contextto be given the context.
- See Also:
RequestHandler,SingletonProvider,CollectionProvider
- A
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description OperationoperationDescriptionDescribe the standard operation details of this action.QueryTypetypeThe type of query this method supports.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description CountPolicy[]countPoliciesThe count policies that can be used with this query.StringidThe query ID - required only whentypeisID.PagingMode[]pagingModesThe paging modes that can be used with this query.String[]queryableFieldsThe set of fields that can be used in a query filter.String[]sortKeysThe 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 whentypeisID. 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 thetypeisFILTER.- Default:
- {}
-
-
-
sortKeys
String[] sortKeys
The keys that can be used to sort the results of the query.- Default:
- {}
-
-