Package guru.mikelue.jdut.jdbc.function
Class DbRelease
- java.lang.Object
-
- guru.mikelue.jdut.jdbc.function.DbRelease
-
public final class DbRelease extends Object
Functions forAutoCloseable, which are used to wrap existingJdbcFunctionfor closing feature. You may useDbRelease::autoCloseto surrounding yourJdbcFunction.yourJdbcFunction = yourJdbcFunction.surroundedBy(DbRelease::autoClose);- See Also:
JdbcFunction.SurroundOperator
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends AutoCloseable,R>
JdbcFunction<T,R>autoClose(JdbcFunction<T,R> surroundedFunction)Surrounds surroundedFunction to surrounding closing block for object ofAutoCloseable.
-
-
-
Method Detail
-
autoClose
public static <T extends AutoCloseable,R> JdbcFunction<T,R> autoClose(JdbcFunction<T,R> surroundedFunction)
Surrounds surroundedFunction to surrounding closing block for object ofAutoCloseable.- Type Parameters:
T- The fed object must be type ofAutoCloseableR- The type of returned object- Parameters:
surroundedFunction- The function to be surrounded- Returns:
- The function making
AutoCloseableto be closed after the surrounded function is completed. - See Also:
autoClose(JdbcFunction)
-
-