Record Class TransactionConcurrencies.Guarantees
java.lang.Object
java.lang.Record
org.hibernate.dialect.lock.spi.TransactionConcurrencies.Guarantees
- All Implemented Interfaces:
ReadGuarantees
- Enclosing class:
TransactionConcurrencies
public static record TransactionConcurrencies.Guarantees(boolean preventsDirtyReads, boolean hasStableRowView, boolean preventsConcurrentModification, boolean holdsRowLockUntilTransactionCompletion, boolean isCurrentRead)
extends Record
implements ReadGuarantees
Immutable read guarantees, suitable for a programmatic declaration.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionGuarantees(boolean preventsDirtyReads, boolean hasStableRowView, boolean preventsConcurrentModification, boolean holdsRowLockUntilTransactionCompletion, boolean isCurrentRead) Creates an instance of aGuaranteesrecord class. -
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.booleanReturns the value of thehasStableRowViewrecord component.booleanReturns the value of theholdsRowLockUntilTransactionCompletionrecord component.booleanReturns the value of theisCurrentReadrecord component.booleanReturns the value of thepreventsConcurrentModificationrecord component.booleanReturns the value of thepreventsDirtyReadsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Guarantees
public Guarantees(boolean preventsDirtyReads, boolean hasStableRowView, boolean preventsConcurrentModification, boolean holdsRowLockUntilTransactionCompletion, boolean isCurrentRead) Creates an instance of aGuaranteesrecord class.- Parameters:
preventsDirtyReads- the value for thepreventsDirtyReadsrecord componenthasStableRowView- the value for thehasStableRowViewrecord componentpreventsConcurrentModification- the value for thepreventsConcurrentModificationrecord componentholdsRowLockUntilTransactionCompletion- the value for theholdsRowLockUntilTransactionCompletionrecord componentisCurrentRead- the value for theisCurrentReadrecord component
-
-
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 with thecomparemethod from their corresponding wrapper classes. -
preventsDirtyReads
public boolean preventsDirtyReads()Returns the value of thepreventsDirtyReadsrecord component.- Specified by:
preventsDirtyReadsin interfaceReadGuarantees- Returns:
- the value of the
preventsDirtyReadsrecord component
-
hasStableRowView
public boolean hasStableRowView()Returns the value of thehasStableRowViewrecord component.- Specified by:
hasStableRowViewin interfaceReadGuarantees- Returns:
- the value of the
hasStableRowViewrecord component
-
preventsConcurrentModification
public boolean preventsConcurrentModification()Returns the value of thepreventsConcurrentModificationrecord component.- Specified by:
preventsConcurrentModificationin interfaceReadGuarantees- Returns:
- the value of the
preventsConcurrentModificationrecord component
-
holdsRowLockUntilTransactionCompletion
public boolean holdsRowLockUntilTransactionCompletion()Returns the value of theholdsRowLockUntilTransactionCompletionrecord component.- Specified by:
holdsRowLockUntilTransactionCompletionin interfaceReadGuarantees- Returns:
- the value of the
holdsRowLockUntilTransactionCompletionrecord component
-
isCurrentRead
public boolean isCurrentRead()Returns the value of theisCurrentReadrecord component.- Specified by:
isCurrentReadin interfaceReadGuarantees- Returns:
- the value of the
isCurrentReadrecord component
-