public static interface Session.LockRequest
Modifier and Type | Field and Description |
---|---|
static int |
PESSIMISTIC_NO_WAIT |
static int |
PESSIMISTIC_WAIT_FOREVER |
Modifier and Type | Method and Description |
---|---|
LockMode |
getLockMode()
Get the lock mode.
|
boolean |
getScope()
Check if locking is cascaded to owned collections and relationships.
|
int |
getTimeOut()
Get the timeout setting.
|
void |
lock(Object object) |
void |
lock(String entityName,
Object object) |
Session.LockRequest |
setLockMode(LockMode lockMode)
Specify the LockMode to be used.
|
Session.LockRequest |
setScope(boolean scope)
Specify if LockMode should be cascaded to owned collections and relationships.
|
Session.LockRequest |
setTimeOut(int timeout)
Specify the pessimistic lock timeout (check if your dialect supports this option).
|
static final int PESSIMISTIC_NO_WAIT
static final int PESSIMISTIC_WAIT_FOREVER
LockMode getLockMode()
Session.LockRequest setLockMode(LockMode lockMode)
lockMode
- int getTimeOut()
Session.LockRequest setTimeOut(int timeout)
timeout
- is time in milliseconds to wait for lock. -1 means wait forever and 0 means no wait.boolean getScope()
Session.LockRequest setScope(boolean scope)
scope
- void lock(String entityName, Object object) throws HibernateException
HibernateException
void lock(Object object) throws HibernateException
HibernateException
Copyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved