Package com.blazebit.persistence.view
Enum LockMode
- All Implemented Interfaces:
Serializable
,Comparable<LockMode>
,java.lang.constant.Constable
public enum LockMode extends Enum<LockMode>
The lock mode types for updatable entity views.
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant 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 aLockModeType.PESSIMISTIC_READ
for the entity when reading the entity view.PESSIMISTIC_WRITE
The pessimistic write locking mode will acquire aLockModeType.PESSIMISTIC_WRITE
for the entity when reading the entity view. -
Method Summary
-
Enum Constant Details
-
AUTO
The automatic lock mode will use optimistic locking if possible or no locking. -
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 aLockModeType.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. -
PESSIMISTIC_WRITE
The pessimistic write locking mode will acquire aLockModeType.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. -
NONE
No locking at any point is done.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-