Package org.hibernate.event.internal
Class DefaultLockEventListener
java.lang.Object
org.hibernate.event.internal.DefaultLockEventListener
- All Implemented Interfaces:
LockEventListener
Defines the default lock event listeners used by hibernate to lock entities
in response to generated lock events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Handle the given lock event.protected final EntityEntry
reassociate
(AbstractEvent event, Object object, Object id, EntityPersister persister) Associates a given entity (either transient or associated with another session) to the given session.
-
Constructor Details
-
DefaultLockEventListener
public DefaultLockEventListener()
-
-
Method Details
-
onLock
Handle the given lock event.- Specified by:
onLock
in interfaceLockEventListener
- Parameters:
event
- The lock event to be handled.- Throws:
HibernateException
-
reassociate
protected final EntityEntry reassociate(AbstractEvent event, Object object, Object id, EntityPersister persister) Associates a given entity (either transient or associated with another session) to the given session.- Parameters:
event
- The event triggering the re-associationobject
- The entity to be associatedid
- The id of the entity.persister
- The entity's persister instance.- Returns:
- An EntityEntry representing the entity within this session.
-