org.hibernate.event.def
Class DefaultReplicateEventListener

java.lang.Object
  extended byorg.hibernate.event.def.AbstractReassociateEventListener
      extended byorg.hibernate.event.def.AbstractSaveEventListener
          extended byorg.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

Field Summary
 
Fields inherited from class org.hibernate.event.def.AbstractSaveEventListener
DELETED, DETACHED, PERSISTENT, TRANSIENT
 
Constructor Summary
DefaultReplicateEventListener()
           
 
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(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 org.hibernate.event.def.AbstractReassociateEventListener
reassociate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReplicateEventListener

public DefaultReplicateEventListener()
Method Detail

onReplicate

public void onReplicate(ReplicateEvent event)
                 throws HibernateException
Handle the given replicate event.

Specified by:
onReplicate in interface ReplicateEventListener
Parameters:
event - The replicate event to be handled.
Throws:
HibernateException

visitCollectionsBeforeSave

protected boolean visitCollectionsBeforeSave(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

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

getCascadeAction

protected CascadingAction getCascadeAction()
Specified by:
getCascadeAction in class AbstractSaveEventListener