Package org.hibernate.dialect.lock
Class SelectLockingStrategy
- java.lang.Object
- org.hibernate.dialect.lock.AbstractSelectLockingStrategy
- org.hibernate.dialect.lock.SelectLockingStrategy
- All Implemented Interfaces:
LockingStrategy
public classSelectLockingStrategyextendsAbstractSelectLockingStrategy
A locking strategy where an optimistic lock is obtained via a select statement.Differs from
PessimisticWriteSelectLockingStrategyandPessimisticReadSelectLockingStrategyin throwingOptimisticEntityLockException.
Constructor Summary
Constructors Constructor Description SelectLockingStrategy(Lockable lockable,LockMode lockMode)Construct a locking strategy based on SQL SELECT statements.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protectedHibernateExceptionconvertException(Object entity,JDBCException ex)Methods inherited from class org.hibernate.dialect.lock.AbstractSelectLockingStrategy
determineSql,generateLockString,getLockable,getLockMode,getNoWaitSql,getSkipLockedSql,lock
Method Detail
convertException
protected HibernateException convertException(Object entity,JDBCException ex)
- Overrides:
convertExceptionin classAbstractSelectLockingStrategy