Package org.hibernate.event.internal
Class DefaultReplicateEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- org.hibernate.event.internal.AbstractSaveEventListener<ReplicationMode>
-
- org.hibernate.event.internal.DefaultReplicateEventListener
-
- All Implemented Interfaces:
ReplicateEventListener
,CallbackRegistryConsumer
@Deprecated(since="6") public class DefaultReplicateEventListener extends AbstractSaveEventListener<ReplicationMode> implements ReplicateEventListener
Deprecated.sinceSession.replicate(java.lang.Object, org.hibernate.ReplicationMode)
is deprecatedDefines the default replicate event listener used by Hibernate to replicate entities in response to generated replicate events.
-
-
Constructor Summary
Constructors Constructor Description DefaultReplicateEventListener()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected CascadingAction<ReplicationMode>
getCascadeAction()
Deprecated.protected boolean
isVersionIncrementDisabled()
Deprecated.After the save, will te version number be incremented if the instance is modified?void
onReplicate(ReplicateEvent event)
Deprecated.Handle the given replicate event.protected boolean
substituteValuesIfNecessary(Object entity, Object id, Object[] values, EntityPersister persister, SessionImplementor source)
Deprecated.Perform any property value substitution that is necessary (interceptor callback, version initialization...)protected boolean
visitCollectionsBeforeSave(Object entity, Object id, Object[] values, Type[] types, EventSource source)
Deprecated.-
Methods inherited from class org.hibernate.event.internal.AbstractSaveEventListener
cascadeAfterSave, cascadeBeforeSave, getMergeMap, injectCallbackRegistry, invokeSaveLifecycle, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId
-
Methods inherited from class org.hibernate.event.internal.AbstractReassociateEventListener
reassociate
-
-
-
-
Method Detail
-
onReplicate
public void onReplicate(ReplicateEvent event)
Deprecated.Handle the given replicate event.- Specified by:
onReplicate
in interfaceReplicateEventListener
- Parameters:
event
- The replicate event to be handled.- Throws:
TransientObjectException
- An invalid attempt to replicate a transient entity.
-
visitCollectionsBeforeSave
protected boolean visitCollectionsBeforeSave(Object entity, Object id, Object[] values, Type[] types, EventSource source)
Deprecated.- Overrides:
visitCollectionsBeforeSave
in classAbstractSaveEventListener<ReplicationMode>
-
substituteValuesIfNecessary
protected boolean substituteValuesIfNecessary(Object entity, Object id, Object[] values, EntityPersister persister, SessionImplementor source)
Deprecated.Description copied from class:AbstractSaveEventListener
Perform any property value substitution that is necessary (interceptor callback, version initialization...)- Overrides:
substituteValuesIfNecessary
in classAbstractSaveEventListener<ReplicationMode>
- 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()
Deprecated.Description copied from class:AbstractSaveEventListener
After the save, will te version number be incremented if the instance is modified?- Overrides:
isVersionIncrementDisabled
in classAbstractSaveEventListener<ReplicationMode>
- Returns:
- True if the version will be incremented on an entity change after save; false otherwise.
-
getCascadeAction
protected CascadingAction<ReplicationMode> getCascadeAction()
Deprecated.- Specified by:
getCascadeAction
in classAbstractSaveEventListener<ReplicationMode>
-
-