|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Session.LockRequest
Contains locking details (LockMode, Timeout and Scope).
Field Summary | |
---|---|
static int |
PESSIMISTIC_NO_WAIT
|
static int |
PESSIMISTIC_WAIT_FOREVER
|
Method Summary | |
---|---|
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). |
Field Detail |
---|
static final int PESSIMISTIC_NO_WAIT
static final int PESSIMISTIC_WAIT_FOREVER
Method Detail |
---|
LockMode getLockMode()
Session.LockRequest setLockMode(LockMode lockMode)
lockMode
- The lock mode to use for this request
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)
cascade="lock"
for scope=true to work.
scope
- true
to cascade locks; false
to not.
this
, for method chainingvoid lock(String entityName, Object object) throws HibernateException
HibernateException
void lock(Object object) throws HibernateException
HibernateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |