Package org.hibernate.dialect.lock
Class SelectLockingStrategy
java.lang.Object
org.hibernate.dialect.lock.AbstractSelectLockingStrategy
org.hibernate.dialect.lock.SelectLockingStrategy
- All Implemented Interfaces:
LockingStrategy
A locking strategy where an optimistic lock is obtained via a select
statement.
Differs from PessimisticWriteSelectLockingStrategy
and
PessimisticReadSelectLockingStrategy
in throwing
OptimisticEntityLockException
.
- Since:
- 3.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSelectLockingStrategy
(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
-
SelectLockingStrategy
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
-