站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

Cascades (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.engine
Class Cascades

java.lang.Object
  extended bynet.sf.hibernate.engine.Cascades

public final class Cascades
extends Object

Implements cascaded save / delete / update / lock / evict / replicate

Author:
Gavin King
See Also:
AssociationType

Nested Class Summary
static class Cascades.CascadeStyle
          A style of cascade that can be specified by the mapping for an association.
static class Cascades.CascadingAction
          A session action that may be cascaded from parent entity to its children
static class Cascades.IdentifierValue
          A strategy for determining if an identifier value is an identifier of a new transient instance or a previously persistent transient instance.
static class Cascades.VersionValue
          A strategy for determining if a version value is an version of a new transient instance or a previously persistent transient instance.
 
Field Summary
static Cascades.CascadingAction ACTION_COPY
           
static Cascades.CascadingAction ACTION_DELETE
           
static Cascades.CascadingAction ACTION_EVICT
           
static Cascades.CascadingAction ACTION_LOCK
           
static Cascades.CascadingAction ACTION_REPLICATE
           
static Cascades.CascadingAction ACTION_SAVE_UPDATE
           
static int CASCADE_AFTER_INSERT_BEFORE_DELETE
          A cascade point that occurs just after the insertion of the parent entity and just before deletion
static int CASCADE_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
static int CASCADE_BEFORE_INSERT_AFTER_DELETE
          A cascade point that occurs just before the insertion of the parent entity and just after deletion
static int CASCADE_ON_COPY
          A cascade point that occurs just after copying from a transient parent entity into the object in the session cache
static int CASCADE_ON_EVICT
          A cascade point that occurs just after eviction of the parent entity from the session cache
static int CASCADE_ON_LOCK
          A cascade point that occurs just after locking a transient parent entity into the session cache
static int CASCADE_ON_UPDATE
          A cascade point that occurs just after update of the parent entity
static Cascades.IdentifierValue SAVE_ANY
          Always assume the transient instance is newly instantiated
static Cascades.IdentifierValue SAVE_NONE
          Never assume the transient instance is newly instantiated
static Cascades.IdentifierValue SAVE_NULL
          Assume the transient instance is newly instantiated if the identifier is null.
static Cascades.CascadeStyle STYLE_ALL
          save / delete / update / evict / lock / replicate
static Cascades.CascadeStyle STYLE_ALL_DELETE_ORPHAN
          save / delete / update / evict / lock / replicate + delete orphans
static Cascades.CascadeStyle STYLE_DELETE_ORPHAN
          delete + delete orphans
static Cascades.CascadeStyle STYLE_NONE
          no cascades
static Cascades.CascadeStyle STYLE_ONLY_DELETE
          delete
static Cascades.CascadeStyle STYLE_SAVE_UPDATE
          save / update / lock / replicate
static Cascades.VersionValue VERSION_NEGATIVE
          Assume the transient instance is newly instantiated if the version is negative, otherwise assume it is a detached instance.
static Cascades.VersionValue VERSION_SAVE_NULL
          Assume the transient instance is newly instantiated if the version is null, otherwise assume it is a detached instance.
static Cascades.VersionValue VERSION_UNDEFINED
          Assume the transient instance is newly instantiated if the version is null, otherwise defer to the identifier unsaved-value.
 
Method Summary
static void cascade(SessionImplementor session, ClassPersister persister, Object parent, Cascades.CascadingAction action, int cascadeTo)
          Cascade an action from the parent object to all its children
static void cascade(SessionImplementor session, ClassPersister persister, Object parent, Cascades.CascadingAction action, int cascadeTo, Object anything)
          Cascade an action from the parent object to all its children
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_DELETE

public static final Cascades.CascadingAction ACTION_DELETE
See Also:
Session.delete(Object)

ACTION_LOCK

public static final Cascades.CascadingAction ACTION_LOCK
See Also:
Session.lock(Object, LockMode)

ACTION_EVICT

public static final Cascades.CascadingAction ACTION_EVICT
See Also:
Session.evict(Object)

ACTION_SAVE_UPDATE

public static final Cascades.CascadingAction ACTION_SAVE_UPDATE
See Also:
Session.saveOrUpdate(Object)

ACTION_COPY

public static final Cascades.CascadingAction ACTION_COPY
See Also:
net.sf.hibernate.Session#copy(Object)

ACTION_REPLICATE

public static final Cascades.CascadingAction ACTION_REPLICATE

CASCADE_AFTER_INSERT_BEFORE_DELETE

public static final int CASCADE_AFTER_INSERT_BEFORE_DELETE
A cascade point that occurs just after the insertion of the parent entity and just before deletion

See Also:
Constant Field Values

CASCADE_BEFORE_INSERT_AFTER_DELETE

public static final int CASCADE_BEFORE_INSERT_AFTER_DELETE
A cascade point that occurs just before the insertion of the parent entity and just after deletion

See Also:
Constant Field Values

CASCADE_AFTER_INSERT_BEFORE_DELETE_VIA_COLLECTION

public static final int CASCADE_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

See Also:
Constant Field Values

CASCADE_ON_UPDATE

public static final int CASCADE_ON_UPDATE
A cascade point that occurs just after update of the parent entity

See Also:
Constant Field Values

CASCADE_ON_EVICT

public static final int CASCADE_ON_EVICT
A cascade point that occurs just after eviction of the parent entity from the session cache

See Also:
Constant Field Values

CASCADE_ON_LOCK

public static final int CASCADE_ON_LOCK
A cascade point that occurs just after locking a transient parent entity into the session cache

See Also:
Constant Field Values

CASCADE_ON_COPY

public static final int CASCADE_ON_COPY
A cascade point that occurs just after copying from a transient parent entity into the object in the session cache

See Also:
Constant Field Values

STYLE_ALL_DELETE_ORPHAN

public static final Cascades.CascadeStyle STYLE_ALL_DELETE_ORPHAN
save / delete / update / evict / lock / replicate + delete orphans


STYLE_ALL

public static final Cascades.CascadeStyle STYLE_ALL
save / delete / update / evict / lock / replicate


STYLE_SAVE_UPDATE

public static final Cascades.CascadeStyle STYLE_SAVE_UPDATE
save / update / lock / replicate


STYLE_ONLY_DELETE

public static final Cascades.CascadeStyle STYLE_ONLY_DELETE
delete


STYLE_DELETE_ORPHAN

public static final Cascades.CascadeStyle STYLE_DELETE_ORPHAN
delete + delete orphans


STYLE_NONE

public static final Cascades.CascadeStyle STYLE_NONE
no cascades


SAVE_ANY

public static final Cascades.IdentifierValue SAVE_ANY
Always assume the transient instance is newly instantiated


SAVE_NONE

public static final Cascades.IdentifierValue SAVE_NONE
Never assume the transient instance is newly instantiated


SAVE_NULL

public static final Cascades.IdentifierValue SAVE_NULL
Assume the transient instance is newly instantiated if the identifier is null.


VERSION_SAVE_NULL

public static final Cascades.VersionValue VERSION_SAVE_NULL
Assume the transient instance is newly instantiated if the version is null, otherwise assume it is a detached instance.


VERSION_UNDEFINED

public static final Cascades.VersionValue VERSION_UNDEFINED
Assume the transient instance is newly instantiated if the version is null, otherwise defer to the identifier unsaved-value.


VERSION_NEGATIVE

public static final Cascades.VersionValue VERSION_NEGATIVE
Assume the transient instance is newly instantiated if the version is negative, otherwise assume it is a detached instance.

Method Detail

cascade

public static void cascade(SessionImplementor session,
                           ClassPersister persister,
                           Object parent,
                           Cascades.CascadingAction action,
                           int cascadeTo)
                    throws HibernateException
Cascade an action from the parent object to all its children

Throws:
HibernateException

cascade

public static void cascade(SessionImplementor session,
                           ClassPersister persister,
                           Object parent,
                           Cascades.CascadingAction action,
                           int cascadeTo,
                           Object anything)
                    throws HibernateException
Cascade an action from the parent object to all its children

Throws:
HibernateException