The Spring Framework

org.springframework.jdbc.core
Class ArgTypePreparedStatementSetter

java.lang.Object
  extended by org.springframework.jdbc.core.ArgTypePreparedStatementSetter
All Implemented Interfaces:
ParameterDisposer, PreparedStatementSetter

 class ArgTypePreparedStatementSetter
extends Object
implements PreparedStatementSetter, ParameterDisposer

Simple adapter for PreparedStatementSetter that applies given arrays of arguments and JDBC argument types.

Author:
Juergen Hoeller

Constructor Summary
ArgTypePreparedStatementSetter(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).
 void setValues(PreparedStatement ps)
          Set values on the given PreparedStatement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgTypePreparedStatementSetter

public ArgTypePreparedStatementSetter(Object[] args,
                                      int[] argTypes)
Create a new ArgTypePreparedStatementSetter for the given arguments.

Parameters:
args -
argTypes -
Method Detail

setValues

public void setValues(PreparedStatement ps)
               throws SQLException
Description copied from interface: PreparedStatementSetter
Set values on the given PreparedStatement.

Specified by:
setValues in interface PreparedStatementSetter
Parameters:
ps - PreparedStatement we'll invoke setter methods on
Throws:
SQLException - there is no need to catch SQLExceptions that may be thrown in the implementation of this method. The JdbcTemplate class will handle them.

cleanupParameters

public void cleanupParameters()
Description copied from interface: ParameterDisposer
Close the resources allocated by parameters that the implementing object holds, for example in case of a DisposableSqlTypeValue (like a SqlLobValue).

Specified by:
cleanupParameters in interface ParameterDisposer
See Also:
DisposableSqlTypeValue.cleanup(), SqlLobValue.cleanup()

The Spring Framework

Copyright © 2002-2006 The Spring Framework.