| org.springframework.jdbc.core.SqlTypeValue
All known Subclasses: org.springframework.jdbc.core.support.AbstractSqlTypeValue,
SqlTypeValue | public interface SqlTypeValue (Code) | | Interface to be implemented for setting values for more complex database specific
types not supported by the standard setObject method.
Implementations perform the actual work of setting the actual values. They must
implement the callback method setTypeValue which can throw SQLExceptions
that will be caught and translated by the calling code. This callback method has
access to the underlying Connection via the given PreparedStatement object, if that
should be needed to create any database-specific objects.
author: Thomas Risberg author: Juergen Hoeller since: 1.1 See Also: java.sql.Types See Also: java.sql.PreparedStatement.setObject See Also: JdbcOperations.update(StringObject[]int[]) |
Field Summary | |
int | TYPE_UNKNOWN Constant that indicates an unknown (or unspecified) SQL type. |
setTypeValue | void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName) throws SQLException(Code) | | Set the type value on the given PreparedStatement.
Parameters: ps - the PreparedStatement to work on Parameters: paramIndex - the index of the parameter for which we need to set the value Parameters: sqlType - SQL type of the parameter we are setting Parameters: typeName - the type name of the parameter (optional) throws: SQLException - if a SQLException is encountered setting parameter values(that is, there's no need to catch SQLException) See Also: java.sql.Types See Also: java.sql.PreparedStatement.setObject |
|
|