public interface ParameterizedBatchCommand<T>
JdbcTemplate style parameterized query string
(for example: UPDATE TBL SET COL1 = ? WHERE ID = ?), its parameters, and a result policy. The result policy
is a Function<Integer, Boolean> function which must decide if the number of
affected rows is acceptable or not. It is called for each result in the batch.
Please note that for batch command, named parameters cannot be used!
(like UPDATE TBL SET COL1 = :value WHERE ID = :id)| Modifier and Type | Method and Description |
|---|---|
String |
getParameterizedQueryString(DatabaseProduct databaseProduct)
The parameterized query string.
|
org.springframework.jdbc.core.ParameterizedPreparedStatementSetter<T> |
getPreparedStatementSetter()
Implementations must return a
ParameterizedPreparedStatementSetter instance which will be
responsible for setting the parameter values for all the items in the batch |
List<T> |
getQueryParameters()
A
List instance containing the required parameters for the query string. |
Function<Integer,Boolean> |
resultPolicy() |
String getParameterizedQueryString(DatabaseProduct databaseProduct)
databaseProduct - A DatabaseProduct instance representing the type of the underlying HMS dabatabe.List<T> getQueryParameters()
List instance containing the required parameters for the query string.org.springframework.jdbc.core.ParameterizedPreparedStatementSetter<T> getPreparedStatementSetter()
ParameterizedPreparedStatementSetter instance which will be
responsible for setting the parameter values for all the items in the batchCopyright © 2024 The Apache Software Foundation. All rights reserved.