@groovy.transform.CompileStatic class RefreshLockArguments extends java.lang.Object
Resolves the named arguments shared by refresh(Map) and lock(Map, Serializable).
| Type | Name and description |
|---|---|
static java.lang.String |
LOCKThe refresh(Map) argument that requests a lock: true for a pessimistic write lock, or a
jakarta.persistence.LockModeType naming the lock to acquire. |
static java.lang.String |
REFRESHThe lock(Map, Serializable) argument that requests a reload of the instance's state and version
under the lock. |
static java.lang.String |
TRANSACTION_REQUIREDThe message reported when a lock or a locked refresh is requested outside of an active transaction. |
static java.lang.String |
TYPEThe lock(Map, Serializable) argument that selects the jakarta.persistence.LockModeType to acquire; defaults to
jakarta.persistence.LockModeType#PESSIMISTIC_WRITE. |
static java.lang.String |
UNSUPPORTEDThe message reported when a datastore does not support refreshing an instance under a lock. |
static java.lang.String |
UNSUPPORTED_TYPEThe message reported when a datastore does not support lock modes other than a pessimistic write lock. |
| Constructor and description |
|---|
RefreshLockArguments() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static jakarta.persistence.LockModeType |
lockModeFrom(java.util.Map args)Resolves the lock requested by the lock argument. |
|
static jakarta.persistence.LockModeType |
lockTypeFrom(java.util.Map args)Resolves the lock mode selected by the type argument of lock(Map, Serializable). |
|
static boolean |
pessimistic(jakarta.persistence.LockModeType lockMode)
|
|
static boolean |
refreshRequested(java.util.Map args)
|
|
static boolean |
typeRequested(java.util.Map args)
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
The refresh(Map) argument that requests a lock: true for a pessimistic write lock, or a
jakarta.persistence.LockModeType naming the lock to acquire.
The lock(Map, Serializable) argument that requests a reload of the instance's state and version
under the lock.
The message reported when a lock or a locked refresh is requested outside of an active transaction.
The lock(Map, Serializable) argument that selects the jakarta.persistence.LockModeType to acquire; defaults to
jakarta.persistence.LockModeType#PESSIMISTIC_WRITE.
The message reported when a datastore does not support refreshing an instance under a lock.
The message reported when a datastore does not support lock modes other than a pessimistic write lock.
Resolves the lock requested by the lock argument.
args - The named arguments, may be nullnull when no lock was requested Resolves the lock mode selected by the type argument of lock(Map, Serializable).
args - The named arguments, may be null
args - The named arguments, may be nullrefresh argument requests a reload under the lock
args - The named arguments, may be nulltype
supplied as null counts as absent, the way lockTypeFrom(Map) reads it.