public class ArgumentPreparedStatementSetter extends java.lang.Object implements PreparedStatementSetter, ParameterDisposer
PreparedStatementSetter that applies a given array of arguments.| 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
PreparedStatementSettersetValues in interface PreparedStatementSetterps - 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.SQLExceptionpublic void cleanupParameters()
ParameterDisposercleanupParameters in interface ParameterDisposerDisposableSqlTypeValue.cleanup(),
SqlLobValue.cleanup()