|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SqlTypeValue
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.
Types
,
PreparedStatement.setObject(int, java.lang.Object, int)
,
JdbcOperations.update(String, Object[], int[])
,
SqlValue
Field Summary | |
---|---|
static int |
TYPE_UNKNOWN
Constant that indicates an unknown (or unspecified) SQL type. |
Method Summary | |
---|---|
void |
setTypeValue(PreparedStatement ps,
int paramIndex,
int sqlType,
String typeName)
Set the type value on the given PreparedStatement. |
Field Detail |
---|
static final int TYPE_UNKNOWN
setTypeValue
if the original operation method
does not specify a SQL type.
Types
,
JdbcOperations.update(String, Object[])
,
Constant Field ValuesMethod Detail |
---|
void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName) throws SQLException
ps
- the PreparedStatement to work onparamIndex
- the index of the parameter for which we need to set the valuesqlType
- SQL type of the parameter we are settingtypeName
- the type name of the parameter (optional)
SQLException
- if a SQLException is encountered while setting parameter valuesTypes
,
PreparedStatement.setObject(int, java.lang.Object, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |