Package org.hibernate.exception.spi
Interface SQLExceptionConversionDelegate
-
- All Known Implementing Classes:
AbstractSQLExceptionConversionDelegate
,SQLExceptionTypeDelegate
,SQLStateConversionDelegate
- 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 SQLExceptionConversionDelegate
Allow aSQLExceptionConverter
to work by chaining together multiple delegates. The main difference between a delegate and a full-fledged converter is that a delegate may returnnull
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable JDBCException
convert(SQLException sqlException, String message, String sql)
Convert the givenSQLException
to a subtype ofJDBCException
, if possible.
-
-
-
Method Detail
-
convert
@Nullable JDBCException convert(SQLException sqlException, String message, String sql)
Convert the givenSQLException
to a subtype ofJDBCException
, if possible.- Parameters:
sqlException
- TheSQLException
to be convertedmessage
- An optional error messagesql
- The SQL statement that resulted in the exception- Returns:
- The resulting
JDBCException
, ornull
if this delegate does not know how to interpret the givenSQLException
.
-
-