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>
-
-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeQuery()
Before-query hook, empty by default, called *before* the JDBC transaction starts.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
markContainsOrgFilter()
protected <TS,TQ extends FlexibleRelationalPathBase<TR>,TR>
SqlQueryContext<TS,TQ,TR>newSubcontext(TQ newPath, QueryTableMapping<TS,TQ,TR> newMapping)
Returns derivedSqaleQueryContext
for 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 derivedSqaleQueryContext
for subquery.SqaleQueryContext<?,?,?>
parentContext()
com.querydsl.core.types.Predicate
process(@NotNull ObjectFilter filter)
Implements contract forFilterProcessor
working as a top-level dispatcher to concrete filter types.SqaleRepoContext
repositoryContext()
@NotNull Integer
searchCachedRelationId(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, root, root, sqlQuery, subquery, subquery, transformToSchemaType, uniqueAliasName
-
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.filtering.FilterProcessor
process
-
-
-
-
Method Detail
-
from
public static <S,Q extends FlexibleRelationalPathBase<R>,R> SqaleQueryContext<S,Q,R> from(Class<S> schemaType, SqaleRepoContext sqlRepoContext)
-
from
public static <S,Q extends FlexibleRelationalPathBase<R>,R> SqaleQueryContext<S,Q,R> from(Class<S> schemaType, SqaleRepoContext sqlRepoContext, SqaleObjectLoader objectLoader)
-
from
public 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.
-
process
public com.querydsl.core.types.Predicate process(@NotNull @NotNull ObjectFilter filter) throws RepositoryException
Description copied from class:SqlQueryContext
Implements contract forFilterProcessor
working 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 ofObjectFilter
from Prism API are not supported here, see subclasses.- Specified by:
process
in interfaceFilterProcessor<S>
- Overrides:
process
in classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>,R>
- Throws:
RepositoryException
-
repositoryContext
public SqaleRepoContext repositoryContext()
- Overrides:
repositoryContext
in classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>,R>
-
markContainsOrgFilter
public void markContainsOrgFilter()
-
newSubcontext
protected <TS,TQ extends FlexibleRelationalPathBase<TR>,TR> SqlQueryContext<TS,TQ,TR> newSubcontext(TQ newPath, QueryTableMapping<TS,TQ,TR> newMapping)
Returns derivedSqaleQueryContext
for JOIN.- Specified by:
newSubcontext
in 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>,TR> SqlQueryContext<TS,TQ,TR> newSubcontext(TQ newPath, QueryTableMapping<TS,TQ,TR> newMapping, com.querydsl.sql.SQLQuery<?> query)
Returns derivedSqaleQueryContext
for subquery.- Specified by:
newSubcontext
in 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
public SqaleQueryContext<?,?,?> parentContext()
- Overrides:
parentContext
in classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>,R>
-
beforeQuery
public void beforeQuery()
Description copied from class:SqlQueryContext
Before-query hook, empty by default, called *before* the JDBC transaction starts.- Overrides:
beforeQuery
in classSqlQueryContext<S,Q extends FlexibleRelationalPathBase<R>,R>
-
-