public class

PessimisticWriteSelectLockingStrategy

extends AbstractSelectLockingStrategy
java.lang.Object
   ↳ org.hibernate.dialect.lock.AbstractSelectLockingStrategy
     ↳ org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy

Class Overview

A pessimistic 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. This strategy is valid for LockMode.PESSIMISTIC_WRITE This class is a clone of SelectLockingStrategy.

Summary

Public Constructors
PessimisticWriteSelectLockingStrategy(Lockable lockable, LockMode lockMode)
Construct a locking strategy based on SQL SELECT statements.
Public Methods
void lock(Serializable id, Object version, Object object, int timeout, SessionImplementor session)
Protected Methods
String generateLockString(int lockTimeout)
[Expand]
Inherited Methods
From class org.hibernate.dialect.lock.AbstractSelectLockingStrategy
From class java.lang.Object
From interface org.hibernate.dialect.lock.LockingStrategy

Public Constructors

public PessimisticWriteSelectLockingStrategy (Lockable lockable, LockMode lockMode)

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.

Public Methods

Protected Methods

protected String generateLockString (int lockTimeout)