Class DefaultLockEventListener

java.lang.Object
org.hibernate.event.internal.DefaultLockEventListener
All Implemented Interfaces:
LockEventListener

public class DefaultLockEventListener extends Object implements LockEventListener
Defines the default lock event listeners used by hibernate to lock entities in response to generated lock events.
  • Constructor Details

    • DefaultLockEventListener

      public DefaultLockEventListener()
  • Method Details

    • onLock

      public void onLock(LockEvent event) throws HibernateException
      Handle the given lock event.
      Specified by:
      onLock in interface LockEventListener
      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-association
      object - The entity to be associated
      id - The id of the entity.
      persister - The entity's persister instance.
      Returns:
      An EntityEntry representing the entity within this session.