Uses of Interface
guru.mikelue.jdut.jdbc.JdbcFunction
-
Packages that use JdbcFunction Package Description guru.mikelue.jdut jdata-unit-test(JDUT) is a framework to ease the data building/cleaning for automatic testing, which the test is repeatable without interfere each other.guru.mikelue.jdut.jdbc This package provides coding library of JDBC by usage of lambda expression.
When we are coding database operations with JDBC, there are two things important, and, annoying: The handling ofSQLException
The release of resource This package is intent on "surrounding" your JDBC code by lambda expressions.guru.mikelue.jdut.jdbc.function This package contains out-of-box builder forJdbcSupplier
orJdbcRunnable
on processing ofResultSet
,Statement
, etc.guru.mikelue.jdut.operation The most important objects to effect data to database. -
-
Uses of JdbcFunction in guru.mikelue.jdut
Methods in guru.mikelue.jdut that return JdbcFunction Modifier and Type Method Description JdbcFunction<Connection,DataGrain>
DataConductor. buildJdbcFunction(DataGrain dataGrain, DataGrainOperator operator)
Builds JDBC function, which loads schema and executes operator on dataGrain object.JdbcFunction<Connection,DataGrain>
DataConductor. buildJdbcFunction(DataGrain dataGrain, DataGrainOperator operator, DataGrainDecorator decorator)
Builds JDBC function, which loads schema and executes operator on dataGrain object.JdbcFunction<Connection,?>
DuetFunctions. getBuildFunction()
Gets the function for building data.JdbcFunction<Connection,?>
DuetFunctions. getCleanFunction()
Gets the function for cleaning data.Methods in guru.mikelue.jdut that return types with arguments of type JdbcFunction Modifier and Type Method Description Optional<JdbcFunction<Connection,?>>
ConductorConfig. getJdbcFunction(String name)
Gets JDBC function by various sources.Methods in guru.mikelue.jdut with parameters of type JdbcFunction Modifier and Type Method Description <T> T
DataConductor. conduct(JdbcFunction<Connection,T> jdbcFunction)
Executes aJdbcFunction
, the connection would be put intoConductorContext
.ConductorConfig.Builder
ConductorConfig.Builder. namedJdbcFunction(String name, JdbcFunction<? extends Connection,?> jdbcFunction)
Puts named JDBC function. -
Uses of JdbcFunction in guru.mikelue.jdut.jdbc
Methods in guru.mikelue.jdut.jdbc that return JdbcFunction Modifier and Type Method Description default JdbcFunction<T,Void>
JdbcVoidFunction. asJdbcFunction()
GetsJdbcFunction
by this void function.JdbcFunction<T,R>
JdbcFunction.SurroundOperator. surround(JdbcFunction<T,R> surroundedFunction)
Surrounds function.static <T,R>
JdbcFunction<T,R>JdbcTemplateFactory. surround(JdbcFunction<T,R> surroundedJdbcFunction, JdbcFunction.SurroundOperator<T,R>... surroundings)
Surrounds surroundedJdbcFunction with surroundings(by sequence).static <T,R>
JdbcFunction<T,R>JdbcTemplateFactory. surround(JdbcFunction<T,R> surroundedJdbcFunction, SurroundingConfig<T,R> surroundingConfig)
Surrounds surroundedJdbcFunction with surroundings(by sequence).default JdbcFunction<T,R>
JdbcFunction. surroundedBy(JdbcFunction.SurroundOperator<T,R> surroundOperator)
Surrounds this function byJdbcFunction.SurroundOperator
.default JdbcFunction<T,Void>
JdbcVoidFunction. surroundedBy(JdbcFunction.SurroundOperator<T,Void> surroundOperator)
Surrounds this function byJdbcFunction.SurroundOperator
.Methods in guru.mikelue.jdut.jdbc that return types with arguments of type JdbcFunction Modifier and Type Method Description default UnaryOperator<JdbcFunction<T,R>>
JdbcFunction.SurroundOperator. asUnaryOperator()
Converts this operator otUnaryOperator
.Methods in guru.mikelue.jdut.jdbc with parameters of type JdbcFunction Modifier and Type Method Description static <T extends AutoCloseable,R>
JdbcSupplier<R>JdbcTemplateFactory. buildSupplier(JdbcSupplier<? extends T> supplier, JdbcFunction<T,R> worker)
Builds the supplier and work for JDBC operation.static <T extends AutoCloseable,R>
JdbcSupplier<R>JdbcTemplateFactory. buildSupplier(JdbcSupplier<? extends T> supplier, JdbcFunction<T,R> worker, SurroundingConfig<T,R> surroundingConfig)
Builds the supplier and work for JDBC operation.static <T> JdbcVoidFunction<T>
JdbcVoidFunction. fromJdbcFunction(JdbcFunction<T,?> jdbcFunction)
Creates this instance fromJdbcFunction
.JdbcFunction<T,R>
JdbcFunction.SurroundOperator. surround(JdbcFunction<T,R> surroundedFunction)
Surrounds function.static <T,R>
JdbcFunction<T,R>JdbcTemplateFactory. surround(JdbcFunction<T,R> surroundedJdbcFunction, JdbcFunction.SurroundOperator<T,R>... surroundings)
Surrounds surroundedJdbcFunction with surroundings(by sequence).static <T,R>
JdbcFunction<T,R>JdbcTemplateFactory. surround(JdbcFunction<T,R> surroundedJdbcFunction, SurroundingConfig<T,R> surroundingConfig)
Surrounds surroundedJdbcFunction with surroundings(by sequence). -
Uses of JdbcFunction in guru.mikelue.jdut.jdbc.function
Methods in guru.mikelue.jdut.jdbc.function that return JdbcFunction Modifier and Type Method Description static <T extends AutoCloseable,R>
JdbcFunction<T,R>DbRelease. autoClose(JdbcFunction<T,R> surroundedFunction)
Surrounds surroundedFunction to surrounding closing block for object ofAutoCloseable
.static <T extends Connection,R>
JdbcFunction<T,R>Transactional. simple(JdbcFunction<T,R> jdbcFunction)
BuildsJdbcFunction.SurroundOperator
with simple configuration of transaction.JdbcFunction<T,R>
Transactional. surround(JdbcFunction<T,R> jdbcFunction)
Surrounds function.Methods in guru.mikelue.jdut.jdbc.function with parameters of type JdbcFunction Modifier and Type Method Description static <T extends AutoCloseable,R>
JdbcFunction<T,R>DbRelease. autoClose(JdbcFunction<T,R> surroundedFunction)
Surrounds surroundedFunction to surrounding closing block for object ofAutoCloseable
.static <T> JdbcSupplier<T>
DbResultSet. buildSupplier(Connection conn, String sql, JdbcFunction<? super ResultSet,? extends T> supplier)
Builds supplier by connection and SQL string.
This method would useStatement.executeQuery(java.lang.String)
for getting result set.static <T> JdbcSupplier<T>
DbResultSet. buildSupplier(Statement statement, String sql, JdbcFunction<? super ResultSet,? extends T> supplier)
Builds supplier byStatement
and SQL string.
This method would useStatement.executeQuery(java.lang.String)
for getting result set.static <T> JdbcSupplier<T>
DbStatement. buildSupplierForPreparedStatement(Connection conn, String sql, List<Object> values, Function<Object,JDBCType> jdbcTypeMapping, JdbcFunction<? super PreparedStatement,? extends T> supplier)
Builds supplier to set-upPreparedStatement
and fed it to function.static <T> JdbcSupplier<T>
DbStatement. buildSupplierForPreparedStatement(Connection conn, String sql, List<String> nameOfColumns, DataRow dataRow, JdbcFunction<? super PreparedStatement,? extends T> supplier)
Builds supplier to set-upPreparedStatement
and fed it to function.static <T> JdbcSupplier<T>
DbStatement. buildSupplierForStatement(Connection conn, JdbcFunction<? super Statement,? extends T> supplier)
Builds supplier to set-upStatement
and fed it to function.static <T extends Connection,R>
JdbcFunction<T,R>Transactional. simple(JdbcFunction<T,R> jdbcFunction)
BuildsJdbcFunction.SurroundOperator
with simple configuration of transaction.JdbcFunction<T,R>
Transactional. surround(JdbcFunction<T,R> jdbcFunction)
Surrounds function. -
Uses of JdbcFunction in guru.mikelue.jdut.operation
Methods in guru.mikelue.jdut.operation that return JdbcFunction Modifier and Type Method Description default JdbcFunction<Connection,DataGrain>
DataGrainOperator. toJdbcFunction(DataGrain dataGrain)
Converts this lambda toJdbcFunction
.
-