Class TypedQuery<T>
java.lang.Object
com.evolveum.midpoint.schema.query.AbstractTypedQuery<T,TypedQuery<T>>
com.evolveum.midpoint.schema.query.TypedQuery<T>
- Type Parameters:
T
- Resulting item type
- All Implemented Interfaces:
Serializable
Typed Query represents query with filter, which can be used for searching references, containers and objects (depending on item type).
Typed Query can be converted to existing
ObjectQuery
interface using toObjectQuery()
method. This allows
to use TypedQuery as a builder for ObjectQuery
where resulting object queries will only differ in paging information,
but use same filter.- See Also:
-
Field Summary
Fields inherited from class com.evolveum.midpoint.schema.query.AbstractTypedQuery
type
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TypedQuery<T>
from
(Class<T> type, ObjectFilter filter) Creates TypedFilter for supplied type and filter.Returns explicitly configured set ofGetOperationOptions
If set was not explicitly set usingsetOptions(Collection)
, it is constructed usingAbstractTypedQuery.operationOptionsBuilder()
.getType()
static <T> TypedQuery<T>
Creates TypedFilter for supplied type and query string.protected TypedQuery<T>
self()
void
setOptions
(Collection<SelectorOptions<GetOperationOptions>> options) Creates newObjectQuery
representing thisTypedQuery
, created Object query uses same filter and copy of current paging information.Methods inherited from class com.evolveum.midpoint.schema.query.AbstractTypedQuery
buildObjectPaging, fillFrom, getMaxSize, getOffset, maxSize, offset, operationOptionsBuilder, orderBy, pagingRequired
-
Method Details
-
getType
-
parse
Creates TypedFilter for supplied type and query string. Query string must not contain placeholders. If you need placeholder support seePreparedQuery.parse(Class, String)
. Resulting query doe- Type Parameters:
T
-- Parameters:
type
- Type of the items which query should returnquery
- Midpoint Query string without placeholders- Returns:
- new Typed Query which contains parsed filter and type information, no ordering and no paging information.
- Throws:
SchemaException
- when supplied query string was syntactically or logically incorrect
-
from
Creates TypedFilter for supplied type and filter.- Type Parameters:
T
- Type of the items which query should return- Parameters:
type
- Type of the items which query should returnfilter
- Existing filter to be used for typed query- Returns:
- Typed Query which contains filter and type information, no ordering and no paging information.
-
toObjectQuery
Creates newObjectQuery
representing thisTypedQuery
, created Object query uses same filter and copy of current paging information. This allows to use one TypedQuery to be used to generate multiple page specific queries.- Returns:
- new Object Query representing this Type Query
-
getOptions
Returns explicitly configured set ofGetOperationOptions
If set was not explicitly set usingsetOptions(Collection)
, it is constructed usingAbstractTypedQuery.operationOptionsBuilder()
.- Returns:
- Set of
GetOperationOptions
-
setOptions
-
self
- Specified by:
self
in classAbstractTypedQuery<T,
TypedQuery<T>>
-