public final class

Cascade

extends Object
java.lang.Object
   ↳ org.hibernate.engine.Cascade

Class Overview

Delegate responsible for, in conjunction with the various actions, implementing cascade processing.

See Also

Summary

Constants
int AFTER_EVICT A cascade point that occurs just after eviction of the parent entity from the session cache
int AFTER_INSERT_BEFORE_DELETE A cascade point that occurs just after the insertion of the parent entity and just before deletion
int AFTER_INSERT_BEFORE_DELETE_VIA_COLLECTION A cascade point that occurs just after the insertion of the parent entity and just before deletion, inside a collection
int AFTER_LOCK A cascade point that occurs just after refreshing a parent entity
int AFTER_UPDATE A cascade point that occurs just after update of the parent entity
int BEFORE_FLUSH A cascade point that occurs just before the session is flushed
int BEFORE_INSERT_AFTER_DELETE A cascade point that occurs just before the insertion of the parent entity and just after deletion
int BEFORE_MERGE A cascade point that occurs just before merging from a transient parent entity into the object in the session cache
int BEFORE_REFRESH A cascade point that occurs just after locking a transient parent entity into the session cache
Public Constructors
Cascade(CascadingAction action, int cascadeTo, EventSource eventSource)
Public Methods
void cascade(EntityPersister persister, Object parent)
Cascade an action from the parent entity instance to all its children.
void cascade(EntityPersister persister, Object parent, Object anything)
Cascade an action from the parent entity instance to all its children.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int AFTER_EVICT

A cascade point that occurs just after eviction of the parent entity from the session cache

Constant Value: 0 (0x00000000)

public static final int AFTER_INSERT_BEFORE_DELETE

A cascade point that occurs just after the insertion of the parent entity and just before deletion

Constant Value: 1 (0x00000001)

public static final int AFTER_INSERT_BEFORE_DELETE_VIA_COLLECTION

A cascade point that occurs just after the insertion of the parent entity and just before deletion, inside a collection

Constant Value: 3 (0x00000003)

public static final int AFTER_LOCK

A cascade point that occurs just after refreshing a parent entity

Constant Value: 0 (0x00000000)

public static final int AFTER_UPDATE

A cascade point that occurs just after update of the parent entity

Constant Value: 0 (0x00000000)

public static final int BEFORE_FLUSH

A cascade point that occurs just before the session is flushed

Constant Value: 0 (0x00000000)

public static final int BEFORE_INSERT_AFTER_DELETE

A cascade point that occurs just before the insertion of the parent entity and just after deletion

Constant Value: 2 (0x00000002)

public static final int BEFORE_MERGE

A cascade point that occurs just before merging from a transient parent entity into the object in the session cache

Constant Value: 0 (0x00000000)

public static final int BEFORE_REFRESH

A cascade point that occurs just after locking a transient parent entity into the session cache

Constant Value: 0 (0x00000000)

Public Constructors

public Cascade (CascadingAction action, int cascadeTo, EventSource eventSource)

Public Methods

public void cascade (EntityPersister persister, Object parent)

Cascade an action from the parent entity instance to all its children.

Parameters
persister The parent's entity persister
parent The parent reference.

public void cascade (EntityPersister persister, Object parent, Object anything)

Cascade an action from the parent entity instance to all its children. This form is typicaly called from within cascade actions.

Parameters
persister The parent's entity persister
parent The parent reference.
anything Anything ;) Typically some form of cascade-local cache which is specific to each CascadingAction type