Package com.evolveum.midpoint.repo.sqale
Class SqaleQueryContext<S,Q extends FlexibleRelationalPathBase<R>,R>
java.lang.Object
com.evolveum.midpoint.repo.sqlbase.SqlQueryContext<S,Q,R>
com.evolveum.midpoint.repo.sqale.SqaleQueryContext<S,Q,R>
- All Implemented Interfaces:
FilterProcessor<ObjectFilter>
public class SqaleQueryContext<S,Q extends FlexibleRelationalPathBase<R>,R>
extends SqlQueryContext<S,Q,R>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.evolveum.midpoint.repo.sqlbase.SqlQueryContext
SqlQueryContext.ResolveResult<CQ extends FlexibleRelationalPathBase<CR>,CR> -
Field Summary
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.SqlQueryContext
DEFAULT_PAGE_SIZE, entityPath, entityPathMapping, MAX_ID_IN_FOR_TO_MANY_FETCH, NO_PAGINATION_LIMIT, notFilterUsed, options, sqlQuery -
Method Summary
Modifier and TypeMethodDescriptionvoidBefore-query hook, empty by default, called *before* the JDBC transaction starts.static <S,Q extends FlexibleRelationalPathBase<R>, R>
SqaleQueryContext<S,Q, R> from(SqaleTableMapping<S, Q, R> rootMapping, SqaleRepoContext sqlRepoContext, com.querydsl.sql.SQLQuery<?> sqlQuery, SqaleObjectLoader objectLoader) static <S,Q extends FlexibleRelationalPathBase<R>, R>
SqaleQueryContext<S,Q, R> from(Class<S> schemaType, SqaleRepoContext sqlRepoContext) static <S,Q extends FlexibleRelationalPathBase<R>, R>
SqaleQueryContext<S,Q, R> from(Class<S> schemaType, SqaleRepoContext sqlRepoContext, SqaleObjectLoader objectLoader) static <S,Q extends FlexibleRelationalPathBase<R>, R>
SqaleQueryContext<S,Q, R> from(Class<S> schemaType, SqaleRepoContext sqlRepoContext, com.querydsl.sql.SQLQuery<?> sqlQuery, SqaleObjectLoader objectLoader) Factory method useful for cases when specific sqlQuery instance needs to be provided.<T extends ObjectType>
PrismObject<T>loadObject(JdbcSession jdbcSession, Class<T> objectType, UUID oid, Collection<SelectorOptions<GetOperationOptions>> options) void<TS,TQ extends FlexibleRelationalPathBase<TR>, TR>
SqlQueryContext<TS,TQ, TR> nestedContext(SqaleNestedMapping<TS, TQ, TR> nestedMapping) protected <TS,TQ extends FlexibleRelationalPathBase<TR>, TR>
SqlQueryContext<TS,TQ, TR> newSubcontext(TQ newPath, QueryTableMapping<TS, TQ, TR> newMapping) Returns derivedSqaleQueryContextfor JOIN.protected <TS,TQ extends FlexibleRelationalPathBase<TR>, TR>
SqlQueryContext<TS,TQ, TR> newSubcontext(TQ newPath, QueryTableMapping<TS, TQ, TR> newMapping, com.querydsl.sql.SQLQuery<?> query) Returns derivedSqaleQueryContextfor subquery.SqaleQueryContext<?,?, ?> com.querydsl.core.types.Predicateprocess(@NotNull ObjectFilter filter) Implements contract forFilterProcessorworking as a top-level dispatcher to concrete filter types.com.querydsl.core.types.PredicateprocessFuzzyFilter(FuzzyStringMatchFilter<?> filter, com.querydsl.core.types.Expression<?> path, ValueFilterValues<?, ?> values) Produces predicate for fuzzy filter with pre-provided expression for the left side.@NotNull IntegersearchCachedRelationId(QName qName) Methods inherited from class com.evolveum.midpoint.repo.sqlbase.SqlQueryContext
createCanonicalItemPath, executeCount, executeQuery, isNotFilterUsed, leftJoin, mapping, markNotFilterUsage, normalizeRelation, path, path, prismContext, processFilter, processObjectPaging, processOptions, qNameToSchemaClass, resolvePathWithJoins, root, root, sqlQuery, subquery, subquery, transformToSchemaType, uniqueAliasNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.repo.sqlbase.filtering.FilterProcessor
process
-
Method Details
-
from
public static <S,Q extends FlexibleRelationalPathBase<R>, SqaleQueryContext<S,R> Q, fromR> (Class<S> schemaType, SqaleRepoContext sqlRepoContext) -
from
public static <S,Q extends FlexibleRelationalPathBase<R>, SqaleQueryContext<S,R> Q, fromR> (Class<S> schemaType, SqaleRepoContext sqlRepoContext, SqaleObjectLoader objectLoader) -
from
public static <S,Q extends FlexibleRelationalPathBase<R>, SqaleQueryContext<S,R> Q, fromR> (Class<S> schemaType, SqaleRepoContext sqlRepoContext, com.querydsl.sql.SQLQuery<?> sqlQuery, SqaleObjectLoader objectLoader) Factory method useful for cases when specific sqlQuery instance needs to be provided. -
from
public static <S,Q extends FlexibleRelationalPathBase<R>, SqaleQueryContext<S,R> Q, fromR> (SqaleTableMapping<S, Q, R> rootMapping, SqaleRepoContext sqlRepoContext, com.querydsl.sql.SQLQuery<?> sqlQuery, SqaleObjectLoader objectLoader) -
process
public com.querydsl.core.types.Predicate process(@NotNull @NotNull ObjectFilter filter) throws RepositoryException Description copied from class:SqlQueryContextImplements contract forFilterProcessorworking as a top-level dispatcher to concrete filter types. This is a universal/generic filter processor that dispatches to the actual filter processor based on the filter type. It is used both as an entry point for the root filter of the query, but also when various structural filters need to resolve their components (e.g. AND uses this for its components). *This only returns the created predicate, compare withSqlQueryContext.processFilter(com.evolveum.midpoint.prism.query.ObjectFilter).* Some subtypes ofObjectFilterfrom Prism API are not supported here, see subclasses.- Specified by:
processin interfaceFilterProcessor<S>- Overrides:
processin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R> - Throws:
RepositoryException
-
repositoryContext
- Overrides:
repositoryContextin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R>
-
searchCachedRelationId
-
markContainsOrgFilter
public void markContainsOrgFilter() -
newSubcontext
protected <TS,TQ extends FlexibleRelationalPathBase<TR>, SqlQueryContext<TS,TR> TQ, newSubcontextTR> (TQ newPath, QueryTableMapping<TS, TQ, TR> newMapping) Returns derivedSqaleQueryContextfor JOIN.- Specified by:
newSubcontextin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R> TQ- query type for the new (target) tableTR- row type related to theSqlQueryContext
-
newSubcontext
protected <TS,TQ extends FlexibleRelationalPathBase<TR>, SqlQueryContext<TS,TR> TQ, newSubcontextTR> (TQ newPath, QueryTableMapping<TS, TQ, TR> newMapping, com.querydsl.sql.SQLQuery<?> query) Returns derivedSqaleQueryContextfor subquery.- Specified by:
newSubcontextin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R> TQ- query type for the new (target) tableTR- row type related to theSqlQueryContext
-
loadObject
public <T extends ObjectType> PrismObject<T> loadObject(JdbcSession jdbcSession, Class<T> objectType, UUID oid, Collection<SelectorOptions<GetOperationOptions>> options) -
parentContext
- Overrides:
parentContextin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R>
-
beforeQuery
public void beforeQuery()Description copied from class:SqlQueryContextBefore-query hook, empty by default, called *before* the JDBC transaction starts.- Overrides:
beforeQueryin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R>
-
queryMapping
- Overrides:
queryMappingin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R>
-
nestedContext
public <TS,TQ extends FlexibleRelationalPathBase<TR>, SqlQueryContext<TS,TR> TQ, nestedContextTR> (SqaleNestedMapping<TS, TQ, TR> nestedMapping) -
processFuzzyFilter
public com.querydsl.core.types.Predicate processFuzzyFilter(FuzzyStringMatchFilter<?> filter, com.querydsl.core.types.Expression<?> path, ValueFilterValues<?, ?> values) throws QueryExceptionDescription copied from class:SqlQueryContextProduces predicate for fuzzy filter with pre-provided expression for the left side. This does not care about single/multi-value definition which must be treated above this method.- Overrides:
processFuzzyFilterin classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>, R> - Throws:
QueryException
-