接口 SqlXmlObjectMappingHandler
- 所有超级接口:
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.- 从以下版本开始:
- 2.5.5
- 作者:
- Thomas Risberg
- 另请参阅:
ResultSet.getSQLXML(int)
,SQLXML
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Object
getXmlAsObject(ResultSet rs, int columnIndex)
Retrieve the given column as an object marshalled from the XML data retrieved from the given ResultSet.Object
getXmlAsObject(ResultSet rs, String columnName)
Retrieve the given column as an object marshalled from the XML data retrieved from the given ResultSet.SqlXmlValue
newMarshallingSqlXmlValue(Object value)
Get an instance of anSqlXmlValue
implementation to be used together with the database specific implementation of thisSqlXmlObjectMappingHandler
.从接口继承的方法 org.springframework.jdbc.support.xml.SqlXmlHandler
getXmlAsBinaryStream, getXmlAsBinaryStream, getXmlAsCharacterStream, getXmlAsCharacterStream, getXmlAsSource, getXmlAsSource, getXmlAsString, getXmlAsString, newSqlXmlValue, newSqlXmlValue, newSqlXmlValue, newSqlXmlValue, newSqlXmlValue
方法详细资料
getXmlAsObject
Object getXmlAsObject(ResultSet rs, String columnName) throws 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.
- 参数:
rs
- the ResultSet to retrieve the content fromcolumnName
- the column name to use- 返回:
- the content as an Object, or
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int)
getXmlAsObject
Object getXmlAsObject(ResultSet rs, int columnIndex) throws 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.
- 参数:
rs
- the ResultSet to retrieve the content fromcolumnIndex
- the column index to use- 返回:
- the content as an Object, or
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int)
newMarshallingSqlXmlValue
SqlXmlValue newMarshallingSqlXmlValue(Object value)
Get an instance of anSqlXmlValue
implementation to be used together with the database specific implementation of thisSqlXmlObjectMappingHandler
.- 参数:
value
- the Object to be marshalled to XML- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue