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
PreparedStatementSetter
setValues
in interface PreparedStatementSetter
ps
- 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 setSQLException
public void cleanupParameters()
ParameterDisposer
cleanupParameters
in interface ParameterDisposer
DisposableSqlTypeValue.cleanup()
,
SqlLobValue.cleanup()