Top Inners Fields Constructors Methods
org.hibernate.engine.spi

public Class CascadingActions

extends Object
Class Inheritance
Imports
java.util.Iterator, org.hibernate.HibernateException, .LockMode, .LockOptions, .ReplicationMode, .TransientPropertyValueException, org.hibernate.collection.spi.PersistentCollection, org.hibernate.engine.internal.ForeignKeys, org.hibernate.event.spi.DeleteContext, .MergeContext, .EventSource, .PersistContext, .RefreshContext, org.hibernate.internal.CoreMessageLogger, org.hibernate.persister.entity.EntityPersister, org.hibernate.proxy.HibernateProxy, org.hibernate.type.CollectionType, .EntityType, .Type, org.jboss.logging.Logger

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class

Field Summary

Modifier and TypeField and Description
public static final CascadingAction<DeleteContext>
public static final CascadingAction<Void>
public static final CascadingAction<LockOptions>
private static final CoreMessageLogger
public static final CascadingAction<MergeContext>
public static final CascadingAction<PersistContext>
public static final CascadingAction<PersistContext>
PERSIST_ON_FLUSH

Execute persist during flush time

public static final CascadingAction<RefreshContext>
public static final CascadingAction<ReplicationMode>
public static final CascadingAction<PersistContext>

Constructor Summary

AccessConstructor and Description
private
CascadingActions()

Disallow instantiation

Method Summary

Modifier and TypeMethod and Description
private static boolean
public static Iterator<?>

Returns:

The children iterator.
getAllElementsIterator
(EventSource
The session within which the cascade is occurring.
session
,
CollectionType
The mapping type of the collection.
collectionType
,
Object
The collection instance.
collection
)

Given a collection, get an iterator of all its children, loading them from the database if necessary.

public static Iterator<?>
getLoadedElementsIterator(SharedSessionContractImplementor session, CollectionType collectionType, Object collection)

Iterate just the elements of the collection that are already there.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DELETEback to summary
public static final CascadingAction<DeleteContext> DELETE
See Also
org.hibernate.Session#delete(Object)
EVICTback to summary
public static final CascadingAction<Void> EVICT
See Also
org.hibernate.Session#evict(Object)
LOCKback to summary
public static final CascadingAction<LockOptions> LOCK
See Also
org.hibernate.Session#lock(Object, LockMode)
LOGback to summary
private static final CoreMessageLogger LOG
MERGEback to summary
public static final CascadingAction<MergeContext> MERGE
See Also
org.hibernate.Session#merge(Object)
PERSISTback to summary
public static final CascadingAction<PersistContext> PERSIST
See Also
org.hibernate.Session#persist(Object)
PERSIST_ON_FLUSHback to summary
public static final CascadingAction<PersistContext> PERSIST_ON_FLUSH

Execute persist during flush time

See Also
org.hibernate.Session#persist(Object)
REFRESHback to summary
public static final CascadingAction<RefreshContext> REFRESH
See Also
org.hibernate.Session#refresh(Object)
REPLICATEback to summary
public static final CascadingAction<ReplicationMode> REPLICATE
See Also
org.hibernate.Session#replicate
SAVE_UPDATEback to summary
public static final CascadingAction<PersistContext> SAVE_UPDATE
See Also
org.hibernate.Session#saveOrUpdate(Object)

Constructor Detail

CascadingActionsback to summary
private CascadingActions()

Disallow instantiation

Method Detail

collectionIsInitializedback to summary
private static boolean collectionIsInitialized(Object collection)
getAllElementsIteratorback to summary
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:EventSource

The session within which the cascade is occurring.

collectionType:CollectionType

The mapping type of the collection.

collection:Object

The collection instance.

Returns:Iterator<?>

The children iterator.

getLoadedElementsIteratorback to summary
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.

org.hibernate.engine.spi back to summary

public abstract Class CascadingActions.BaseCascadingAction<T>

extends Object
implements CascadingAction<T>
Class Inheritance
  • java.lang.Object
  • org.hibernate.engine.spi.CascadingActions.BaseCascadingAction
All Implemented Interfaces
org.hibernate.engine.spi.CascadingAction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
noCascade(EventSource
The session within which the cascade is occurring.
session
,
Object
The property value owner
parent
,
EntityPersister
The entity persister for the owner
persister
,
Type
The property type
propertyType
,
int
The index of the property within the owner.
propertyIndex
)

Implements org.hibernate.engine.spi.CascadingAction.noCascade.

Called (in the case of requiresNoCascadeChecking returning true) to validate that no cascade on the given property is considered a valid semantic.
public boolean
performOnLazyProperty()

Implements org.hibernate.engine.spi.CascadingAction.performOnLazyProperty.

Should this action be performed (or noCascade consulted) in the case of lazy properties.
public boolean
requiresNoCascadeChecking()

Implements org.hibernate.engine.spi.CascadingAction.requiresNoCascadeChecking.

Does the specified cascading action require verification of no cascade validity?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BaseCascadingActionback to summary
public BaseCascadingAction()

Method Detail

noCascadeback to summary
public void noCascade(EventSource session, Object parent, EntityPersister persister, Type propertyType, int propertyIndex)

Implements org.hibernate.engine.spi.CascadingAction.noCascade.

Doc from org.hibernate.engine.spi.CascadingAction.noCascade.

Called (in the case of requiresNoCascadeChecking returning true) to validate that no cascade on the given property is considered a valid semantic.

Parameters
session:EventSource

The session within which the cascade is occurring.

parent:Object

The property value owner

persister:EntityPersister

The entity persister for the owner

propertyType:Type

The property type

propertyIndex:int

The index of the property within the owner.

Annotations
@Override
performOnLazyPropertyback to summary
public boolean performOnLazyProperty()

Implements org.hibernate.engine.spi.CascadingAction.performOnLazyProperty.

Doc from org.hibernate.engine.spi.CascadingAction.performOnLazyProperty.

Should this action be performed (or noCascade consulted) in the case of lazy properties.

Annotations
@Override
requiresNoCascadeCheckingback to summary
public boolean requiresNoCascadeChecking()

Implements org.hibernate.engine.spi.CascadingAction.requiresNoCascadeChecking.

Doc from org.hibernate.engine.spi.CascadingAction.requiresNoCascadeChecking.

Does the specified cascading action require verification of no cascade validity?

Returns:boolean

True if this action requires no-cascade verification; false otherwise.

Annotations
@Override