public interface CascadingAction
A session action that may be cascaded from parent entity to its children
Type | Property and Description |
---|---|
boolean |
performOnLazy
Should this action be performed (or noCascade consulted) in the case of lazy properties.
|
Modifier and Type | Method and Description |
---|---|
void |
cascade(EventSource session,
Object child,
String entityName,
Object anything,
boolean isCascadeDeleteEnabled)
Cascade the action to the child object.
|
boolean |
deleteOrphans()
Does this action potentially extrapolate to orphan deletes?
|
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.
|
void |
noCascade(EventSource session,
Object parent,
EntityPersister persister,
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?
|
boolean performOnLazyProperty
Should this action be performed (or noCascade consulted) in the case of lazy properties.
void cascade(EventSource session, Object child, String entityName, Object anything, boolean isCascadeDeleteEnabled) throws HibernateException
Cascade the action to the child object.
session
- The session within which the cascade is occuring.child
- The child to which cascading should be performed.entityName
- The child’s entity nameanything
- Anything ;) Typically some form of cascade-local cache
which is specific to each CascadingAction typeisCascadeDeleteEnabled
- Are cascading deletes enabled.HibernateException
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.
session
- The session within which the cascade is occuring.collectionType
- The mapping type of the collection.collection
- The collection instance.boolean deleteOrphans()
Does this action potentially extrapolate to orphan deletes?
boolean requiresNoCascadeChecking()
Does the specified cascading action require verification of no cascade validity?
void noCascade(EventSource session, Object parent, EntityPersister persister, 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.
session
- The session witin 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()
Should this action be performed (or noCascade consulted) in the case of lazy properties.
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.