java.lang.Object
java.lang.Record
st.orm.IntegrityViolation.ForeignKey
- Record Components:
constraint- the name of the violated foreign key, ornullwhen the database reported none.table- the table that holds the foreign key, ornullwhen it is not known.type- the entity type of the write, ornullwhen it is not known.fields- the fields of the foreign key; empty when they are not identified.
- All Implemented Interfaces:
IntegrityViolation
- Enclosing interface:
IntegrityViolation
public static record IntegrityViolation.ForeignKey(@Nullable String constraint, @Nullable String table, @Nullable Class<? extends Data> type, List<Metamodel<?,?>> fields)
extends Record
implements IntegrityViolation
A foreign key that references a row that does not exist. SQL state
23503, foreign key violation.- Since:
- 1.16
-
Nested Class Summary
Nested classes/interfaces inherited from interface st.orm.IntegrityViolation
IntegrityViolation.Check, IntegrityViolation.ForeignKey, IntegrityViolation.Length, IntegrityViolation.NotNull, IntegrityViolation.NumericRange, IntegrityViolation.Referenced, IntegrityViolation.Unique -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of theconstraintrecord component.final booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.@Nullable Stringtable()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface st.orm.IntegrityViolation
on
-
Constructor Details
-
ForeignKey
public ForeignKey(@Nullable String constraint, @Nullable String table, @Nullable Class<? extends Data> type, List<Metamodel<?, ?>> fields) Creates an instance of aForeignKeyrecord class.- Parameters:
constraint- the value for theconstraintrecord componenttable- the value for thetablerecord componenttype- the value for thetyperecord componentfields- the value for thefieldsrecord component
-
-
Method Details
-
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. -
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. -
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 withObjects::equals(Object,Object). -
constraint
Returns the value of theconstraintrecord component.- Specified by:
constraintin interfaceIntegrityViolation- Returns:
- the value of the
constraintrecord component
-
table
Returns the value of thetablerecord component.- Specified by:
tablein interfaceIntegrityViolation- Returns:
- the value of the
tablerecord component
-
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceIntegrityViolation- Returns:
- the value of the
typerecord component
-
fields
Returns the value of thefieldsrecord component.- Specified by:
fieldsin interfaceIntegrityViolation- Returns:
- the value of the
fieldsrecord component
-