Package guru.mikelue.jdut.jdbc
Interface JdbcSupplier<R>
-
- Type Parameters:
R- The type of returned object
- 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 JdbcSupplier<R>
Likes theSupplierinterface with throwing ofSQLException.- See Also:
JdbcRunnable,JdbcFunction,SQLExceptionConvert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Supplier<R>asSupplier()Converts this expression toSupplier.default <E extends RuntimeException>
Supplier<R>asSupplier(SQLExceptionConvert<E> exceptionConvert)Converts this expression toSupplier, with customizedSQLExceptionConvert.RgetJdbc()Gets the supplied value by this interface.
-
-
-
Method Detail
-
asSupplier
default Supplier<R> asSupplier()
Converts this expression toSupplier.- Returns:
- The supplier with
SQLExceptionConvert::runtimeException - See Also:
asSupplier(SQLExceptionConvert)
-
asSupplier
default <E extends RuntimeException> Supplier<R> asSupplier(SQLExceptionConvert<E> exceptionConvert)
Converts this expression toSupplier, with customizedSQLExceptionConvert.- Type Parameters:
E- The type of exception to be generated by- Parameters:
exceptionConvert- The instance for convertingSQLExceptionto exception of type <E>- Returns:
- The supplier with
SQLExceptionConvert - See Also:
asSupplier()
-
getJdbc
R getJdbc() throws SQLException
Gets the supplied value by this interface.- Returns:
- The value to be returned
- Throws:
SQLException- eliminate the exception block of JDBC
-
-