public class ArgumentPreparedStatementSetter extends Object implements PreparedStatementSetter, ParameterDisposer
PreparedStatementSetter that applies a given array of arguments.| Constructor and Description |
|---|
ArgumentPreparedStatementSetter(Object[] args)
Create a new ArgPreparedStatementSetter for the given arguments.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupParameters()
Close the resources allocated by parameters that the implementing
object holds, for example in case of a DisposableSqlTypeValue
(like a SqlLobValue).
|
protected void |
doSetValue(PreparedStatement ps,
int parameterPosition,
Object argValue)
Set the value for prepared statements specified parameter index using the passed in value.
|
void |
setValues(PreparedStatement ps)
Set parameter values on the given PreparedStatement.
|
public ArgumentPreparedStatementSetter(Object[] args)
args - the arguments to setpublic void setValues(PreparedStatement ps) throws SQLException
PreparedStatementSettersetValues in interface PreparedStatementSetterps - the PreparedStatement to invoke setter methods onSQLException - if a SQLException is encountered
(i.e. there is no need to catch SQLException)protected void doSetValue(PreparedStatement ps, int parameterPosition, Object argValue) throws SQLException
ps - the PreparedStatementparameterPosition - index of the parameter positionargValue - the value to setSQLExceptionpublic void cleanupParameters()
ParameterDisposercleanupParameters in interface ParameterDisposerDisposableSqlTypeValue.cleanup(),
SqlLobValue.cleanup()