DefaultReplicateEventListener (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.event.internal
Class DefaultReplicateEventListener

    java.lang.Object
      org.hibernate.event.internal.AbstractReassociateEventListener
          org.hibernate.event.internal.AbstractSaveEventListener
              org.hibernate.event.internal.DefaultReplicateEventListener

All Implemented Interfaces:
  Serializable, ReplicateEventListener

    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.

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.hibernate.event.internal.AbstractSaveEventListener
`AbstractSaveEventListener.EntityState`

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(Object entity, Serializable id, Object[] values, Type[] types, EventSource source)`

Methods inherited from class org.hibernate.event.internal.AbstractSaveEventListener
`cascadeAfterSave, cascadeBeforeSave, getAssumedUnsaved, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId`

Methods inherited from class org.hibernate.event.internal.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)

  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 entity
    `id` - The entity identifier
    `values` - The snapshot entity state
    `persister` - The entity persister
    `source` - 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.