Class CountMappingResolver<Q extends FlexibleRelationalPathBase<R>,R>
- java.lang.Object
-
- com.evolveum.midpoint.repo.sqale.mapping.CountMappingResolver<Q,R>
-
- Type Parameters:
Q
- query type of entity where the mapping is nested and declaredR
- row type ofCountMappingResolver
- All Implemented Interfaces:
SqaleItemRelationResolver<Q,R,Q,R>
,ItemRelationResolver<Q,R,Q,R>
public class CountMappingResolver<Q extends FlexibleRelationalPathBase<R>,R> extends Object implements SqaleItemRelationResolver<Q,R,Q,R>
Resolver that maps the container item to the count column.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.repo.sqlbase.mapping.ItemRelationResolver
ItemRelationResolver.ResolutionResult<TQ extends FlexibleRelationalPathBase<TR>,TR>
-
-
Constructor Summary
Constructors Constructor Description CountMappingResolver(Function<Q,com.querydsl.core.types.dsl.NumberPath<Integer>> rootToCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.querydsl.core.types.Predicate
createExistsPredicate(SqaleQueryContext<?,Q,R> context)
This creates the predicate representing the EXISTS filter.SqaleUpdateContext<?,?,?>
resolve(SqaleUpdateContext<?,Q,R> context, ItemPath itemPath)
Resolves current query context to a new context (mapping is always part of context).ItemRelationResolver.ResolutionResult<Q,R>
resolve(SqlQueryContext<?,Q,R> context)
Should not be called, the count must be treated before this happens.
-
-
-
Method Detail
-
resolve
public ItemRelationResolver.ResolutionResult<Q,R> resolve(SqlQueryContext<?,Q,R> context)
Should not be called, the count must be treated before this happens.- Specified by:
resolve
in interfaceItemRelationResolver<Q extends FlexibleRelationalPathBase<R>,R,Q extends FlexibleRelationalPathBase<R>,R>
-
createExistsPredicate
public com.querydsl.core.types.Predicate createExistsPredicate(SqaleQueryContext<?,Q,R> context)
This creates the predicate representing the EXISTS filter.
-
resolve
public SqaleUpdateContext<?,?,?> resolve(SqaleUpdateContext<?,Q,R> context, ItemPath itemPath)
Description copied from interface:SqaleItemRelationResolver
Resolves current query context to a new context (mapping is always part of context). The information about the resolved item is captured in the instance resolver already in a manner that is specific for various types of resolution (JOIN or nested mapping). OptionalItemPath
is provided for cases when container ID is necessary. Return value `null` indicates that the modification using the resolver should be ignored by the repository.- Specified by:
resolve
in interfaceSqaleItemRelationResolver<Q extends FlexibleRelationalPathBase<R>,R,Q extends FlexibleRelationalPathBase<R>,R>
-
-