org.hibernate.engine
Class CascadingAction

java.lang.Object
  extended byorg.hibernate.engine.CascadingAction

public abstract class CascadingAction
extends Object

A session action that may be cascaded from parent entity to its children

Author:
Gavin King

Field Summary
static CascadingAction DELETE
           
static CascadingAction EVICT
           
static CascadingAction LOCK
           
static CascadingAction MERGE
           
static CascadingAction PERSIST
           
static CascadingAction PERSIST_ON_FLUSH
          Execute persist during flush time
static CascadingAction REFRESH
           
static CascadingAction REPLICATE
           
static CascadingAction SAVE_UPDATE
           
static CascadingAction SAVE_UPDATE_COPY
           
 
Method Summary
abstract  void cascade(EventSource session, Object child, String entityName, Object anything, boolean isCascadeDeleteEnabled)
          cascade the action to the child object
abstract  boolean deleteOrphans()
          Do we need to handle orphan delete for this action?
abstract  Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection)
          Should this action be cascaded to the given (possibly uninitialized) collection?
static Iterator getLoadedElementsIterator(SessionImplementor session, CollectionType collectionType, Object collection)
          Iterate just the elements of the collection that are already there.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETE

public static final CascadingAction DELETE
See Also:
Session.delete(Object)

LOCK

public static final CascadingAction LOCK
See Also:
Session.lock(Object, LockMode)

REFRESH

public static final CascadingAction REFRESH
See Also:
Session.refresh(Object)

EVICT

public static final CascadingAction EVICT
See Also:
Session.evict(Object)

SAVE_UPDATE

public static final CascadingAction SAVE_UPDATE
See Also:
Session.saveOrUpdate(Object)

MERGE

public static final CascadingAction MERGE
See Also:
Session.merge(Object)

SAVE_UPDATE_COPY

public static final CascadingAction SAVE_UPDATE_COPY
See Also:
Session.saveOrUpdateCopy(Object)

PERSIST

public static final CascadingAction PERSIST
See Also:
Session.persist(Object)

PERSIST_ON_FLUSH

public static final CascadingAction PERSIST_ON_FLUSH
Execute persist during flush time

See Also:
Session.persist(Object)

REPLICATE

public static final CascadingAction REPLICATE
See Also:
Session.replicate(Object, org.hibernate.ReplicationMode)
Method Detail

cascade

public abstract void cascade(EventSource session,
                             Object child,
                             String entityName,
                             Object anything,
                             boolean isCascadeDeleteEnabled)
                      throws HibernateException
cascade the action to the child object

Throws:
HibernateException

getCascadableChildrenIterator

public abstract Iterator getCascadableChildrenIterator(EventSource session,
                                                       CollectionType collectionType,
                                                       Object collection)
Should this action be cascaded to the given (possibly uninitialized) collection?


deleteOrphans

public abstract boolean deleteOrphans()
Do we need to handle orphan delete for this action?


getLoadedElementsIterator

public static Iterator getLoadedElementsIterator(SessionImplementor session,
                                                 CollectionType collectionType,
                                                 Object collection)
Iterate just the elements of the collection that are already there. Don't load any new elements from the database.