public interface BeforeModifyOccurrenceContext extends TableTriggerExecutionContext
Modifier and Type | Method and Description |
---|---|
Adaptation |
getAdaptationOccurrence()
Returns the record to be modified.
|
ValueChanges |
getChanges()
Returns the changes that will modify the current record.
|
DefinitionMode |
getDefinitionMode()
Returns the definition mode of the record to be modified.
|
ValueContextForUpdate |
getOccurrenceContextForUpdate()
Returns the record context for performing the update.
|
boolean |
isAllPrivileges() |
void |
setAllPrivileges()
Disables all permission checks for all nodes
during the current operation.
|
getAdaptationHome, getOccurrenceContext, getTable, isHistoryRestore
getSession
ValueChanges getChanges()
More precisely, the returned changes are those that are known just before entering
the trigger method handleBeforeModify
. If, during the execution
of this method, a ValueContextForUpdate.setValue...
is invoked,
it is not taken into account by the returned object. Such additional modifications are taken into
account after handleBeforeModify
, and the trigger can access them
(all changes) in handleAfterModify
.
Adaptation getAdaptationOccurrence()
ValueContextForUpdate getOccurrenceContextForUpdate()
read context
,
but allows setting additional data in the context.
When a record is copied as-is from one table to another
(see ProcedureContext.getContext(AdaptationName)
), the default
context is a read context. In this case, this method
transforms it from a read context to an update context.
DefinitionMode getDefinitionMode()
boolean isAllPrivileges()
setAllPrivileges()
void setAllPrivileges()
Using this method is not recommended, because the scope of the granted
privileges is very wide. It is instead recommended to use
ValueContextForUpdate.setPrivilegeForNode(com.orchestranetworks.schema.Path)
,
which allows to grant privilege to required nodes only.
As soon as these privileges are granted by this method, permission check for the specified node will be skipped during the whole operation.
For instance, given a user with read-only permission on the some updated nodes:
setAllPrivileges(false)
could still set a value for these nodes.The granted privilege will return to its previous state just after the update operation and before the invocation of after modify triggers.