Record Class LockingSqlRewriteRequest
java.lang.Object
java.lang.Record
org.hibernate.dialect.lock.spi.LockingSqlRewriteRequest
@SPI
public record LockingSqlRewriteRequest(String sql, PessimisticLockKind lockKind, Timeout timeout, List<LockingClauseRequest.Target> targets)
extends Record
A complete, read-only request to apply pessimistic locking to already- rendered SQL.
The target list contains only structure known by the caller. An empty list does not authorize a rewriter to discover table references by parsing the SQL string.
- Since:
- 8.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLockingSqlRewriteRequest(String sql, PessimisticLockKind lockKind, Timeout timeout, List<LockingClauseRequest.Target> targets) Creates an immutable locking SQL rewrite 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.sql()Returns the value of thesqlrecord 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
-
LockingSqlRewriteRequest
public LockingSqlRewriteRequest(String sql, PessimisticLockKind lockKind, Timeout timeout, List<LockingClauseRequest.Target> targets) Creates an immutable locking SQL rewrite 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). -
sql
Returns the value of thesqlrecord component.- Returns:
- the value of the
sqlrecord component
-
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
-