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
Fields inherited from class com.evolveum.midpoint.repo.sqale.update.SqaleUpdateContext
jdbcSession, logger, parentContext, row, subcontexts
-
Constructor Summary
ConstructorDescriptionRootUpdateContext
(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> O
findValueOrItem
(@NotNull ItemPath path) void
Executes all necessary SQL updates (including sub-entity inserts/deletes) for the enclosedobject
.void
finishExecutionSetCidOnly
(long newIdSeq) boolean
isOverwrittenId
(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.SQLUpdateClause
update()
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:SqaleUpdateContext
Returns 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:
entityPath
in classSqaleUpdateContext<S extends ObjectType,
Q extends QObject<R>, R extends MObject>
-
mapping
- Specified by:
mapping
in 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:
SchemaException
RepositoryException
-
execute
public Collection<? extends ItemDelta<?,?>> execute(Collection<? extends ItemDelta<?, ?>> modifications, boolean updateTables) throws SchemaException, RepositoryException- Throws:
SchemaException
RepositoryException
-
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:
finishExecutionOwn
in classSqaleUpdateContext<S extends ObjectType,
Q extends QObject<R>, R extends MObject> - Throws:
SchemaException
RepositoryException
-
finishExecutionSetCidOnly
- Throws:
RepositoryException
-
findValueOrItem
- Overrides:
findValueOrItem
in classSqaleUpdateContext<S extends ObjectType,
Q extends QObject<R>, R extends MObject>
-
isOverwrittenId
- Overrides:
isOverwrittenId
in 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:
set
in 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:
set
in 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:
setNull
in classSqaleUpdateContext<S extends ObjectType,
Q extends QObject<R>, R extends MObject>
-
objectOid
-
getPrismObject
-