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 class SelectLockingStrategy extends AbstractSelectLockingStrategy
A locking strategy where an optimistic lock is obtained via a select statement.Differs from
PessimisticWriteSelectLockingStrategy
andPessimisticReadSelectLockingStrategy
in throwingOptimisticEntityLockException
.- Since:
- 3.2
- See Also:
Dialect.getForUpdateString(LockMode)
,Dialect.appendLockHint(LockOptions, String)
-
-
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 protected HibernateException
convertException(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:
convertException
in classAbstractSelectLockingStrategy
-
-