Interface CascadingAction<T>

All Known Implementing Classes:
CascadingActions.BaseCascadingAction

public interface CascadingAction<T>
A session action that may be cascaded from parent entity to its children
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cascade(EventSource session, Object child, String entityName, T anything, boolean isCascadeDeleteEnabled)
    Cascade the action to the child object.
    boolean
    Does this action potentially extrapolate to orphan deletes?
    getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection)
    Given a collection, get an iterator of the children upon which the current cascading action should be visited.
    boolean
    Should this action be performed (or noCascade consulted) in the case of lazy properties.
  • Method Details

    • cascade

      void cascade(EventSource session, Object child, String entityName, T anything, boolean isCascadeDeleteEnabled) throws 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
      anything - Anything ;) Typically some form of cascade-local cache which is specific to each CascadingAction type
      isCascadeDeleteEnabled - Are cascading deletes enabled.
      Throws:
      HibernateException
    • getCascadableChildrenIterator

      Iterator<?> getCascadableChildrenIterator(EventSource session, 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.
    • performOnLazyProperty

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