org.hibernate.engine

Class CascadeStyle.MultipleCascadeStyle

Enclosing Class:
CascadeStyle
Implemented Interfaces:
Serializable

public static final class CascadeStyle.MultipleCascadeStyle
extends CascadeStyle

Nested Class Summary

Nested classes/interfaces inherited from class org.hibernate.engine.CascadeStyle

CascadeStyle.MultipleCascadeStyle

Field Summary

Fields inherited from class org.hibernate.engine.CascadeStyle

ALL, ALL_DELETE_ORPHAN, DELETE, DELETE_ORPHAN, EVICT, LOCK, MERGE, NONE, PERSIST, REFRESH, REPLICATE, UPDATE

Constructor Summary

MultipleCascadeStyle(CascadeStyle[] styles)

Method Summary

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...
String
toString()

Methods inherited from class org.hibernate.engine.CascadeStyle

doCascade, getCascadeStyle, hasOrphanDelete, reallyDoCascade

Constructor Details

MultipleCascadeStyle

public MultipleCascadeStyle(CascadeStyle[] styles)

Method Details

doCascade

public boolean doCascade(CascadingAction action)
For this style, should the given action be cascaded?
Overrides:
doCascade in interface CascadeStyle
Parameters:
action - The action to be checked for cascade-ability.
Returns:
True if the action should be cascaded under this style; false otherwise.

hasOrphanDelete

public boolean hasOrphanDelete()
Do we need to delete orphaned collection elements?
Overrides:
hasOrphanDelete in interface CascadeStyle
Returns:
True if this style need to account for orphan delete operations; false othwerwise.

reallyDoCascade

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 CascadeStyle.doCascade(CascadingAction); for certain styles (currently only delete-orphan), however, we need to be able to control this seperately.

Overrides:
reallyDoCascade in interface CascadeStyle
Parameters:
action - The action to be checked for cascade-ability.
Returns:
True if the action should be really cascaded under this style; false otherwise.

toString

public String toString()