当前页面:
在线文档首页 >
Hibernate 3.2.3 正式版 API 英文文档
DefaultReplicateEventListener (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档
org.hibernate.event.def
Class DefaultReplicateEventListener
java.lang.Object
org.hibernate.event.def.AbstractReassociateEventListener
org.hibernate.event.def.AbstractSaveEventListener
org.hibernate.event.def.DefaultReplicateEventListener
- All Implemented Interfaces:
- ReplicateEventListener, Serializable
- public class DefaultReplicateEventListener
- extends AbstractSaveEventListener
- implements ReplicateEventListener
Defines the default replicate event listener used by Hibernate to replicate
entities in response to generated replicate events.
- Author:
- Steve Ebersole
- See Also:
- Serialized Form
Method Summary |
protected CascadingAction |
getCascadeAction()
|
protected boolean |
isVersionIncrementDisabled()
After the save, will te version number be incremented
if the instance is modified? |
void |
onReplicate(ReplicateEvent event)
Handle the given replicate event. |
protected boolean |
substituteValuesIfNecessary(Object entity,
Serializable id,
Object[] values,
EntityPersister persister,
SessionImplementor source)
Perform any property value substitution that is necessary
(interceptor callback, version initialization...) |
protected boolean |
visitCollectionsBeforeSave(Object entity,
Serializable id,
Object[] values,
Type[] types,
EventSource source)
|
Methods inherited from class org.hibernate.event.def.AbstractSaveEventListener |
cascadeAfterSave, cascadeBeforeSave, getAssumedUnsaved, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultReplicateEventListener
public DefaultReplicateEventListener()
onReplicate
public void onReplicate(ReplicateEvent event)
- Handle the given replicate event.
- Specified by:
onReplicate
in interface ReplicateEventListener
- Parameters:
event
- The replicate event to be handled.
- Throws:
TransientObjectException
- An invalid attempt to replicate a transient entity.
visitCollectionsBeforeSave
protected boolean visitCollectionsBeforeSave(Object entity,
Serializable id,
Object[] values,
Type[] types,
EventSource source)
- Overrides:
visitCollectionsBeforeSave
in class AbstractSaveEventListener
substituteValuesIfNecessary
protected boolean substituteValuesIfNecessary(Object entity,
Serializable id,
Object[] values,
EntityPersister persister,
SessionImplementor source)
- Description copied from class:
AbstractSaveEventListener
- Perform any property value substitution that is necessary
(interceptor callback, version initialization...)
- Overrides:
substituteValuesIfNecessary
in class AbstractSaveEventListener
- Parameters:
entity
- The entityid
- The entity identifiervalues
- The snapshot entity statepersister
- The entity persistersource
- The originating session
- Returns:
- True if the snapshot state changed such that
reinjection of the values into the entity is required.
isVersionIncrementDisabled
protected boolean isVersionIncrementDisabled()
- Description copied from class:
AbstractSaveEventListener
- After the save, will te version number be incremented
if the instance is modified?
- Overrides:
isVersionIncrementDisabled
in class AbstractSaveEventListener
- Returns:
- True if the version will be incremented on an entity change after save;
false otherwise.
getCascadeAction
protected CascadingAction getCascadeAction()
- Specified by:
getCascadeAction
in class AbstractSaveEventListener