Class RefTableTargetResolver<Q extends QReference<R,?>,R extends MReference,TQ extends QObject<TR>,TR extends MObject>
java.lang.Object
com.evolveum.midpoint.repo.sqale.mapping.RefTableTargetResolver<Q,R,TQ,TR>
- Type Parameters:
Q
- type of reference entity path (where the mapping is)R
- row type forRefTableTargetResolver
TQ
- type of target entity path, that is referenced objectTR
- row type related to the target entity pathRefTableTargetResolver
- All Implemented Interfaces:
ItemRelationResolver<Q,
R, TQ, TR>
public class RefTableTargetResolver<Q extends QReference<R,?>,R extends MReference,TQ extends QObject<TR>,TR extends MObject>
extends Object
implements ItemRelationResolver<Q,R,TQ,TR>
Resolver that knows how to traverse from reference table to the reference target.
The resolver uses mapping lazily via supplier to avoid call cycles during mapping initialization.
Ideal mapping type provided by the supplier is to be found in the schema inside
`<a:objectReferenceTargetType>` element for the reference, using more generic type means
Postgres has to search through more sub-tables than necessary and also doesn't provide
the right implicit type for further conditions on the target.
-
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
ConstructorDescriptionRefTableTargetResolver
(@NotNull Supplier<QueryTableMapping<?, TQ, TR>> targetMappingSupplier) -
Method Summary
Modifier and TypeMethodDescriptionresolve
(SqlQueryContext<?, Q, R> context) Resolves a query context toItemRelationResolver.ResolutionResult
with new context and mapping.
-
Constructor Details
-
RefTableTargetResolver
public RefTableTargetResolver(@NotNull @NotNull Supplier<QueryTableMapping<?, TQ, TR>> targetMappingSupplier)
-
-
Method Details
-
resolve
Description copied from interface:ItemRelationResolver
Resolves a query context toItemRelationResolver.ResolutionResult
with new context and mapping. The information about the resolved item is captured in the instance resolver already in a manner that is specific for various types of resolution (subquery or nested mapping).- Specified by:
resolve
in interfaceItemRelationResolver<Q extends QReference<R,
?>, R extends MReference, TQ extends QObject<TR>, TR extends MObject>
-