Package org.hibernate.dialect.lock
Class PessimisticReadSelectLockingStrategy
java.lang.Object
org.hibernate.dialect.lock.AbstractSelectLockingStrategy
org.hibernate.dialect.lock.PessimisticReadSelectLockingStrategy
- All Implemented Interfaces:
LockingStrategy
A pessimistic locking strategy where
LockMode.PESSIMISTIC_READ
is obtained via a select statement.
Differs from SelectLockingStrategy
in throwing
PessimisticEntityLockException
.
- Since:
- 3.5
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPessimisticReadSelectLockingStrategy
(EntityPersister lockable, LockMode lockMode) Construct a locking strategy based on SQL SELECT statements. -
Method Summary
Modifier and TypeMethodDescriptionprotected HibernateException
convertException
(Object entity, JDBCException ex) Methods inherited from class org.hibernate.dialect.lock.AbstractSelectLockingStrategy
determineSql, generateLockString, getLockable, getLockMode, getNoWaitSql, getSkipLockedSql, lock
-
Constructor Details
-
PessimisticReadSelectLockingStrategy
Construct a locking strategy based on SQL SELECT statements.- Parameters:
lockable
- The metadata for the entity to be locked.lockMode
- Indicates the type of lock to be acquired.
-
-
Method Details
-
convertException
- Overrides:
convertException
in classAbstractSelectLockingStrategy
-