Package org.hibernate.exception.spi
Interface ViolatedConstraintNameExtractor
-
- All Known Implementing Classes:
TemplatedViolatedConstraintNameExtractor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ViolatedConstraintNameExtractor
An object that can extract the name of a violated database constraint from aSQLException
that results from the constraint violation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable String
extractConstraintName(SQLException sqle)
Extract the name of the violated constraint from the givenSQLException
.
-
-
-
Method Detail
-
extractConstraintName
@Nullable String extractConstraintName(SQLException sqle)
Extract the name of the violated constraint from the givenSQLException
.- Parameters:
sqle
- The exception that was the result of the constraint violation.- Returns:
- The extracted constraint name.
-
-