站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.3 正式版 API 英文文档

AbstractLockUpgradeEventListener (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档


org.hibernate.event.def
Class AbstractLockUpgradeEventListener

java.lang.Object
  extended byorg.hibernate.event.def.AbstractReassociateEventListener
      extended byorg.hibernate.event.def.AbstractLockUpgradeEventListener
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DefaultLoadEventListener, DefaultLockEventListener

public class AbstractLockUpgradeEventListener
extends AbstractReassociateEventListener

A convenience base class for listeners that respond to requests to perform a pessimistic lock upgrade on an entity.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
AbstractLockUpgradeEventListener()
           
 
Method Summary
protected  void upgradeLock(Object object, EntityEntry entry, LockMode requestedLockMode, SessionImplementor source)
          Performs a pessimistic lock upgrade on a given entity, if needed.
 
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

AbstractLockUpgradeEventListener

public AbstractLockUpgradeEventListener()
Method Detail

upgradeLock

protected void upgradeLock(Object object,
                           EntityEntry entry,
                           LockMode requestedLockMode,
                           SessionImplementor source)
                    throws HibernateException
Performs a pessimistic lock upgrade on a given entity, if needed.

Parameters:
object - The entity for which to upgrade the lock.
entry - The entity's EntityEntry instance.
requestedLockMode - The lock mode being requested for locking.
source - The session which is the source of the event being processed.
Throws:
HibernateException