Class RootUpdateContext<S extends ObjectType,Q extends QObject<R>,R extends MObject>
java.lang.Object
com.evolveum.midpoint.repo.sqale.update.SqaleUpdateContext<S,Q,R>
com.evolveum.midpoint.repo.sqale.update.RootUpdateContext<S,Q,R>
- Type Parameters:
S- schema typeQ- type of entity pathR- row type related to theRootUpdateContext
public class RootUpdateContext<S extends ObjectType,Q extends QObject<R>,R extends MObject>
extends SqaleUpdateContext<S,Q,R>
Root context of the update context tree, see
SqaleUpdateContext for more information.-
Field Summary
FieldsFields inherited from class com.evolveum.midpoint.repo.sqale.update.SqaleUpdateContext
jdbcSession, logger, parentContext, row, subcontexts -
Constructor Summary
ConstructorsConstructorDescriptionRootUpdateContext(SqaleRepoContext repositoryContext, JdbcSession jdbcSession, S object, R rootRow) -
Method Summary
Modifier and TypeMethodDescriptionReturns entity path (table) for the context.Collection<? extends ItemDelta<?,?>> execute(Collection<? extends ItemDelta<?, ?>> modifications) Applies modifications, executes necessary updates and returns narrowed modifications.Collection<? extends ItemDelta<?,?>> execute(Collection<? extends ItemDelta<?, ?>> modifications, boolean updateTables) <O> OfindValueOrItem(@NotNull ItemPath path) voidExecutes all necessary SQL updates (including sub-entity inserts/deletes) for the enclosedobject.voidfinishExecutionSetCidOnly(long newIdSeq) booleanisOverwrittenId(Long id) mapping()<P extends com.querydsl.core.types.Path<T>,T>
voidset(P path, com.querydsl.core.types.Expression<T> expression) <P extends com.querydsl.core.types.Path<T>,T>
voidset(P path, T value) <P extends com.querydsl.core.types.Path<T>,T>
voidsetNull(P path) com.querydsl.sql.dml.SQLUpdateClauseupdate()Methods inherited from class com.evolveum.midpoint.repo.sqale.update.SqaleUpdateContext
addSubcontext, findValueOrItem, finishExecution, getSubcontext, insertOwnedRow, jdbcSession, repositoryContext, row
-
Field Details
-
mapping
-
-
Constructor Details
-
RootUpdateContext
public RootUpdateContext(SqaleRepoContext repositoryContext, JdbcSession jdbcSession, S object, R rootRow)
-
-
Method Details
-
entityPath
Description copied from class:SqaleUpdateContextReturns entity path (table) for the context. This is NOT the path for item column, which can be actually multiple columns (ref, poly) or just part of the value in the column (JSONB).- Specified by:
entityPathin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject>
-
mapping
- Specified by:
mappingin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject>
-
execute
public Collection<? extends ItemDelta<?,?>> execute(Collection<? extends ItemDelta<?, ?>> modifications) throws SchemaException, RepositoryExceptionApplies modifications, executes necessary updates and returns narrowed modifications. If returned narrowed modifications are empty, no update was made and version stays the same!- Throws:
SchemaExceptionRepositoryException
-
execute
public Collection<? extends ItemDelta<?,?>> execute(Collection<? extends ItemDelta<?, ?>> modifications, boolean updateTables) throws SchemaException, RepositoryException- Throws:
SchemaExceptionRepositoryException
-
finishExecutionOwn
Executes all necessary SQL updates (including sub-entity inserts/deletes) for the enclosedobject. This also increments the version information and serializes `fullObject`. This is made public for cases when we want to update full object even without modifications.- Specified by:
finishExecutionOwnin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject> - Throws:
SchemaExceptionRepositoryException
-
finishExecutionSetCidOnly
- Throws:
RepositoryException
-
findValueOrItem
- Overrides:
findValueOrItemin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject>
-
isOverwrittenId
- Overrides:
isOverwrittenIdin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject>
-
update
public com.querydsl.sql.dml.SQLUpdateClause update() -
set
public <P extends com.querydsl.core.types.Path<T>,T> void set(P path, T value) - Specified by:
setin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject>
-
set
public <P extends com.querydsl.core.types.Path<T>,T> void set(P path, com.querydsl.core.types.Expression<T> expression) - Specified by:
setin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject>
-
setNull
public <P extends com.querydsl.core.types.Path<T>,T> void setNull(P path) - Specified by:
setNullin classSqaleUpdateContext<S extends ObjectType,Q extends QObject<R>, R extends MObject>
-
objectOid
-
getPrismObject
-