Top Description Methods
org.hibernate.engine.spi

public Interface CascadeStyle

extends Serializable
Known Direct Implementers
org.hibernate.engine.spi.CascadeStyles.BaseCascadeStyle
Imports
java.io.Serializable

A contract for defining the aspects of cascading various persistence actions.
Authors
Gavin King, Steve Ebersole
See Also
CascadingAction

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if the action should be cascaded under this style; false otherwise.
doCascade
(CascadingAction
The action to be checked for cascade-ability.
action
)

For this style, should the given action be cascaded?

public boolean

Returns:

True if this style need to account for orphan delete operations; false otherwise.
hasOrphanDelete
()

Do we need to delete orphaned collection elements?

public boolean

Returns:

True if the action should be really cascaded under this style; false otherwise.
reallyDoCascade
(CascadingAction
The action to be checked for cascade-ability.
action
)

Probably more aptly named something like doCascadeToCollectionElements(); it is however used from both the collection and to-one logic branches...

Method Detail

doCascadeback to summary
public boolean doCascade(CascadingAction action)

For this style, should the given action be cascaded?

Parameters
action:CascadingAction

The action to be checked for cascade-ability.

Returns:boolean

True if the action should be cascaded under this style; false otherwise.

hasOrphanDeleteback to summary
public boolean hasOrphanDelete()

Do we need to delete orphaned collection elements?

Returns:boolean

True if this style need to account for orphan delete operations; false otherwise.

reallyDoCascadeback to summary
public 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 return doCascade; for certain styles (currently only delete-orphan), however, we need to be able to control this separately.

Parameters
action:CascadingAction

The action to be checked for cascade-ability.

Returns:boolean

True if the action should be really cascaded under this style; false otherwise.