Interface CascadingAction<C>

All Known Implementing Classes:
CascadingActions.BaseCascadingAction

public interface CascadingAction<C>
A reactive session operation that may be cascaded from a parent entity to its children. A non-blocking counterpart to CascadingAction.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    cascade(org.hibernate.event.spi.EventSource session, Object child, String entityName, C context, boolean isCascadeDeleteEnabled)
    Cascade the action to the child object.
    org.hibernate.engine.spi.CascadingAction<C>
     
    boolean
    Does this action potentially extrapolate to orphan deletes?
    getCascadableChildrenIterator(org.hibernate.event.spi.EventSource session, org.hibernate.type.CollectionType collectionType, Object collection)
    Given a collection, get an iterator of the children upon which the current cascading action should be visited.
    noCascade(org.hibernate.event.spi.EventSource session, Object parent, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.type.Type propertyType, int propertyIndex)
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Should this action be performed (or noCascade consulted) in the case of lazy properties.
    default boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer used
  • Method Details

    • cascade

      CompletionStage<Void> cascade(org.hibernate.event.spi.EventSource session, Object child, String entityName, C context, boolean isCascadeDeleteEnabled) throws org.hibernate.HibernateException
      Cascade the action to the child object.
      Parameters:
      session - The session within which the cascade is occurring.
      child - The child to which cascading should be performed.
      entityName - The child's entity name
      context - Anything ;) Typically some form of cascade-local cache which is specific to each CascadingAction type
      isCascadeDeleteEnabled - Are cascading deletes enabled.
      Throws:
      org.hibernate.HibernateException
    • getCascadableChildrenIterator

      Iterator<?> getCascadableChildrenIterator(org.hibernate.event.spi.EventSource session, org.hibernate.type.CollectionType collectionType, Object collection)
      Given a collection, get an iterator of the children upon which the current cascading action should be visited.
      Parameters:
      session - The session within which the cascade is occurring.
      collectionType - The mapping type of the collection.
      collection - The collection instance.
      Returns:
      The children iterator.
    • deleteOrphans

      boolean deleteOrphans()
      Does this action potentially extrapolate to orphan deletes?
      Returns:
      True if this action can lead to deletions of orphans.
    • requiresNoCascadeChecking

      @Deprecated(since="2.4", forRemoval=true) default boolean requiresNoCascadeChecking()
      Deprecated, for removal: This API element is subject to removal in a future version.
      No longer used
      Does the specified cascading action require verification of no cascade validity?
      Returns:
      True if this action requires no-cascade verification; false otherwise.
    • noCascade

      @Deprecated(since="2.4", forRemoval=true) CompletionStage<Void> noCascade(org.hibernate.event.spi.EventSource session, Object parent, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.type.Type propertyType, int propertyIndex)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called (in the case of requiresNoCascadeChecking() returning true) to validate that no cascade on the given property is considered a valid semantic.
      Parameters:
      session - The session within which the cascade is occurring.
      parent - The property value owner
      persister - The entity persister for the owner
      propertyType - The property type
      propertyIndex - The index of the property within the owner.
    • performOnLazyProperty

      boolean performOnLazyProperty()
      Should this action be performed (or noCascade consulted) in the case of lazy properties.
    • delegate

      org.hibernate.engine.spi.CascadingAction<C> delegate()