Package org.forgerock.api.models
Class Query
java.lang.Object
org.forgerock.api.models.Operation
org.forgerock.api.models.Query
- All Implemented Interfaces:
Comparable<Query>
Class that represents the Create Operation type in API descriptor.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder to help construct the Read. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidallocateToResource(Resource.Builder resourceBuilder) Allocates the Query operation type to the given Resource Builder.intCompares two queries.booleanstatic QueryfromAnnotation(Query query, Method annotated, ApiDescription descriptor, Class<?> relativeType) Builds a Query object from the data stored in the annotation.Getter of the supported paging policies.Getter of the paging modes.String[]Getter of the queryable fields.Getter of the query id.String[]Getter of the supported sort keys.getType()Getter of the query type.inthashCode()static Query.Builderquery()Creates a new builder for Query.Methods inherited from class org.forgerock.api.models.Operation
getApiErrors, getDescription, getParameters, getStability, getSupportedLocales
-
Method Details
-
getType
Getter of the query type.- Returns:
- Query type num
-
getPagingModes
Getter of the paging modes.- Returns:
- Paging mode enums
-
getCountPolicies
Getter of the supported paging policies. 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.- Returns:
- Supported paging policy enums
-
getQueryId
Getter of the query id.- Returns:
- Query id
-
getQueryableFields
Getter of the queryable fields.- Returns:
- Queryable fields
-
getSupportedSortKeys
Getter of the supported sort keys.- Returns:
- Supported sort keys
-
equals
-
hashCode
public int hashCode() -
query
Creates a new builder for Query.- Returns:
- New builder instance
-
allocateToResource
Allocates the Query operation type to the given Resource Builder.- Specified by:
allocateToResourcein classOperation- Parameters:
resourceBuilder- - Resource Builder to add the operation
-
fromAnnotation
public static Query fromAnnotation(Query query, Method annotated, ApiDescription descriptor, Class<?> relativeType) Builds a Query object from the data stored in the annotation.- Parameters:
query- The annotation that stores the data.annotated- The method that the annotation was found on.descriptor- The root descriptor to add definitions to.relativeType- The type relative to which schema resources should be resolved.- Returns:
- Query instance
-
compareTo
Compares two queries.- Specified by:
compareToin interfaceComparable<Query>- Parameters:
query- Query to compare to- Returns:
- the value
0if the argument string is equal to this string; a value less than0if this string is lexicographically less than the string argument; and a value greater than0if this string is lexicographically greater than the string argument.
-