Module eclipselink
Class TableValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.persistence.tools.schemaframework.TableValidationException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TableValidationException.DifferentColumns,TableValidationException.MissingColumns,TableValidationException.MissingTable,TableValidationException.SurplusColumns
Thrown when database table validation fails.
Instances of this
Exception are passed as jakarta.persistence.SchemaValidationException#getFailures()
for each problem found during the schema validation process.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThrown when database table validation fails with one or more table's columns have different definition in the database.static final classThrown when database table validation fails with one or more table's columns missing in the database.static final classThrown when database table validation fails with the table missing in the database.static final classThrown when database table validation fails with one or more table's surplus columns in the database.static enumValidation failure. -
Method Summary
Modifier and TypeMethodDescriptionValidation failure.getTable()Name of the database table which failed the validation.abstract <T extends TableValidationException>
TUnwrapTableValidationExceptionas specific subtype.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getTable
Name of the database table which failed the validation.- Returns:
- name of the database table
-
getFailure
Validation failure. Specific failure type, e.g. missing table, missing column, surplus column, column definition differs. SpecificTableValidationExceptioninstance is returned for each failure type.- Returns:
- the validation failure
-
unwrap
UnwrapTableValidationExceptionas specific subtype. The specificTableValidationExceptionsubtype depends on theTableValidationException.ValidationFailuretype.- Type Parameters:
T- theTableValidationExceptionsubtype class- Parameters:
type- theTableValidationExceptionspecific subtype matching theTableValidationException.ValidationFailuretype.- Returns:
- the
TableValidationExceptioncast to the specific subtype
-