|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jdbc.core.ArgTypePreparedStatementSetter
class ArgTypePreparedStatementSetter
Simple adapter for PreparedStatementSetter that applies given arrays of arguments and JDBC argument types.
Field Summary | |
---|---|
private java.lang.Object[] |
args
|
private int[] |
argTypes
|
Constructor Summary | |
---|---|
ArgTypePreparedStatementSetter(java.lang.Object[] args,
int[] argTypes)
Create a new ArgTypePreparedStatementSetter for the given arguments. |
Method Summary | |
---|---|
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,
int argType,
java.lang.Object argValue)
Set the value for the prepared statement's specified parameter position using the passed in value and type. |
void |
setValues(java.sql.PreparedStatement ps)
Set parameter values on the given PreparedStatement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.Object[] args
private final int[] argTypes
Constructor Detail |
---|
public ArgTypePreparedStatementSetter(java.lang.Object[] args, int[] argTypes)
args
- the arguments to setargTypes
- the corresponding SQL types of the argumentsMethod Detail |
---|
public void setValues(java.sql.PreparedStatement ps) throws java.sql.SQLException
PreparedStatementSetter
setValues
in interface PreparedStatementSetter
ps
- the PreparedStatement to invoke setter methods on
java.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, int argType, java.lang.Object argValue) throws java.sql.SQLException
ps
- the PreparedStatementparameterPosition
- index of the parameter positionargType
- the argument typeargValue
- the argument value
java.sql.SQLException
public void cleanupParameters()
ParameterDisposer
cleanupParameters
in interface ParameterDisposer
DisposableSqlTypeValue.cleanup()
,
SqlLobValue.cleanup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |