接口 SqlValue
- 所有已知子接口:
SqlXmlValue
public interface SqlValue
Simple interface for complex types to be set as statement parameters.Implementations perform the actual work of setting the actual values. They must implement the callback method
setValue
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.- 从以下版本开始:
- 2.5.6
- 作者:
- Juergen Hoeller
- 另请参阅:
SqlTypeValue
,DisposableSqlTypeValue
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
cleanup()
Clean up resources held by this value object.void
setValue(PreparedStatement ps, int paramIndex)
Set the value on the given PreparedStatement.
方法详细资料
setValue
void setValue(PreparedStatement ps, int paramIndex) throws SQLException
Set the value on the given PreparedStatement.- 参数:
ps
- the PreparedStatement to work onparamIndex
- the index of the parameter for which we need to set the value- 抛出:
SQLException
- if a SQLException is encountered while setting parameter values
cleanup
void cleanup()
Clean up resources held by this value object.