Package st.orm

Record Class IntegrityViolation.Check

java.lang.Object
java.lang.Record
st.orm.IntegrityViolation.Check
Record Components:
constraint - the name of the check constraint, or null when the database reported none.
table - the table the constraint belongs to, or null when it is not known.
type - the entity type of the write, or null when it is not known.
All Implemented Interfaces:
IntegrityViolation
Enclosing interface:
IntegrityViolation

public static record IntegrityViolation.Check(@Nullable String constraint, @Nullable String table, @Nullable Class<? extends Data> type) extends Record implements IntegrityViolation
A value a check constraint rejects. SQL state 23514, check violation. A check constraint names no column in its error.
Since:
1.16
  • Constructor Details

    • Check

      public Check(@Nullable String constraint, @Nullable String table, @Nullable Class<? extends Data> type)
      Creates an instance of a Check record class.
      Parameters:
      constraint - the value for the constraint record component
      table - the value for the table record component
      type - the value for the type 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 Objects::equals(Object,Object).
      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.
    • constraint

      public @Nullable String constraint()
      Returns the value of the constraint record component.
      Specified by:
      constraint in interface IntegrityViolation
      Returns:
      the value of the constraint record component
    • table

      public @Nullable String table()
      Returns the value of the table record component.
      Specified by:
      table in interface IntegrityViolation
      Returns:
      the value of the table record component
    • type

      public @Nullable Class<? extends Data> type()
      Returns the value of the type record component.
      Specified by:
      type in interface IntegrityViolation
      Returns:
      the value of the type record component