Record Class LockingClauseRequest
java.lang.Object
java.lang.Record
org.hibernate.dialect.lock.spi.LockingClauseRequest
@SPI
public record LockingClauseRequest(PessimisticLockKind lockKind, Timeout timeout, List<LockingClauseRequest.Target> targets)
extends Record
A complete, read-only request to render a pessimistic locking clause.
An empty targets list requests locking of the complete result set without
an OF list. Otherwise, each target retains whether the database expects a
table alias or a qualified column reference.
- Since:
- 8.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA qualified column-reference locking target.static final recordA table-alias locking target.static interfaceA structured target named by a locking clause. -
Constructor Summary
ConstructorsConstructorDescriptionLockingClauseRequest(PessimisticLockKind lockKind, Timeout timeout, List<LockingClauseRequest.Target> targets) Creates an immutable locking-clause request. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lockKind()Returns the value of thelockKindrecord component.targets()Returns the value of thetargetsrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LockingClauseRequest
public LockingClauseRequest(PessimisticLockKind lockKind, Timeout timeout, List<LockingClauseRequest.Target> targets) Creates an immutable locking-clause request.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
lockKind
Returns the value of thelockKindrecord component.- Returns:
- the value of the
lockKindrecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
targets
Returns the value of thetargetsrecord component.- Returns:
- the value of the
targetsrecord component
-