|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.engine.spi.CascadingAction
public abstract class CascadingAction
A session action that may be cascaded from parent entity to its children
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
|
Constructor Summary | |
---|---|
CascadingAction()
|
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()
Does this action potentially extrapolate to orphan deletes? |
abstract Iterator |
getCascadableChildrenIterator(EventSource session,
CollectionType collectionType,
Object collection)
Given a collection, get an iterator of the children upon which the current cascading action should be visited. |
static Iterator |
getLoadedElementsIterator(SessionImplementor session,
CollectionType collectionType,
Object collection)
Iterate just the elements of the collection that are already there. |
void |
noCascade(EventSource session,
Object child,
Object parent,
EntityPersister persister,
int propertyIndex)
Called (in the case of requiresNoCascadeChecking() returning true) to validate
that no cascade on the given property is considered a valid semantic. |
boolean |
performOnLazyProperty()
Should this action be performed (or noCascade consulted) in the case of lazy properties. |
boolean |
requiresNoCascadeChecking()
Does the specified cascading action require verification of no cascade validity? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CascadingAction DELETE
Session.delete(Object)
public static final CascadingAction LOCK
Session.lock(Object, LockMode)
public static final CascadingAction REFRESH
Session.refresh(Object)
public static final CascadingAction EVICT
Session.evict(Object)
public static final CascadingAction SAVE_UPDATE
Session.saveOrUpdate(Object)
public static final CascadingAction MERGE
Session.merge(Object)
public static final CascadingAction PERSIST
Session.persist(Object)
public static final CascadingAction PERSIST_ON_FLUSH
Session.persist(Object)
public static final CascadingAction REPLICATE
Session.replicate(Object, org.hibernate.ReplicationMode)
Constructor Detail |
---|
public CascadingAction()
Method Detail |
---|
public abstract void cascade(EventSource session, Object child, String entityName, Object anything, boolean isCascadeDeleteEnabled) throws HibernateException
session
- The session within which the cascade is occuring.child
- The child to which cascading should be performed.entityName
- The child's entity nameanything
- Anything ;) Typically some form of cascade-local cache
which is specific to each CascadingAction typeisCascadeDeleteEnabled
- Are cascading deletes enabled.
HibernateException
public abstract Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection)
session
- The session within which the cascade is occuring.collectionType
- The mapping type of the collection.collection
- The collection instance.
public abstract boolean deleteOrphans()
public boolean requiresNoCascadeChecking()
public void noCascade(EventSource session, Object child, Object parent, EntityPersister persister, int propertyIndex)
requiresNoCascadeChecking()
returning true) to validate
that no cascade on the given property is considered a valid semantic.
session
- The session witin which the cascade is occurring.child
- The property valueparent
- The property value ownerpersister
- The entity persister for the ownerpropertyIndex
- The index of the property within the owner.public boolean performOnLazyProperty()
public static Iterator getLoadedElementsIterator(SessionImplementor session, CollectionType collectionType, Object collection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |