public enum LockMode extends Enum<LockMode>
| Enum Constant and Description |
|---|
AUTO
The automatic lock mode will use optimistic locking if possible or no locking.
|
NONE
No locking at any point is done.
|
OPTIMISTIC
The optimistic locking mode will use the version attribute of an entity to for optimistic locking.
|
PESSIMISTIC_READ
The pessimistic read locking mode will acquire a
LockModeType.PESSIMISTIC_READ for the entity when reading the entity view. |
PESSIMISTIC_WRITE
The pessimistic write locking mode will acquire a
LockModeType.PESSIMISTIC_WRITE for the entity when reading the entity view. |
| Modifier and Type | Method and Description |
|---|---|
static LockMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LockMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LockMode AUTO
public static final LockMode OPTIMISTIC
public static final LockMode PESSIMISTIC_READ
LockModeType.PESSIMISTIC_READ for the entity when reading the entity view.
This lock mode is only useful within the bounds of a single transaction as the lock is bound to it.public static final LockMode PESSIMISTIC_WRITE
LockModeType.PESSIMISTIC_WRITE for the entity when reading the entity view.
This lock mode is only useful within the bounds of a single transaction as the lock is bound to it.public static final LockMode NONE
public static LockMode[] values()
for (LockMode c : LockMode.values()) System.out.println(c);
public static LockMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2014–2018 Blazebit. All rights reserved.