Package st.orm

Record Class IntegrityViolation.Length

java.lang.Object
java.lang.Record
st.orm.IntegrityViolation.Length
Record Components:
table - the table the column belongs to, or null when it is not known.
type - the entity type of the write, or null when it is not known.
fields - the field of the column; empty when the database does not name it.
maxLength - the column's length in characters, known for a violation validate found; null for one the database reported.
All Implemented Interfaces:
IntegrityViolation
Enclosing interface:
IntegrityViolation

public static record IntegrityViolation.Length(@Nullable String table, @Nullable Class<? extends Data> type, List<Metamodel<?,?>> fields, @Nullable Integer maxLength) extends Record implements IntegrityViolation
A string longer than its column. SQL state 22001, string data right truncation. A column's length is no named constraint.
Since:
1.16
  • Constructor Details

    • Length

      public Length(@Nullable String table, @Nullable Class<? extends Data> type, List<Metamodel<?,?>> fields, @Nullable Integer maxLength)
      Creates an instance of a Length record class.
      Parameters:
      table - the value for the table record component
      type - the value for the type record component
      fields - the value for the fields record component
      maxLength - the value for the maxLength 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.
    • 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
    • fields

      public List<Metamodel<?,?>> fields()
      Returns the value of the fields record component.
      Specified by:
      fields in interface IntegrityViolation
      Returns:
      the value of the fields record component
    • maxLength

      public @Nullable Integer maxLength()
      Returns the value of the maxLength record component.
      Returns:
      the value of the maxLength record component