Class Jdbc4SqlXmlHandler

java.lang.Object
org.springframework.jdbc.support.xml.Jdbc4SqlXmlHandler
All Implemented Interfaces:
SqlXmlHandler

@Deprecated(since="6.2") public class Jdbc4SqlXmlHandler extends Object implements SqlXmlHandler
Deprecated.
as of 6.2, in favor of direct ResultSet.getSQLXML(int) and Connection.createSQLXML() usage, possibly in combination with a custom SqlValue implementation
Default implementation of the SqlXmlHandler interface. Provides database-specific implementations for storing and retrieving XML documents to and from fields in a database, relying on the JDBC 4.0 java.sql.SQLXML facility.
Since:
2.5.6
Author:
Thomas Risberg, Juergen Hoeller
See Also:
  • Constructor Details

    • Jdbc4SqlXmlHandler

      public Jdbc4SqlXmlHandler()
      Deprecated.
  • Method Details

    • getXmlAsString

      @Nullable public String getXmlAsString(ResultSet rs, String columnName) throws SQLException
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Retrieve the given column as String from the given ResultSet.

      Might simply invoke ResultSet.getString or work with SQLXML or database-specific classes depending on the database and driver.

      Specified by:
      getXmlAsString in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnName - the column name to use
      Returns:
      the content as String, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • getXmlAsString

      @Nullable public String getXmlAsString(ResultSet rs, int columnIndex) throws SQLException
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Retrieve the given column as String from the given ResultSet.

      Might simply invoke ResultSet.getString or work with SQLXML or database-specific classes depending on the database and driver.

      Specified by:
      getXmlAsString in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnIndex - the column index to use
      Returns:
      the content as String, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • getXmlAsBinaryStream

      @Nullable public InputStream getXmlAsBinaryStream(ResultSet rs, String columnName) throws SQLException
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Retrieve the given column as binary stream from the given ResultSet.

      Might simply invoke ResultSet.getAsciiStream or work with SQLXML or database-specific classes depending on the database and driver.

      Specified by:
      getXmlAsBinaryStream in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnName - the column name to use
      Returns:
      the content as a binary stream, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • getXmlAsBinaryStream

      @Nullable public InputStream getXmlAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Retrieve the given column as binary stream from the given ResultSet.

      Might simply invoke ResultSet.getAsciiStream or work with SQLXML or database-specific classes depending on the database and driver.

      Specified by:
      getXmlAsBinaryStream in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnIndex - the column index to use
      Returns:
      the content as binary stream, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • getXmlAsCharacterStream

      @Nullable public Reader getXmlAsCharacterStream(ResultSet rs, String columnName) throws SQLException
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Retrieve the given column as character stream from the given ResultSet.

      Might simply invoke ResultSet.getCharacterStream or work with SQLXML or database-specific classes depending on the database and driver.

      Specified by:
      getXmlAsCharacterStream in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnName - the column name to use
      Returns:
      the content as character stream, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • getXmlAsCharacterStream

      @Nullable public Reader getXmlAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Retrieve the given column as character stream from the given ResultSet.

      Might simply invoke ResultSet.getCharacterStream or work with SQLXML or database-specific classes depending on the database and driver.

      Specified by:
      getXmlAsCharacterStream in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnIndex - the column index to use
      Returns:
      the content as character stream, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • getXmlAsSource

      @Nullable public Source getXmlAsSource(ResultSet rs, String columnName, @Nullable Class<? extends Source> sourceClass) throws SQLException
      Deprecated.
      Description copied from interface: 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.

      Specified by:
      getXmlAsSource in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnName - the column name to use
      sourceClass - the implementation class to be used
      Returns:
      the content as character stream, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • getXmlAsSource

      @Nullable public Source getXmlAsSource(ResultSet rs, int columnIndex, @Nullable Class<? extends Source> sourceClass) throws SQLException
      Deprecated.
      Description copied from interface: 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.

      Specified by:
      getXmlAsSource in interface SqlXmlHandler
      Parameters:
      rs - the ResultSet to retrieve the content from
      columnIndex - the column index to use
      sourceClass - the implementation class to be used
      Returns:
      the content as character stream, or null in case of SQL NULL
      Throws:
      SQLException - if thrown by JDBC methods
      See Also:
    • newSqlXmlValue

      public SqlXmlValue newSqlXmlValue(String value)
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Create a SqlXmlValue instance for the given XML data, as supported by the underlying JDBC driver.
      Specified by:
      newSqlXmlValue in interface SqlXmlHandler
      Parameters:
      value - the XML String value providing XML data
      Returns:
      the implementation specific instance
      See Also:
    • newSqlXmlValue

      public SqlXmlValue newSqlXmlValue(XmlBinaryStreamProvider provider)
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Create a SqlXmlValue instance for the given XML data, as supported by the underlying JDBC driver.
      Specified by:
      newSqlXmlValue in interface SqlXmlHandler
      Parameters:
      provider - the XmlBinaryStreamProvider providing XML data
      Returns:
      the implementation specific instance
      See Also:
    • newSqlXmlValue

      public SqlXmlValue newSqlXmlValue(XmlCharacterStreamProvider provider)
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Create a SqlXmlValue instance for the given XML data, as supported by the underlying JDBC driver.
      Specified by:
      newSqlXmlValue in interface SqlXmlHandler
      Parameters:
      provider - the XmlCharacterStreamProvider providing XML data
      Returns:
      the implementation specific instance
      See Also:
    • newSqlXmlValue

      public SqlXmlValue newSqlXmlValue(Class<? extends Result> resultClass, XmlResultProvider provider)
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Create a SqlXmlValue instance for the given XML data, as supported by the underlying JDBC driver.
      Specified by:
      newSqlXmlValue in interface SqlXmlHandler
      Parameters:
      resultClass - the Result implementation class to be used
      provider - the XmlResultProvider that will provide the XML data
      Returns:
      the implementation specific instance
      See Also:
    • newSqlXmlValue

      public SqlXmlValue newSqlXmlValue(Document document)
      Deprecated.
      Description copied from interface: SqlXmlHandler
      Create a SqlXmlValue instance for the given XML data, as supported by the underlying JDBC driver.
      Specified by:
      newSqlXmlValue in interface SqlXmlHandler
      Parameters:
      document - the XML Document to be used
      Returns:
      the implementation specific instance
      See Also: