类 Jdbc4SqlXmlHandler
- java.lang.Object
- org.springframework.jdbc.support.xml.Jdbc4SqlXmlHandler
- 所有已实现的接口:
SqlXmlHandler
public class Jdbc4SqlXmlHandler extends Object implements SqlXmlHandler
Default implementation of theSqlXmlHandlerinterface. Provides database-specific implementations for storing and retrieving XML documents to and from fields in a database, relying on the JDBC 4.0java.sql.SQLXMLfacility.- 从以下版本开始:
- 2.5.6
- 作者:
- Thomas Risberg, Juergen Hoeller
- 另请参阅:
SQLXML,ResultSet.getSQLXML(int),PreparedStatement.setSQLXML(int, java.sql.SQLXML)
构造器概要
构造器 构造器 说明 Jdbc4SqlXmlHandler()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 InputStreamgetXmlAsBinaryStream(ResultSet rs, int columnIndex)Retrieve the given column as binary stream from the given ResultSet.InputStreamgetXmlAsBinaryStream(ResultSet rs, String columnName)Retrieve the given column as binary stream from the given ResultSet.ReadergetXmlAsCharacterStream(ResultSet rs, int columnIndex)Retrieve the given column as character stream from the given ResultSet.ReadergetXmlAsCharacterStream(ResultSet rs, String columnName)Retrieve the given column as character stream from the given ResultSet.SourcegetXmlAsSource(ResultSet rs, int columnIndex, Class<? extends Source> sourceClass)Retrieve the given column as Source implemented using the specified source class from the given ResultSet.SourcegetXmlAsSource(ResultSet rs, String columnName, Class<? extends Source> sourceClass)Retrieve the given column as Source implemented using the specified source class from the given ResultSet.StringgetXmlAsString(ResultSet rs, int columnIndex)Retrieve the given column as String from the given ResultSet.StringgetXmlAsString(ResultSet rs, String columnName)Retrieve the given column as String from the given ResultSet.SqlXmlValuenewSqlXmlValue(Class<? extends Result> resultClass, XmlResultProvider provider)Create aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValuenewSqlXmlValue(String value)Create aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValuenewSqlXmlValue(XmlBinaryStreamProvider provider)Create aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValuenewSqlXmlValue(XmlCharacterStreamProvider provider)Create aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValuenewSqlXmlValue(Document document)Create aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.
构造器详细资料
Jdbc4SqlXmlHandler
public Jdbc4SqlXmlHandler()
方法详细资料
getXmlAsString
@Nullable public String getXmlAsString(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as String from the given ResultSet.Might simply invoke
ResultSet.getStringor work withSQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsString在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnName- the column name to use- 返回:
- the content as String, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getString(int),ResultSet.getSQLXML(int)
getXmlAsString
@Nullable public String getXmlAsString(ResultSet rs, int columnIndex) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as String from the given ResultSet.Might simply invoke
ResultSet.getStringor work withSQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsString在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnIndex- the column index to use- 返回:
- the content as String, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getString(int),ResultSet.getSQLXML(int)
getXmlAsBinaryStream
@Nullable public InputStream getXmlAsBinaryStream(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as binary stream from the given ResultSet.Might simply invoke
ResultSet.getAsciiStreamor work withSQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsBinaryStream在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnName- the column name to use- 返回:
- the content as a binary stream, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int),SQLXML.getBinaryStream()
getXmlAsBinaryStream
@Nullable public InputStream getXmlAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as binary stream from the given ResultSet.Might simply invoke
ResultSet.getAsciiStreamor work withSQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsBinaryStream在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnIndex- the column index to use- 返回:
- the content as binary stream, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int),SQLXML.getBinaryStream()
getXmlAsCharacterStream
@Nullable public Reader getXmlAsCharacterStream(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as character stream from the given ResultSet.Might simply invoke
ResultSet.getCharacterStreamor work withSQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsCharacterStream在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnName- the column name to use- 返回:
- the content as character stream, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int),SQLXML.getCharacterStream()
getXmlAsCharacterStream
@Nullable public Reader getXmlAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as character stream from the given ResultSet.Might simply invoke
ResultSet.getCharacterStreamor work withSQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsCharacterStream在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnIndex- the column index to use- 返回:
- the content as character stream, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int),SQLXML.getCharacterStream()
getXmlAsSource
@Nullable public Source getXmlAsSource(ResultSet rs, String columnName, @Nullable Class<? extends Source> sourceClass) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as Source implemented using the specified source class from the given ResultSet.Might work with
SQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsSource在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnName- the column name to usesourceClass- the implementation class to be used- 返回:
- the content as character stream, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int),SQLXML.getSource(java.lang.Class<T>)
getXmlAsSource
@Nullable public Source getXmlAsSource(ResultSet rs, int columnIndex, @Nullable Class<? extends Source> sourceClass) throws SQLException
从接口复制的说明:SqlXmlHandlerRetrieve the given column as Source implemented using the specified source class from the given ResultSet.Might work with
SQLXMLor database-specific classes depending on the database and driver.- 指定者:
getXmlAsSource在接口中SqlXmlHandler- 参数:
rs- the ResultSet to retrieve the content fromcolumnIndex- the column index to usesourceClass- the implementation class to be used- 返回:
- the content as character stream, or
nullin case of SQL NULL - 抛出:
SQLException- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int),SQLXML.getSource(java.lang.Class<T>)
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(String value)
从接口复制的说明:SqlXmlHandlerCreate aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue在接口中SqlXmlHandler- 参数:
value- the XML String value providing XML data- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue,SQLXML.setString(String)
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(XmlBinaryStreamProvider provider)
从接口复制的说明:SqlXmlHandlerCreate aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue在接口中SqlXmlHandler- 参数:
provider- theXmlBinaryStreamProviderproviding XML data- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue,SQLXML.setBinaryStream()
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(XmlCharacterStreamProvider provider)
从接口复制的说明:SqlXmlHandlerCreate aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue在接口中SqlXmlHandler- 参数:
provider- theXmlCharacterStreamProviderproviding XML data- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue,SQLXML.setCharacterStream()
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(Class<? extends Result> resultClass, XmlResultProvider provider)
从接口复制的说明:SqlXmlHandlerCreate aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue在接口中SqlXmlHandler- 参数:
resultClass- the Result implementation class to be usedprovider- theXmlResultProviderthat will provide the XML data- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue,SQLXML.setResult(Class)
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(Document document)
从接口复制的说明:SqlXmlHandlerCreate aSqlXmlValueinstance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue在接口中SqlXmlHandler- 参数:
document- the XML Document to be used- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue