Home » Hibernate-3.3.2.GA » org.hibernate » engine » [javadoc | source]
abstract public class: CascadeStyle [javadoc | source]

All Implemented Interfaces:

Direct Known Subclasses:
    EJB3CascadeStyle, MultipleCascadeStyle

A contract for defining the aspects of cascading various persistence actions.
Nested Class Summary:
public static final class  CascadeStyle.MultipleCascadeStyle   
Field Summary
public static final  CascadeStyle ALL_DELETE_ORPHAN    save / delete / update / evict / lock / replicate / merge / persist + delete orphans 
public static final  CascadeStyle ALL    save / delete / update / evict / lock / replicate / merge / persist 
public static final  CascadeStyle UPDATE    save / update 
public static final  CascadeStyle LOCK    lock 
public static final  CascadeStyle REFRESH    refresh 
public static final  CascadeStyle EVICT    evict 
public static final  CascadeStyle REPLICATE    replicate 
public static final  CascadeStyle MERGE    merge 
public static final  CascadeStyle PERSIST    create 
public static final  CascadeStyle DELETE    delete 
public static final  CascadeStyle DELETE_ORPHAN    delete + delete orphans 
public static final  CascadeStyle NONE    no cascades 
static final  Map STYLES     
Method from org.hibernate.engine.CascadeStyle Summary:
doCascade,   getCascadeStyle,   hasOrphanDelete,   reallyDoCascade
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.engine.CascadeStyle Detail:
 abstract public boolean doCascade(CascadingAction action)
    For this style, should the given action be cascaded?
 public static CascadeStyle getCascadeStyle(String cascade) 
    Factory method for obtaining named cascade styles
 public boolean hasOrphanDelete() 
    Do we need to delete orphaned collection elements?
 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 seperately.