|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.LockMode
public final class LockMode
Instances represent a lock mode for a row of a relational database table. It is not intended that users spend much time worrying about locking since Hibernate usually obtains exactly the right lock level automatically. Some "advanced" users may wish to explicitly specify lock levels.
Session.lock(Object,LockMode)
,
Serialized FormField Summary | |
---|---|
static LockMode |
FORCE
Similiar to UPGRADE except that, for versioned entities,
it results in a forced version increment. |
static LockMode |
NONE
No lock required. |
static LockMode |
READ
A shared lock. |
static LockMode |
UPGRADE
An upgrade lock. |
static LockMode |
UPGRADE_NOWAIT
Attempt to obtain an upgrade lock, using an Oracle-style select for update nowait. |
static LockMode |
WRITE
A WRITE lock is obtained when an object is updated or inserted. |
Method Summary | |
---|---|
boolean |
greaterThan(LockMode mode)
Check if this lock mode is more restrictive than the given lock mode. |
boolean |
lessThan(LockMode mode)
Check if this lock mode is less restrictive than the given lock mode. |
static LockMode |
parse(String name)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final LockMode NONE
public static final LockMode READ
public static final LockMode UPGRADE
public static final LockMode UPGRADE_NOWAIT
public static final LockMode WRITE
public static final LockMode FORCE
UPGRADE
except that, for versioned entities,
it results in a forced version increment.
Method Detail |
---|
public String toString()
toString
in class Object
public boolean greaterThan(LockMode mode)
mode
- LockMode to check
public boolean lessThan(LockMode mode)
mode
- LockMode to check
public static LockMode parse(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |