Class SqlPathContext<S,Q extends FlexibleRelationalPathBase<R>,R>
- java.lang.Object
-
- com.evolveum.midpoint.repo.sql.pure.SqlPathContext<S,Q,R>
-
- Type Parameters:
S
- schema type, used by encapsulated mappingQ
- type of entity pathR
- row type related to theSqlPathContext
- Direct Known Subclasses:
SqlQueryContext
public abstract class SqlPathContext<S,Q extends FlexibleRelationalPathBase<R>,R> extends Object
SQL path context with mapping information.TODO if this proves to have a single subclass in, say, 2022, merge them into one, please The idea is/was that not every context requires query - or represents the whole query. Some sub-contexts may create inner query, e.g. in EXISTS clause. On the other hand, even if sub-context does not represent the new query but only part of existing one, e.g. JOIN path, we still need access to the original query, for instance to add another JOIN, or test existing joins, etc. But this can be done by creating new SqlQueryContext with the same query and different path. So - if no special needs arise (e.g. for EXISTS support)... merge these classes. ;-)
-
-
Constructor Summary
Constructors Constructor Description SqlPathContext(Q path, QueryModelMapping<S,Q,R> mapping, PrismContext prismContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends ObjectFilter>
@NotNull FilterProcessor<T>createItemFilterProcessor(ItemName itemName)
boolean
isNotFilterUsed()
abstract <DQ extends FlexibleRelationalPathBase<DR>,DR>
SqlQueryContext<?,DQ,DR>leftJoin(DQ newPath, @NotNull BiFunction<Q,DQ,com.querydsl.core.types.Predicate> joinOnPredicate)
QueryModelMapping<S,Q,R>
mapping()
void
markNotFilterUsage()
Q
path()
Returns entity path of this context.<T extends FlexibleRelationalPathBase<?>>
Tpath(Class<T> pathType)
PrismContext
prismContext()
abstract String
uniqueAliasName(String baseAliasName)
-
-
-
Constructor Detail
-
SqlPathContext
public SqlPathContext(Q path, QueryModelMapping<S,Q,R> mapping, PrismContext prismContext)
-
-
Method Detail
-
path
public Q path()
Returns entity path of this context.
-
path
public <T extends FlexibleRelationalPathBase<?>> T path(Class<T> pathType)
-
mapping
public QueryModelMapping<S,Q,R> mapping()
-
prismContext
public PrismContext prismContext()
-
createItemFilterProcessor
@NotNull public <T extends ObjectFilter> @NotNull FilterProcessor<T> createItemFilterProcessor(ItemName itemName) throws QueryException
- Throws:
QueryException
-
markNotFilterUsage
public void markNotFilterUsage()
-
isNotFilterUsed
public boolean isNotFilterUsed()
-
leftJoin
public abstract <DQ extends FlexibleRelationalPathBase<DR>,DR> SqlQueryContext<?,DQ,DR> leftJoin(@NotNull DQ newPath, @NotNull @NotNull BiFunction<Q,DQ,com.querydsl.core.types.Predicate> joinOnPredicate)
-
-