public class ArgumentPreparedStatementSetter extends java.lang.Object implements PreparedStatementSetter, ParameterDisposer
PreparedStatementSetter
that applies a given array of arguments.Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
args |
Constructor and Description |
---|
ArgumentPreparedStatementSetter(java.lang.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(java.sql.PreparedStatement ps,
int parameterPosition,
java.lang.Object argValue)
Set the value for prepared statements specified parameter index using the passed in value.
|
void |
setValues(java.sql.PreparedStatement ps)
Set parameter values on the given PreparedStatement.
|
public ArgumentPreparedStatementSetter(java.lang.Object[] args)
args
- the arguments to setpublic void setValues(java.sql.PreparedStatement ps) throws java.sql.SQLException
PreparedStatementSetter
setValues
in interface PreparedStatementSetter
ps
- the PreparedStatement to invoke setter methods onjava.sql.SQLException
- if a SQLException is encountered
(i.e. there is no need to catch SQLException)protected void doSetValue(java.sql.PreparedStatement ps, int parameterPosition, java.lang.Object argValue) throws java.sql.SQLException
ps
- the PreparedStatementparameterPosition
- index of the parameter positionargValue
- the value to setjava.sql.SQLException
public void cleanupParameters()
ParameterDisposer
cleanupParameters
in interface ParameterDisposer
DisposableSqlTypeValue.cleanup()
,
SqlLobValue.cleanup()