Package org.hibernate.dialect.lock
Class PessimisticWriteSelectLockingStrategy
java.lang.Object
org.hibernate.dialect.lock.AbstractSelectLockingStrategy
org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy
- All Implemented Interfaces:
LockingStrategy
A pessimistic locking strategy where
LockMode.PESSIMISTIC_WRITE
lock is obtained via a select statement.
Differs from SelectLockingStrategy
in throwing
PessimisticEntityLockException
.
- Since:
- 3.5
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPessimisticWriteSelectLockingStrategy
(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, generateLockString, getLockable, getLockMode, getNoWaitSql, getSkipLockedSql, lock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.dialect.lock.LockingStrategy
lock, lock
-
Constructor Details
-
PessimisticWriteSelectLockingStrategy
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
-