org.hibernate.engine
Class CascadeStyle

java.lang.Object
  extended byorg.hibernate.engine.CascadeStyle
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CascadeStyle.MultipleCascadeStyle

public abstract class CascadeStyle
extends Object
implements Serializable

A style of cascade that can be specified by the mapping for an association. The style is specified by the cascade attribute in the mapping file.

Author:
Gavin King
See Also:
Serialized Form

Nested Class Summary
static class CascadeStyle.MultipleCascadeStyle
           
 
Field Summary
static CascadeStyle ALL
          save / delete / update / evict / lock / replicate / merge / persist
static CascadeStyle ALL_DELETE_ORPHAN
          save / delete / update / evict / lock / replicate / merge / persist + delete orphans
static CascadeStyle DELETE
          delete
static CascadeStyle DELETE_ORPHAN
          delete + delete orphans
static CascadeStyle EVICT
          evict
static CascadeStyle LOCK
          lock
static CascadeStyle MERGE
          merge
static CascadeStyle NONE
          no cascades
static CascadeStyle PERSIST
          create
static CascadeStyle REFRESH
          refresh
static CascadeStyle REPLICATE
          replicate
static CascadeStyle UPDATE
          save / update
 
Method Summary
abstract  boolean doCascade(CascadingAction action)
          Should the given action be cascaded?
static CascadeStyle getCascadeStyle(String cascade)
           
 boolean hasOrphanDelete()
          Do we need to delete orphaned collection elements?
 boolean reallyDoCascade(CascadingAction action)
          Should the given action really, really be cascaded?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_DELETE_ORPHAN

public static final CascadeStyle ALL_DELETE_ORPHAN
save / delete / update / evict / lock / replicate / merge / persist + delete orphans


ALL

public static final CascadeStyle ALL
save / delete / update / evict / lock / replicate / merge / persist


UPDATE

public static final CascadeStyle UPDATE
save / update


LOCK

public static final CascadeStyle LOCK
lock


REFRESH

public static final CascadeStyle REFRESH
refresh


EVICT

public static final CascadeStyle EVICT
evict


REPLICATE

public static final CascadeStyle REPLICATE
replicate


MERGE

public static final CascadeStyle MERGE
merge


PERSIST

public static final CascadeStyle PERSIST
create


DELETE

public static final CascadeStyle DELETE
delete


DELETE_ORPHAN

public static final CascadeStyle DELETE_ORPHAN
delete + delete orphans


NONE

public static final CascadeStyle NONE
no cascades

Method Detail

doCascade

public abstract boolean doCascade(CascadingAction action)
Should the given action be cascaded?


reallyDoCascade

public boolean reallyDoCascade(CascadingAction action)
Should the given action really, really be cascaded?


hasOrphanDelete

public boolean hasOrphanDelete()
Do we need to delete orphaned collection elements?


getCascadeStyle

public static CascadeStyle getCascadeStyle(String cascade)