public interface CascadingAction<C>
reactive session
operation that may
be cascaded from a parent entity to its children. A non-blocking counterpart
to CascadingAction
.CascadingActions
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletionStage<java.lang.Void> |
cascade(org.hibernate.event.spi.EventSource session,
java.lang.Object child,
java.lang.String entityName,
C context,
boolean isCascadeDeleteEnabled)
Cascade the action to the child object.
|
org.hibernate.engine.spi.CascadingAction |
delegate() |
boolean |
deleteOrphans()
Does this action potentially extrapolate to orphan deletes?
|
java.util.Iterator<?> |
getCascadableChildrenIterator(org.hibernate.event.spi.EventSource session,
org.hibernate.type.CollectionType collectionType,
java.lang.Object collection)
Given a collection, get an iterator of the children upon which the
current cascading action should be visited.
|
java.util.concurrent.CompletionStage<java.lang.Void> |
noCascade(org.hibernate.event.spi.EventSource session,
java.lang.Object parent,
org.hibernate.persister.entity.EntityPersister persister,
org.hibernate.type.Type propertyType,
int propertyIndex)
Called (in the case of
requiresNoCascadeChecking() returning true) to validate
that no cascade on the given property is considered a valid semantic. |
boolean |
performOnLazyProperty()
Should this action be performed (or noCascade consulted) in the case of lazy properties.
|
boolean |
requiresNoCascadeChecking()
Does the specified cascading action require verification of no cascade validity?
|
java.util.concurrent.CompletionStage<java.lang.Void> cascade(org.hibernate.event.spi.EventSource session, java.lang.Object child, java.lang.String entityName, C context, boolean isCascadeDeleteEnabled) throws org.hibernate.HibernateException
session
- The session within which the cascade is occurring.child
- The child to which cascading should be performed.entityName
- The child's entity namecontext
- Anything ;) Typically some form of cascade-local cache
which is specific to each CascadingAction typeisCascadeDeleteEnabled
- Are cascading deletes enabled.org.hibernate.HibernateException
java.util.Iterator<?> getCascadableChildrenIterator(org.hibernate.event.spi.EventSource session, org.hibernate.type.CollectionType collectionType, java.lang.Object collection)
session
- The session within which the cascade is occurring.collectionType
- The mapping type of the collection.collection
- The collection instance.boolean deleteOrphans()
boolean requiresNoCascadeChecking()
java.util.concurrent.CompletionStage<java.lang.Void> noCascade(org.hibernate.event.spi.EventSource session, java.lang.Object parent, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.type.Type propertyType, int propertyIndex)
requiresNoCascadeChecking()
returning true) to validate
that no cascade on the given property is considered a valid semantic.session
- The session within which the cascade is occurring.parent
- The property value ownerpersister
- The entity persister for the ownerpropertyType
- The property typepropertyIndex
- The index of the property within the owner.boolean performOnLazyProperty()
org.hibernate.engine.spi.CascadingAction delegate()