Package com.glyart.asql.common.functions
Interface ParametrizedPreparedStatementSetter<T>
-
- Type Parameters:
T
- yhe argument type
public interface ParametrizedPreparedStatementSetter<T>
Represents a callback interface used by theDataTemplate
class for executing batch updates.Implementations of this interface set values on a
PreparedStatement
provided by the DataTemplate class, for each of a number of updates in a batch using the same SQL statement. They are responsible for setting parameters: a SQL statement with placeholders (question marks) will already have been supplied.Implementations don't need to worry about handling exceptions: they will be handled by aSQL DataTemplate and passed to a CompletableFuture for further analysis by the user.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setValues(PreparedStatement ps, T argument)
Sets the parameter values of the T argument inside the PreparedStatement
-
-
-
Method Detail
-
setValues
void setValues(PreparedStatement ps, T argument) throws SQLException
Sets the parameter values of the T argument inside the PreparedStatement- Parameters:
ps
- an active PreparedStatementargument
- a generic object containing the values to set- Throws:
SQLException
- if an SQLException is encountered while trying to set values (no need to catch)
-
-