Interface DecompositionContext
Context for decomposition operations, providing information about entities being mutated in the current flush.
This allows decomposition logic (e.g., ForeignKeys.Nullifier)
to distinguish between:
- Truly unresolved transient entities (not being inserted in this flush)
- Entities being inserted in this flush (should not be treated as unresolved)
- Entities being deleted in this flush (UPDATEs can be skipped)
Implemented by Decomposer and passed to components that need this context.
- Since:
- 8.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault DelayedValueAccessgetGeneratedIdentifierHandle(Object entity) Get the generated identifier handle for an entity being inserted in this flush.default int[]Attribute indexes updated for an entity that is also deleted in the current flush.booleanisBeingDeletedInCurrentFlush(Object entity) Check if an entity is being deleted in the current flush.booleanisBeingInsertedInCurrentFlush(Object entity) Check if an entity is being inserted in the current flush.default booleanRegister owner update callbacks for this flush.
-
Method Details
-
isBeingInsertedInCurrentFlush
Check if an entity is being inserted in the current flush.- Parameters:
entity- the entity to check- Returns:
- true if the entity has an INSERT action in this flush, false otherwise
-
isBeingDeletedInCurrentFlush
Check if an entity is being deleted in the current flush.- Parameters:
entity- the entity to check- Returns:
- true if the entity has a DELETE action in this flush, false otherwise
-
getUpdatedAttributeIndexesForDeletedEntity
Attribute indexes updated for an entity that is also deleted in the current flush. These attributes may already have been changed in the database before the DELETE executes. -
getGeneratedIdentifierHandle
Get the generated identifier handle for an entity being inserted in this flush.
Returns
nullwhen the entity identifier is already known, or when the entity is not part of this decomposition context. -
registerOwnerUpdateCallbacks
Register owner update callbacks for this flush.- Returns:
truewhen callbacks should be fired by the caller;falsewhen another action already registered them for the same owner.
-