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

    Constructors
    Constructor
    Description
    Guarantees(boolean preventsDirtyReads, boolean hasStableRowView, boolean preventsConcurrentModification, boolean holdsRowLockUntilTransactionCompletion, boolean isCurrentRead)
    Creates an instance of a Guarantees record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the hasStableRowView record component.
    boolean
    Returns the value of the holdsRowLockUntilTransactionCompletion record component.
    boolean
    Returns the value of the isCurrentRead record component.
    boolean
    Returns the value of the preventsConcurrentModification record component.
    boolean
    Returns the value of the preventsDirtyReads record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Guarantees

      public Guarantees(boolean preventsDirtyReads, boolean hasStableRowView, boolean preventsConcurrentModification, boolean holdsRowLockUntilTransactionCompletion, boolean isCurrentRead)
      Creates an instance of a Guarantees record class.
      Parameters:
      preventsDirtyReads - the value for the preventsDirtyReads record component
      hasStableRowView - the value for the hasStableRowView record component
      preventsConcurrentModification - the value for the preventsConcurrentModification record component
      holdsRowLockUntilTransactionCompletion - the value for the holdsRowLockUntilTransactionCompletion record component
      isCurrentRead - the value for the isCurrentRead record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • preventsDirtyReads

      public boolean preventsDirtyReads()
      Returns the value of the preventsDirtyReads record component.
      Specified by:
      preventsDirtyReads in interface ReadGuarantees
      Returns:
      the value of the preventsDirtyReads record component
    • hasStableRowView

      public boolean hasStableRowView()
      Returns the value of the hasStableRowView record component.
      Specified by:
      hasStableRowView in interface ReadGuarantees
      Returns:
      the value of the hasStableRowView record component
    • preventsConcurrentModification

      public boolean preventsConcurrentModification()
      Returns the value of the preventsConcurrentModification record component.
      Specified by:
      preventsConcurrentModification in interface ReadGuarantees
      Returns:
      the value of the preventsConcurrentModification record component
    • holdsRowLockUntilTransactionCompletion

      public boolean holdsRowLockUntilTransactionCompletion()
      Returns the value of the holdsRowLockUntilTransactionCompletion record component.
      Specified by:
      holdsRowLockUntilTransactionCompletion in interface ReadGuarantees
      Returns:
      the value of the holdsRowLockUntilTransactionCompletion record component
    • isCurrentRead

      public boolean isCurrentRead()
      Returns the value of the isCurrentRead record component.
      Specified by:
      isCurrentRead in interface ReadGuarantees
      Returns:
      the value of the isCurrentRead record component