Class ExtensionItemSqlMapper<Q extends FlexibleRelationalPathBase<R>,R>
- java.lang.Object
-
- com.evolveum.midpoint.repo.sqale.mapping.ExtensionItemSqlMapper<Q,R>
-
- Type Parameters:
Q
- entity path owning the mapped itemR
- row type with the mapped item
- All Implemented Interfaces:
UpdatableItemSqlMapper<Q,R>
,ItemSqlMapper<Q,R>
public class ExtensionItemSqlMapper<Q extends FlexibleRelationalPathBase<R>,R> extends Object implements UpdatableItemSqlMapper<Q,R>
Extension item mapper that is much lazier thanSqaleItemSqlMapper
for typical column. Normally the mapper knows how to get from the query/update contextual information to the columns. This mapper only knows the way to the JSONB column and lets extension item filter/delta processors to do the rest of the work based on the context and item information contained in the filter/modification.
-
-
Constructor Summary
Constructors Constructor Description ExtensionItemSqlMapper(@NotNull Function<Q,JsonbPath> rootToExtensionPath, @NotNull MExtItemHolderType holderType, @NotNull SqaleRepoContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ValueFilter<?,?>>
@Nullable ItemValueFilterProcessor<T>createFilterProcessor(SqlQueryContext<?,?,?> sqlQueryContext)
CreatesItemValueFilterProcessor
based on this mapping.ItemDeltaProcessor
createItemDeltaProcessor(SqaleUpdateContext<?,?,?> sqlUpdateContext)
CreatesItemDeltaProcessor
based on this mapping.@Nullable RightHandProcessor
createRightHandProcessor(SqlQueryContext<?,?,?> sqlQueryContext)
@Nullable com.querydsl.core.types.Expression<?>
primaryPath(Q entityPath, ItemDefinition<?> definition)
Returns primary path for provided entity path - usable for ordering.
-
-
-
Constructor Detail
-
ExtensionItemSqlMapper
public ExtensionItemSqlMapper(@NotNull @NotNull Function<Q,JsonbPath> rootToExtensionPath, @NotNull @NotNull MExtItemHolderType holderType, @NotNull @NotNull SqaleRepoContext context)
-
-
Method Detail
-
primaryPath
@Nullable public @Nullable com.querydsl.core.types.Expression<?> primaryPath(Q entityPath, ItemDefinition<?> definition) throws QueryException
Description copied from interface:ItemSqlMapper
Returns primary path for provided entity path - usable for ordering.- Specified by:
primaryPath
in interfaceItemSqlMapper<Q extends FlexibleRelationalPathBase<R>,R>
- Throws:
QueryException
-
createFilterProcessor
@Nullable public <T extends ValueFilter<?,?>> @Nullable ItemValueFilterProcessor<T> createFilterProcessor(SqlQueryContext<?,?,?> sqlQueryContext)
Description copied from interface:ItemSqlMapper
CreatesItemValueFilterProcessor
based on this mapping. ProvidedSqlQueryContext
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. [NOTE] This may return null if the subclass supports other type of mapping for this item, but not filtering for queries (e.g. update only item).- Specified by:
createFilterProcessor
in interfaceItemSqlMapper<Q extends FlexibleRelationalPathBase<R>,R>
-
createRightHandProcessor
@Nullable public @Nullable RightHandProcessor createRightHandProcessor(SqlQueryContext<?,?,?> sqlQueryContext)
- Specified by:
createRightHandProcessor
in interfaceItemSqlMapper<Q extends FlexibleRelationalPathBase<R>,R>
-
createItemDeltaProcessor
public ItemDeltaProcessor createItemDeltaProcessor(SqaleUpdateContext<?,?,?> sqlUpdateContext)
Description copied from interface:UpdatableItemSqlMapper
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<Q extends FlexibleRelationalPathBase<R>,R>
-
-