Interface SQLExceptionAdapter
-
- 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 SQLExceptionAdapter
Translates a checkedSQLException
to an unchecked exception.Very similar to
SQLExceptionTranslator
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RuntimeException
translate(String procedureName, String sql, SQLException exception)
Translates a checkedSQLException
to an unchecked exception.
-
-
-
Method Detail
-
translate
RuntimeException translate(String procedureName, String sql, SQLException exception)
Translates a checkedSQLException
to an unchecked exception. Does not throw the exception, only creates an instance- Parameters:
procedureName
- the SQL procedure name derived by this librarysql
- the JDBC call string generated by this libraryexception
- the exception to translate, should be passed as cause to the new exception instance returned by this method- Returns:
- the unchecked exception instance
-
-