Package org.hibernate.dialect.lock
Class PessimisticReadSelectLockingStrategy
- java.lang.Object
-
- org.hibernate.dialect.lock.AbstractSelectLockingStrategy
-
- org.hibernate.dialect.lock.PessimisticReadSelectLockingStrategy
-
- All Implemented Interfaces:
LockingStrategy
public class PessimisticReadSelectLockingStrategy extends AbstractSelectLockingStrategy
A pessimistic locking strategy whereLockMode.PESSIMISTIC_READ
is obtained via a select statement.Differs from
SelectLockingStrategy
in throwingPessimisticEntityLockException
.- Since:
- 3.5
- See Also:
Dialect.getForUpdateString(LockMode)
,Dialect.appendLockHint(LockOptions, String)
-
-
Constructor Summary
Constructors Constructor Description PessimisticReadSelectLockingStrategy(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
-
-