org.springframework.jdbc.core.SqlTypeValue |
Known Indirect Subclasses
AbstractSqlTypeValue |
Abstract implementation of the SqlTypeValue interface, for convenient
creation of type values that are supposed to be passed into the
PreparedStatement.setObject method. |
DisposableSqlTypeValue |
Subinterface of SqlTypeValue that adds a cleanup callback,
to be invoked after the value has been set and the corresponding
statement has been executed. |
SqlLobValue |
Object to represent an SQL BLOB/CLOB value parameter. |
|
Class Overview
Interface to be implemented for setting values for more complex database-specific
types not supported by the standard setObject
method. This is
effectively an extended variant of SqlValue
.
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.
Summary
Constants |
int |
TYPE_UNKNOWN |
Constant that indicates an unknown (or unspecified) SQL type. |
Constants
public
static
final
int
TYPE_UNKNOWN
Constant that indicates an unknown (or unspecified) SQL type.
Passed into setTypeValue
if the original operation method
does not specify a SQL type.
Constant Value:
-2147483648
(0x80000000)
Public Methods
public
abstract
void
setTypeValue
(PreparedStatement ps, int paramIndex, int sqlType, String typeName)
Set the type value on the given PreparedStatement.
Parameters
ps
| the PreparedStatement to work on |
paramIndex
| the index of the parameter for which we need to set the value |
sqlType
| SQL type of the parameter we are setting |
typeName
| the type name of the parameter (optional) |
Throws
SQLException
| if a SQLException is encountered while setting parameter values |