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.xml
Interface SqlXmlObjectMappingHandler

All Superinterfaces:
  SqlXmlHandler

    public interface SqlXmlObjectMappingHandler

extends SqlXmlHandler

Abstraction for handling XML object mapping to fields in a database.

Provides accessor methods for XML fields unmarshalled to an Object, and acts as factory for `SqlXmlValue` instances for marshalling purposes.

Since:
  2.5.5
Author:
  Thomas Risberg
See Also:
  `ResultSet.getSQLXML(int)`, `SQLXML`

Method Summary
`java.lang.Object` | `getXmlAsObject(java.sql.ResultSet rs, int columnIndex)` Retrieve the given column as an object marshalled from the XML data retrieved from the given ResultSet.
`java.lang.Object` | `getXmlAsObject(java.sql.ResultSet rs, java.lang.String columnName)` Retrieve the given column as an object marshalled from the XML data retrieved from the given ResultSet.
`SqlXmlValue` | `newMarshallingSqlXmlValue(java.lang.Object value)` Get an instance of an `SqlXmlValue` implementation to be used together with the database specific implementation of this `SqlXmlObjectMappingHandler`.

Methods inherited from interface org.springframework.jdbc.support.xml.SqlXmlHandler
`getXmlAsBinaryStream, getXmlAsBinaryStream, getXmlAsCharacterStream, getXmlAsCharacterStream, getXmlAsSource, getXmlAsSource, getXmlAsString, getXmlAsString, newSqlXmlValue, newSqlXmlValue, newSqlXmlValue, newSqlXmlValue, newSqlXmlValue`

Method Detail

### getXmlAsObject

    java.lang.Object getXmlAsObject(java.sql.ResultSet rs,
                                    java.lang.String columnName)
                                    throws java.sql.SQLException

  Retrieve the given column as an object marshalled from the XML data retrieved from the given ResultSet.

  Works with an internal Object to XML Mapping implementation.

  Parameters:
    `rs` - the ResultSet to retrieve the content from
    `columnName` - the column name to use
  Returns:
    the content as an Object, or `null` in case of SQL NULL
  Throws:
    `java.sql.SQLException` - if thrown by JDBC methods
  See Also:
    `ResultSet.getSQLXML(int)`

### getXmlAsObject

    java.lang.Object getXmlAsObject(java.sql.ResultSet rs,
                                    int columnIndex)
                                    throws java.sql.SQLException

  Retrieve the given column as an object marshalled from the XML data retrieved from the given ResultSet.

  Works with an internal Object to XML Mapping implementation.

  Parameters:
    `rs` - the ResultSet to retrieve the content from
    `columnIndex` - the column index to use
  Returns:
    the content as an Object, or `null` in case of SQL NULL
  Throws:
    `java.sql.SQLException` - if thrown by JDBC methods
  See Also:
    `ResultSet.getSQLXML(int)`

### newMarshallingSqlXmlValue

    SqlXmlValue newMarshallingSqlXmlValue(java.lang.Object value)

  Get an instance of an `SqlXmlValue` implementation to be used together with the database specific implementation of this `SqlXmlObjectMappingHandler`.

  Parameters:
    `value` - the Object to be marshalled to XML
  Returns:
    the implementation specific instance
  See Also:
    `SqlXmlValue`

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