Spring Data JDBC Extensions

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

java.lang.Object
  extended by org.springframework.data.jdbc.support.oracle.OracleXmlTypeMarshallingValue
All Implemented Interfaces:
SqlValue, SqlXmlValue

public class OracleXmlTypeMarshallingValue
extends Object
implements SqlXmlValue

Implementation of the SqlXmlValue interface, for convenient creation of type values that are provided As an XML Document.

A usage example from a StoredProcedure:

proc.declareParameter(new SqlParameter("myXml", OracleTypes.OPAQUE, "SYS.XMLTYPE"));
 ...

 Map in = new HashMap();
 in.put("myXml", new OracleXmlTypeMarshallingValue(object, marshaller);
 Map out = proc.execute(in);
 

Since:
1.0
Author:
Thomas Risberg
See Also:
SqlXmlValue, SqlValue

Constructor Summary
OracleXmlTypeMarshallingValue(Object value, Marshaller marshaller)
          Constructor that takes a parameter with the Object value and another with the Marshaller to be used.
 
Method Summary
 void cleanup()
          Close the XMLType
 void setValue(PreparedStatement ps, int paramIndex)
          The implementation for this specific type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleXmlTypeMarshallingValue

public OracleXmlTypeMarshallingValue(Object value,
                                     Marshaller marshaller)
Constructor that takes a parameter with the Object value and another with the Marshaller to be used.

Parameters:
value - the Object containing the object to be marshalled.
Method Detail

setValue

public void setValue(PreparedStatement ps,
                     int paramIndex)
              throws SQLException
The implementation for this specific type. This method is called internally by the Spring Framework during the out parameter processing and it's not accessed by appplication code directly.

Specified by:
setValue in interface SqlValue
Throws:
SQLException
See Also:
SqlXmlValue

cleanup

public void cleanup()
Close the XMLType

Specified by:
cleanup in interface SqlValue

Spring Data JDBC Extensions