public interface SqlValue
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.
SqlTypeValue
,
DisposableSqlTypeValue
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Clean up resources held by this value object.
|
void |
setValue(PreparedStatement ps,
int paramIndex)
Set the value on the given PreparedStatement.
|
void setValue(PreparedStatement ps, int paramIndex) throws SQLException
ps
- the PreparedStatement to work onparamIndex
- the index of the parameter for which we need to set the valueSQLException
- if an SQLException is encountered while setting parameter valuesvoid cleanup()