Package org.hibernate.engine.spi
Class CascadingActions
- java.lang.Object
-
- org.hibernate.engine.spi.CascadingActions
-
public class CascadingActions extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CascadingActions.BaseCascadingAction<T>
-
Field Summary
Fields Modifier and Type Field Description static CascadingAction<DeleteContext>
DELETE
static CascadingAction<Void>
EVICT
static CascadingAction<LockOptions>
LOCK
static CascadingAction<MergeContext>
MERGE
static CascadingAction<PersistContext>
PERSIST
static CascadingAction<PersistContext>
PERSIST_ON_FLUSH
Execute persist during flush timestatic CascadingAction<RefreshContext>
REFRESH
static CascadingAction<ReplicationMode>
REPLICATE
static CascadingAction<PersistContext>
SAVE_UPDATE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterator<?>
getAllElementsIterator(EventSource session, CollectionType collectionType, Object collection)
Given a collection, get an iterator of all its children, loading them from the database if necessary.static Iterator<?>
getLoadedElementsIterator(SharedSessionContractImplementor session, CollectionType collectionType, Object collection)
Iterate just the elements of the collection that are already there.
-
-
-
Field Detail
-
DELETE
public static final CascadingAction<DeleteContext> DELETE
- See Also:
Session.delete(Object)
-
LOCK
public static final CascadingAction<LockOptions> LOCK
- See Also:
Session.lock(Object, LockMode)
-
REFRESH
public static final CascadingAction<RefreshContext> REFRESH
- See Also:
Session.refresh(Object)
-
EVICT
public static final CascadingAction<Void> EVICT
- See Also:
Session.evict(Object)
-
SAVE_UPDATE
public static final CascadingAction<PersistContext> SAVE_UPDATE
- See Also:
Session.saveOrUpdate(Object)
-
MERGE
public static final CascadingAction<MergeContext> MERGE
- See Also:
Session.merge(Object)
-
PERSIST
public static final CascadingAction<PersistContext> PERSIST
- See Also:
Session.persist(Object)
-
PERSIST_ON_FLUSH
public static final CascadingAction<PersistContext> PERSIST_ON_FLUSH
Execute persist during flush time- See Also:
Session.persist(Object)
-
REPLICATE
public static final CascadingAction<ReplicationMode> REPLICATE
-
-
Method Detail
-
getAllElementsIterator
public static Iterator<?> getAllElementsIterator(EventSource session, CollectionType collectionType, Object collection)
Given a collection, get an iterator of all its children, loading them from the database if necessary.- Parameters:
session
- The session within which the cascade is occurring.collectionType
- The mapping type of the collection.collection
- The collection instance.- Returns:
- The children iterator.
-
getLoadedElementsIterator
public static Iterator<?> getLoadedElementsIterator(SharedSessionContractImplementor 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.
-
-