Fields Summary |
---|
private static final Log | log |
public static final CascadingAction | DELETE |
public static final CascadingAction | LOCK |
public static final CascadingAction | REFRESH |
public static final CascadingAction | EVICT |
public static final CascadingAction | SAVE_UPDATE |
public static final CascadingAction | MERGE |
public static final CascadingAction | SAVE_UPDATE_COPY |
public static final CascadingAction | PERSIST |
public static final CascadingAction | PERSIST_ON_FLUSHExecute persist during flush time |
public static final CascadingAction | REPLICATE |
Methods Summary |
---|
public abstract void | cascade(org.hibernate.event.EventSource session, java.lang.Object child, java.lang.String entityName, java.lang.Object anything, boolean isCascadeDeleteEnabled)Cascade the action to the child object.
|
private static boolean | collectionIsInitialized(java.lang.Object collection)
return !(collection instanceof PersistentCollection) || ( (PersistentCollection) collection ).wasInitialized();
|
public abstract boolean | deleteOrphans()Does this action potentially extrapolate to orphan deletes?
|
private static java.util.Iterator | getAllElementsIterator(org.hibernate.event.EventSource session, org.hibernate.type.CollectionType collectionType, java.lang.Object collection)Given a collection, get an iterator of all its children, loading them
from the database if necessary.
// static helper methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return collectionType.getElementsIterator( collection, session );
|
public abstract java.util.Iterator | getCascadableChildrenIterator(org.hibernate.event.EventSource session, org.hibernate.type.CollectionType collectionType, java.lang.Object collection)Given a collection, get an iterator of the children upon which the
current cascading action should be visited.
|
public static java.util.Iterator | getLoadedElementsIterator(SessionImplementor session, org.hibernate.type.CollectionType collectionType, java.lang.Object collection)Iterate just the elements of the collection that are already there. Don't load
any new elements from the database.
if ( collectionIsInitialized(collection) ) {
// handles arrays and newly instantiated collections
return collectionType.getElementsIterator(collection, session);
}
else {
// does not handle arrays (thats ok, cos they can't be lazy)
// or newly instantiated collections, so we can do the cast
return ( (PersistentCollection) collection ).queuedAdditionIterator();
}
|
public void | noCascade(org.hibernate.event.EventSource session, java.lang.Object child, java.lang.Object parent, org.hibernate.persister.entity.EntityPersister persister, int propertyIndex)Called (in the case of {@link #requiresNoCascadeChecking} returning true) to validate
that no cascade on the given property is considered a valid semantic.
|
public boolean | performOnLazyProperty()Should this action be performed (or noCascade consulted) in the case of lazy properties.
return true;
|
public boolean | requiresNoCascadeChecking()Does the specified cascading action require verification of no cascade validity?
return false;
|