Spring Data JDBC Extensions Support

org.springframework.data.jdbc.support.oracle
Interface StructMapper

All Known Implementing Classes:
BeanPropertyStructMapper

public interface StructMapper

Interface defining signatures needed for pluggable implementations of STRUCT mappers. Implementations must handle the mapping from STRUCT attributes to and from the target class.

Since:
1.0
Author:
Thomas Risberg

Method Summary
 Object fromStruct(oracle.sql.STRUCT struct)
          Map attributes from the passed in STRUCT to the desired object type.
 oracle.sql.STRUCT toStruct(Object object, Connection conn, String typeName)
          Create a struct of the defined type and populate it with values from the passed in object.
 

Method Detail

toStruct

oracle.sql.STRUCT toStruct(Object object,
                           Connection conn,
                           String typeName)
                           throws SQLException
Create a struct of the defined type and populate it with values from the passed in object.

Parameters:
object - instance containng the values to map
conn - database connection to be used to create the STRUCT
typeName - name of the STRUCT type
Returns:
the new STRUCT
Throws:
SQLException

fromStruct

Object fromStruct(oracle.sql.STRUCT struct)
                  throws SQLException
Map attributes from the passed in STRUCT to the desired object type.

Parameters:
struct - the STRUCT containing attribute values to be used
Returns:
new instance of the target class populated with attribute values
Throws:
SQLException

Spring Data JDBC Extensions Support

Copyright © 2011. All Rights Reserved.