Class SqaleItemSqlMapper<S,Q extends FlexibleRelationalPathBase<R>,R>
- java.lang.Object
-
- com.evolveum.midpoint.repo.sqlbase.mapping.DefaultItemSqlMapper<S,Q,R>
-
- com.evolveum.midpoint.repo.sqale.mapping.SqaleItemSqlMapper<S,Q,R>
-
- Type Parameters:
S
- schema type owning the mapped itemQ
- entity path owning the mapped itemR
- row type with the mapped item
- All Implemented Interfaces:
UpdatableItemSqlMapper<Q,R>
,ItemSqlMapper<Q,R>
public class SqaleItemSqlMapper<S,Q extends FlexibleRelationalPathBase<R>,R> extends DefaultItemSqlMapper<S,Q,R> implements UpdatableItemSqlMapper<Q,R>
Declarative information how an item (from schema/prism world) is to be processed when interpreting query or applying delta (delta application is addition to sqlbase superclass). Being extension ofDefaultItemSqlMapper
this uses processor factory functions (typically provided as lambdas), no logic is here, everything is delegated to the processors returned by these processor functions.
-
-
Constructor Summary
Constructors Constructor Description SqaleItemSqlMapper(@NotNull Function<SqaleUpdateContext<S,Q,R>,ItemDeltaValueProcessor<?>> deltaProcessorFactory)
Version of mapper supporting only delta processor, but not filter processor.SqaleItemSqlMapper(@NotNull Function<SqlQueryContext<S,Q,R>,ItemValueFilterProcessor<?>> filterProcessorFactory, @NotNull Function<SqaleUpdateContext<S,Q,R>,ItemDeltaValueProcessor<?>> deltaProcessorFactory)
SqaleItemSqlMapper(@NotNull Function<SqlQueryContext<S,Q,R>,ItemValueFilterProcessor<?>> filterProcessorFactory, @NotNull Function<SqaleUpdateContext<S,Q,R>,ItemDeltaValueProcessor<?>> deltaProcessorFactory, @Nullable Function<Q,P> primaryItemMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemDeltaValueProcessor<?>
createItemDeltaProcessor(SqaleUpdateContext<?,?,?> sqlUpdateContext)
CreatesItemDeltaProcessor
based on this mapping.-
Methods inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.DefaultItemSqlMapper
createFilterProcessor, createRightHandProcessor, primaryPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.repo.sqlbase.mapping.ItemSqlMapper
createFilterProcessor, createRightHandProcessor, primaryPath
-
-
-
-
Constructor Detail
-
SqaleItemSqlMapper
public SqaleItemSqlMapper(@NotNull @NotNull Function<SqlQueryContext<S,Q,R>,ItemValueFilterProcessor<?>> filterProcessorFactory, @NotNull @NotNull Function<SqaleUpdateContext<S,Q,R>,ItemDeltaValueProcessor<?>> deltaProcessorFactory, @Nullable @Nullable Function<Q,P> primaryItemMapping)
-
SqaleItemSqlMapper
public SqaleItemSqlMapper(@NotNull @NotNull Function<SqlQueryContext<S,Q,R>,ItemValueFilterProcessor<?>> filterProcessorFactory, @NotNull @NotNull Function<SqaleUpdateContext<S,Q,R>,ItemDeltaValueProcessor<?>> deltaProcessorFactory)
-
SqaleItemSqlMapper
public SqaleItemSqlMapper(@NotNull @NotNull Function<SqaleUpdateContext<S,Q,R>,ItemDeltaValueProcessor<?>> deltaProcessorFactory)
Version of mapper supporting only delta processor, but not filter processor. Typical example is container which can't be used as a filter condition as a whole. This does not mean the inner part of the item can't be resolved and filtered by, but it's not job of this mapper (seeItemRelationResolver
).
-
-
Method Detail
-
createItemDeltaProcessor
public ItemDeltaValueProcessor<?> createItemDeltaProcessor(SqaleUpdateContext<?,?,?> sqlUpdateContext)
CreatesItemDeltaProcessor
based on this mapping. ProvidedSqaleUpdateContext
is used to figure out the query paths when this is executed (as the entity path instance is not yet available when the mapping is configured in a declarative manner). The type of the returned processor is adapted to the client code needs for convenience. Also the type of the provided context is flexible, but with proper mapping it's all safe.- Specified by:
createItemDeltaProcessor
in interfaceUpdatableItemSqlMapper<S,Q extends FlexibleRelationalPathBase<R>>
-
-