Package org.springframework.jdbc.core
Class ArgumentPreparedStatementSetter
java.lang.Object
org.springframework.jdbc.core.ArgumentPreparedStatementSetter
- All Implemented Interfaces:
- ParameterDisposer,- PreparedStatementSetter
public class ArgumentPreparedStatementSetter
extends Object
implements PreparedStatementSetter, ParameterDisposer
Simple adapter for 
PreparedStatementSetter that applies a given array
 of arguments.- Since:
- 3.2.3
- Author:
- Juergen Hoeller
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a newArgumentPreparedStatementSetterfor the given arguments.
- 
Method SummaryModifier and TypeMethodDescriptionvoidClose the resources allocated by parameters that the implementing object holds, for example in case of a DisposableSqlTypeValue (like an SqlLobValue).protected voiddoSetValue(PreparedStatement ps, int parameterPosition, @Nullable Object argValue) Set the value for the prepared statement's specified parameter position using the supplied value.voidSet parameter values on the given PreparedStatement.
- 
Constructor Details- 
ArgumentPreparedStatementSetterCreate a newArgumentPreparedStatementSetterfor the given arguments.- Parameters:
- args- the arguments to set
 
 
- 
- 
Method Details- 
setValuesDescription copied from interface:PreparedStatementSetterSet parameter values on the given PreparedStatement.- Specified by:
- setValuesin interface- PreparedStatementSetter
- Parameters:
- ps- the PreparedStatement to invoke setter methods on
- Throws:
- SQLException- if an SQLException is encountered (i.e. there is no need to catch SQLException)
 
- 
doSetValueprotected void doSetValue(PreparedStatement ps, int parameterPosition, @Nullable Object argValue) throws SQLException Set the value for the prepared statement's specified parameter position using the supplied value.This method can be overridden by subclasses if needed. - Parameters:
- ps- the PreparedStatement
- parameterPosition- index of the parameter position
- argValue- the value to set
- Throws:
- SQLException- if thrown by PreparedStatement methods
 
- 
cleanupParameterspublic void cleanupParameters()Description copied from interface:ParameterDisposerClose the resources allocated by parameters that the implementing object holds, for example in case of a DisposableSqlTypeValue (like an SqlLobValue).- Specified by:
- cleanupParametersin interface- ParameterDisposer
- See Also:
 
 
-