Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.support
Interface SqlValue

All Known Subinterfaces:
  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.

Since:
  2.5.6
Author:
  Juergen Hoeller
See Also:
  `SqlTypeValue`, `DisposableSqlTypeValue`

Method Summary
`void` | `cleanup()` Clean up resources held by this value object.
`void` | `setValue(java.sql.PreparedStatement ps, int paramIndex)` Set the value on the given PreparedStatement.

Method Detail

### setValue

    void setValue(java.sql.PreparedStatement ps,
                  int paramIndex)
                  throws java.sql.SQLException

  Set the 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
  Throws:
    `java.sql.SQLException` - if a SQLException is encountered while setting parameter values

### cleanup

    void cleanup()

  Clean up resources held by this value object.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD