Package st.orm

Record Class IntegrityViolation.NumericRange

java.lang.Object
java.lang.Record
st.orm.IntegrityViolation.NumericRange
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.
precision - the column's precision, the number of digits it holds, known for a violation validate found; null for one the database reported.
scale - the column's scale, the number of digits after the decimal point, known with the precision.
All Implemented Interfaces:
IntegrityViolation
Enclosing interface:
IntegrityViolation

public static record IntegrityViolation.NumericRange(@Nullable String table, @Nullable Class<? extends Data> type, List<Metamodel<?,?>> fields, @Nullable Integer precision, @Nullable Integer scale) extends Record implements IntegrityViolation
A number with more digits before the decimal point than its column holds. SQL state 22003, numeric value out of range. A column's precision is no named constraint.
Since:
1.16
  • Constructor Details

    • NumericRange

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

      public @Nullable Integer precision()
      Returns the value of the precision record component.
      Returns:
      the value of the precision record component
    • scale

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