|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SqlXmlHandler
Abstraction for handling XML fields in specific databases.
Its main purpose is to isolate database specific handling of XML stored in the
database. JDBC 4.0 introduces the new data type java.sql.SQLXML but
most databases and their drivers currently rely on database specific data types
and features.
Provides accessor methods for XML fields, and acts as factory for
SqlXmlValue instances.
ResultSet.getSQLXML(int),
SQLXML| Method Summary | |
|---|---|
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 sourceClass)
Retrieve the given column as Source implemented using the specified source class from the given ResultSet. |
Source |
getXmlAsSource(ResultSet rs,
String columnName,
Class 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 resultClass,
XmlResultProvider provider)
Get an instance of an SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler. |
SqlXmlValue |
newSqlXmlValue(Document doc)
Get an instance of an SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler. |
SqlXmlValue |
newSqlXmlValue(String value)
Get an instance of an SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler. |
SqlXmlValue |
newSqlXmlValue(XmlBinaryStreamProvider provider)
Get an instance of an SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler. |
SqlXmlValue |
newSqlXmlValue(XmlCharacterStreamProvider provider)
Get an instance of an SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler. |
| Method Detail |
|---|
String getXmlAsString(ResultSet rs,
String columnName)
throws SQLException
ResultSet.getString or work with
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnName - the column name to use
null in case of SQL NULL
SQLException - if thrown by JDBC methodsResultSet.getString(int),
ResultSet.getSQLXML(int)
String getXmlAsString(ResultSet rs,
int columnIndex)
throws SQLException
ResultSet.getString or work with
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
null in case of SQL NULL
SQLException - if thrown by JDBC methodsResultSet.getString(int),
ResultSet.getSQLXML(int)
InputStream getXmlAsBinaryStream(ResultSet rs,
String columnName)
throws SQLException
ResultSet.getAsciiStream or work with
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnName - the column name to use
null in case of SQL NULL
SQLException - if thrown by JDBC methodsResultSet.getSQLXML(int),
SQLXML.getBinaryStream()
InputStream getXmlAsBinaryStream(ResultSet rs,
int columnIndex)
throws SQLException
ResultSet.getAsciiStream or work with
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
null in case of SQL NULL
SQLException - if thrown by JDBC methodsResultSet.getSQLXML(int),
SQLXML.getBinaryStream()
Reader getXmlAsCharacterStream(ResultSet rs,
String columnName)
throws SQLException
ResultSet.getCharacterStream or work with
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnName - the column name to use
SQLException - if thrown by JDBC methodsResultSet.getSQLXML(int),
SQLXML.getCharacterStream()
Reader getXmlAsCharacterStream(ResultSet rs,
int columnIndex)
throws SQLException
ResultSet.getCharacterStream or work with
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
SQLException - if thrown by JDBC methodsResultSet.getSQLXML(int),
SQLXML.getCharacterStream()
Source getXmlAsSource(ResultSet rs,
String columnName,
Class sourceClass)
throws SQLException
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnName - the column name to usesourceClass - the implementation class to be used
SQLException - if thrown by JDBC methodsResultSet.getSQLXML(int),
SQLXML.getSource(java.lang.Class)
Source getXmlAsSource(ResultSet rs,
int columnIndex,
Class sourceClass)
throws SQLException
SQLXML or database specific classes depending on the
database and driver.
rs - the ResultSet to retrieve the content fromcolumnIndex - the column index to usesourceClass - the implementation class to be used
SQLException - if thrown by JDBC methodsResultSet.getSQLXML(int),
SQLXML.getSource(java.lang.Class) SqlXmlValue newSqlXmlValue(String value)
SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler.
value - the XML String value providing XML data
SqlXmlValue,
SQLXML.setString(String)SqlXmlValue newSqlXmlValue(XmlBinaryStreamProvider provider)
SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler.
provider - the XmlBinaryStreamProvider providing XML data
SqlXmlValue,
SQLXML.setBinaryStream()SqlXmlValue newSqlXmlValue(XmlCharacterStreamProvider provider)
SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler.
provider - the XmlCharacterStreamProvider providing XML data
SqlXmlValue,
SQLXML.setCharacterStream()
SqlXmlValue newSqlXmlValue(Class resultClass,
XmlResultProvider provider)
SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler.
resultClass - the Result implementation class to be usedprovider - the XmlResultProvider that will provide the XML data
SqlXmlValue,
SQLXML.setResult(Class)SqlXmlValue newSqlXmlValue(Document doc)
SqlXmlValue implementation to be used together with
the database specific implementation of this SqlXmlHandler.
doc - the XML Document to be used
SqlXmlValue
|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||