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 checked SQLException to an unchecked exception.

    Very similar to SQLExceptionTranslator.

    • Method Detail

      • translate

        RuntimeException translate​(String procedureName,
                                   String sql,
                                   SQLException exception)
        Translates a checked SQLException to an unchecked exception. Does not throw the exception, only creates an instance
        Parameters:
        procedureName - the SQL procedure name derived by this library
        sql - the JDBC call string generated by this library
        exception - the exception to translate, should be passed as cause to the new exception instance returned by this method
        Returns:
        the unchecked exception instance