Top Description Methods
org.hibernate.engine.spi

public Interface CascadingAction

Known Direct Implementers
org.hibernate.engine.spi.CascadingActions.BaseCascadingAction
Imports
java.util.Iterator, org.hibernate.HibernateException, org.hibernate.event.spi.EventSource, org.hibernate.persister.entity.EntityPersister, org.hibernate.type.CollectionType, .Type

A session action that may be cascaded from parent entity to its children
Authors
Gavin King, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public void
cascade(EventSource
The session within which the cascade is occurring.
session
,
Object
The child to which cascading should be performed.
child
,
String
The child's entity name
entityName
,
Object
Anything ;) Typically some form of cascade-local cache which is specific to each CascadingAction type
anything
,
boolean
Are cascading deletes enabled.
isCascadeDeleteEnabled
)

Deprecated as a consequence of EventSource being deprecated.
Cascade the action to the child object.
public boolean

Returns:

True if this action can lead to deletions of orphans.
deleteOrphans
()

Does this action potentially extrapolate to orphan deletes?

public Iterator<E>

Returns:

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

Deprecated as a consequence of EventSource being deprecated.
Given a collection, get an iterator of the children upon which the current cascading action should be visited.
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
)

Deprecated as a consequence of EventSource being deprecated.
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()

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

public boolean

Returns:

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

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

Method Detail

cascadeback to summary
public void cascade(EventSource session, Object child, String entityName, Object anything, boolean isCascadeDeleteEnabled) throws HibernateException

Deprecated

as a consequence of EventSource being deprecated. See corresponding docs for further information.

Cascade the action to the child object.

Parameters
session:EventSource

The session within which the cascade is occurring.

child:Object

The child to which cascading should be performed.

entityName:String

The child's entity name

anything:Object

Anything ;) Typically some form of cascade-local cache which is specific to each CascadingAction type

isCascadeDeleteEnabled:boolean

Are cascading deletes enabled.

deleteOrphansback to summary
public boolean deleteOrphans()

Does this action potentially extrapolate to orphan deletes?

Returns:boolean

True if this action can lead to deletions of orphans.

getCascadableChildrenIteratorback to summary
public Iterator<E> getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection)

Deprecated

as a consequence of EventSource being deprecated. See corresponding docs for further information.

Given a collection, get an iterator of the children upon which the current cascading action should be visited.

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<E>

The children iterator.

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

Deprecated

as a consequence of EventSource being deprecated. See corresponding docs for further information.

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.

performOnLazyPropertyback to summary
public boolean performOnLazyProperty()

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

requiresNoCascadeCheckingback to summary
public boolean requiresNoCascadeChecking()

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

Returns:boolean

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