Spring Data JDBC Extensions

org.springframework.data.jdbc.support.oracle
Class AbstractXmlTypeHandler

java.lang.Object
  extended by org.springframework.data.jdbc.support.oracle.AbstractXmlTypeHandler
All Implemented Interfaces:
XmlTypeHandler
Direct Known Subclasses:
DocumentXmlTypeHandler, StreamXmlTypeHandler, StringXmlTypeHandler

public abstract class AbstractXmlTypeHandler
extends Object
implements XmlTypeHandler

Abstract class handling the creation of an XMLType from a String, Stream or Document representation. Delegates to subclasses for extraction of the XML content from the XMLType.

Since:
1.0
Author:
Thomas Risberg

Constructor Summary
AbstractXmlTypeHandler()
           
 
Method Summary
 oracle.xdb.XMLType createXmlType(Object object, Connection conn)
          Create an XMLType for the supplied object using the provided connection
protected abstract  Object extractXmlContent(oracle.xdb.XMLType data)
           
 Object getXmlContent(oracle.xdb.XMLType data)
          Extract the data from an XMLType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractXmlTypeHandler

public AbstractXmlTypeHandler()
Method Detail

createXmlType

public oracle.xdb.XMLType createXmlType(Object object,
                                        Connection conn)
                                 throws DataRetrievalFailureException
Description copied from interface: XmlTypeHandler
Create an XMLType for the supplied object using the provided connection

Specified by:
createXmlType in interface XmlTypeHandler
Parameters:
object - The object contining the data to be represented in the XMLType
conn - the Connection to use
Returns:
the XMLType populated with data from the object passed in
Throws:
DataRetrievalFailureException

getXmlContent

public Object getXmlContent(oracle.xdb.XMLType data)
                     throws DataRetrievalFailureException
Description copied from interface: XmlTypeHandler
Extract the data from an XMLType

Specified by:
getXmlContent in interface XmlTypeHandler
Parameters:
data - the XMLType containing the XML data
Returns:
the object containing the data extracted from the XML
Throws:
DataRetrievalFailureException

extractXmlContent

protected abstract Object extractXmlContent(oracle.xdb.XMLType data)
                                     throws SQLException
Throws:
SQLException

Spring Data JDBC Extensions