类 Jdbc4SqlXmlHandler
- java.lang.Object
- org.springframework.jdbc.support.xml.Jdbc4SqlXmlHandler
- 所有已实现的接口:
SqlXmlHandler
public class Jdbc4SqlXmlHandler extends Object implements SqlXmlHandler
Default implementation of theSqlXmlHandler
interface. Provides database-specific implementations for storing and retrieving XML documents to and from fields in a database, relying on the JDBC 4.0java.sql.SQLXML
facility.- 从以下版本开始:
- 2.5.6
- 作者:
- Thomas Risberg, Juergen Hoeller
- 另请参阅:
SQLXML
,ResultSet.getSQLXML(int)
,PreparedStatement.setSQLXML(int, java.sql.SQLXML)
构造器概要
构造器 构造器 说明 Jdbc4SqlXmlHandler()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 InputStream
getXmlAsBinaryStream(ResultSet rs, int columnIndex)
Retrieve the given column as binary stream from the given ResultSet.InputStream
getXmlAsBinaryStream(ResultSet rs, String columnName)
Retrieve the given column as binary stream from the given ResultSet.Reader
getXmlAsCharacterStream(ResultSet rs, int columnIndex)
Retrieve the given column as character stream from the given ResultSet.Reader
getXmlAsCharacterStream(ResultSet rs, String columnName)
Retrieve the given column as character stream from the given ResultSet.Source
getXmlAsSource(ResultSet rs, int columnIndex, Class<? extends Source> sourceClass)
Retrieve the given column as Source implemented using the specified source class from the given ResultSet.Source
getXmlAsSource(ResultSet rs, String columnName, Class<? extends Source> sourceClass)
Retrieve the given column as Source implemented using the specified source class from the given ResultSet.String
getXmlAsString(ResultSet rs, int columnIndex)
Retrieve the given column as String from the given ResultSet.String
getXmlAsString(ResultSet rs, String columnName)
Retrieve the given column as String from the given ResultSet.SqlXmlValue
newSqlXmlValue(Class<? extends Result> resultClass, XmlResultProvider provider)
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValue
newSqlXmlValue(String value)
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValue
newSqlXmlValue(XmlBinaryStreamProvider provider)
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValue
newSqlXmlValue(XmlCharacterStreamProvider provider)
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.SqlXmlValue
newSqlXmlValue(Document document)
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.
构造器详细资料
Jdbc4SqlXmlHandler
public Jdbc4SqlXmlHandler()
方法详细资料
getXmlAsString
public String getXmlAsString(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as String from the given ResultSet.Might simply invoke
ResultSet.getString
or work withSQLXML
or 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
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getString(int)
,ResultSet.getSQLXML(int)
getXmlAsString
public String getXmlAsString(ResultSet rs, int columnIndex) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as String from the given ResultSet.Might simply invoke
ResultSet.getString
or work withSQLXML
or 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
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getString(int)
,ResultSet.getSQLXML(int)
getXmlAsBinaryStream
public InputStream getXmlAsBinaryStream(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as binary stream from the given ResultSet.Might simply invoke
ResultSet.getAsciiStream
or work withSQLXML
or 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
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int)
,SQLXML.getBinaryStream()
getXmlAsBinaryStream
public InputStream getXmlAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as binary stream from the given ResultSet.Might simply invoke
ResultSet.getAsciiStream
or work withSQLXML
or 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
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int)
,SQLXML.getBinaryStream()
getXmlAsCharacterStream
public Reader getXmlAsCharacterStream(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as character stream from the given ResultSet.Might simply invoke
ResultSet.getCharacterStream
or work withSQLXML
or 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
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int)
,SQLXML.getCharacterStream()
getXmlAsCharacterStream
public Reader getXmlAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as character stream from the given ResultSet.Might simply invoke
ResultSet.getCharacterStream
or work withSQLXML
or 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
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int)
,SQLXML.getCharacterStream()
getXmlAsSource
public Source getXmlAsSource(ResultSet rs, String columnName, Class<? extends Source> sourceClass) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as Source implemented using the specified source class from the given ResultSet.Might work with
SQLXML
or 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
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getSQLXML(int)
,SQLXML.getSource(java.lang.Class<T>)
getXmlAsSource
public Source getXmlAsSource(ResultSet rs, int columnIndex, Class<? extends Source> sourceClass) throws SQLException
从接口复制的说明:SqlXmlHandler
Retrieve the given column as Source implemented using the specified source class from the given ResultSet.Might work with
SQLXML
or 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
null
in 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)
从接口复制的说明:SqlXmlHandler
Create aSqlXmlValue
instance 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)
从接口复制的说明:SqlXmlHandler
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue
在接口中SqlXmlHandler
- 参数:
provider
- theXmlBinaryStreamProvider
providing XML data- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue
,SQLXML.setBinaryStream()
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(XmlCharacterStreamProvider provider)
从接口复制的说明:SqlXmlHandler
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue
在接口中SqlXmlHandler
- 参数:
provider
- theXmlCharacterStreamProvider
providing XML data- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue
,SQLXML.setCharacterStream()
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(Class<? extends Result> resultClass, XmlResultProvider provider)
从接口复制的说明:SqlXmlHandler
Create aSqlXmlValue
instance for the given XML data, as supported by the underlying JDBC driver.- 指定者:
newSqlXmlValue
在接口中SqlXmlHandler
- 参数:
resultClass
- the Result implementation class to be usedprovider
- theXmlResultProvider
that will provide the XML data- 返回:
- the implementation specific instance
- 另请参阅:
SqlXmlValue
,SQLXML.setResult(Class)
newSqlXmlValue
public SqlXmlValue newSqlXmlValue(Document document)
从接口复制的说明:SqlXmlHandler
Create aSqlXmlValue
instance 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