org.hibernate.dialect.lock
Class SelectLockingStrategy
java.lang.Object
org.hibernate.dialect.lock.SelectLockingStrategy
- LockingStrategy
public class SelectLockingStrategy
extends java.lang.Object
A locking strategy where the locks are obtained through select statements.
For non-read locks, this is achieved through the Dialect's specific
SELECT ... FOR UPDATE syntax.
SelectLockingStrategy
public SelectLockingStrategy(Lockable lockable,
LockMode lockMode)
Construct a locking strategy based on SQL SELECT statements.
lockable
- The metadata for the entity to be locked.lockMode
- Indictates the type of lock to be acquired.
generateLockString
protected String generateLockString()
getLockMode
protected LockMode getLockMode()