Interface ConnectionCallback<R>

  • Type Parameters:
    R - The return type
    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 ConnectionCallback<R>
    SQL callback interface that helps with handling SQLException.
    Since:
    1.0.0
    Author:
    graemerocher
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      R call​(java.sql.Connection connection)
      Subclasses should implement this method to allow generic exception handling.
    • Method Detail

      • call

        @NonNull
        R call​(@NonNull
               java.sql.Connection connection)
        throws java.sql.SQLException
        Subclasses should implement this method to allow generic exception handling.
        Parameters:
        connection - The connection
        Returns:
        The result
        Throws:
        java.sql.SQLException - If an error occurs