Package org.forgerock.api.models
Class Query.Builder
- java.lang.Object
-
- org.forgerock.api.models.Operation.Builder<Query.Builder>
-
- org.forgerock.api.models.Query.Builder
-
- Enclosing class:
- Query
public static final class Query.Builder extends Operation.Builder<Query.Builder>
Builder to help construct the Read.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Query
build()
Builds the Query instance.Query.Builder
countPolicies(CountPolicy... countPolicy)
Set the supported page count policies.Query.Builder
pagingModes(PagingMode... pagingMode)
Set the paging mode.Query.Builder
queryableFields(String... queryableFields)
Set the queryable fields.Query.Builder
queryId(String queryId)
Set the query id.protected Query.Builder
self()
Returns the builder instance.Query.Builder
supportedSortKeys(String... supportedSortKeys)
Set the supported sort keys.Query.Builder
type(QueryType type)
Set the query type.-
Methods inherited from class org.forgerock.api.models.Operation.Builder
description, description, detailsFromAnnotation, error, errors, parameter, parameters, stability, supportedLocales
-
-
-
-
Method Detail
-
self
protected Query.Builder self()
Returns the builder instance.- Specified by:
self
in classOperation.Builder<Query.Builder>
- Returns:
- Builder
-
type
public Query.Builder type(QueryType type)
Set the query type.- Parameters:
type
- query type enum- Returns:
- Builder
-
pagingModes
public Query.Builder pagingModes(PagingMode... pagingMode)
Set the paging mode.- Parameters:
pagingMode
- Query paging mode enum- Returns:
- Builder
-
countPolicies
public Query.Builder countPolicies(CountPolicy... countPolicy)
Set the supported page count 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.- Parameters:
countPolicy
- Array of supported paging mode policies- Returns:
- Builder
-
queryId
public Query.Builder queryId(String queryId)
Set the query id. Required if “type” is ID.- Parameters:
queryId
- Query id- Returns:
- Builder
-
queryableFields
public Query.Builder queryableFields(String... queryableFields)
Set the queryable fields.- Parameters:
queryableFields
- Array of the fields that are queryable- Returns:
- Builder
-
supportedSortKeys
public Query.Builder supportedSortKeys(String... supportedSortKeys)
Set the supported sort keys.- Parameters:
supportedSortKeys
- Array of supported sort keys- Returns:
- Builder
-
build
public Query build()
Builds the Query instance.- Returns:
- Query instance
-
-