Package org.hibernate.engine.spi
Interface CascadeStyle
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
CascadeStyles.BaseCascadeStyle
,CascadeStyles.MultipleCascadeStyle
public interface CascadeStyle extends java.io.Serializable
A contract for defining the aspects of cascading various persistence actions.- See Also:
CascadingAction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
doCascade(CascadingAction action)
For this style, should the given action be cascaded?boolean
hasOrphanDelete()
Do we need to delete orphaned collection elements?boolean
reallyDoCascade(CascadingAction action)
Probably more aptly named something like doCascadeToCollectionElements(); it is however used from both the collection and to-one logic branches...
-
-
-
Method Detail
-
doCascade
boolean doCascade(CascadingAction action)
For this style, should the given action be cascaded?- Parameters:
action
- The action to be checked for cascade-ability.- Returns:
- True if the action should be cascaded under this style; false otherwise.
-
reallyDoCascade
boolean reallyDoCascade(CascadingAction action)
Probably more aptly named something like doCascadeToCollectionElements(); it is however used from both the collection and to-one logic branches... For this style, should the given action really be cascaded? The default implementation is simply to returndoCascade(org.hibernate.engine.spi.CascadingAction)
; for certain styles (currently only delete-orphan), however, we need to be able to control this separately.- Parameters:
action
- The action to be checked for cascade-ability.- Returns:
- True if the action should be really cascaded under this style; false otherwise.
-
hasOrphanDelete
boolean hasOrphanDelete()
Do we need to delete orphaned collection elements?- Returns:
- True if this style need to account for orphan delete operations; false otherwise.
-
-