Spring Data JDBC Extensions

org.springframework.data.jdbc.support.oracle
Interface StructMapper<T>

All Known Implementing Classes:
BeanPropertyStructMapper

public interface StructMapper<T>

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
 T fromStruct(oracle.sql.STRUCT struct)
          Map attributes from the passed in STRUCT to the desired object type.
 oracle.sql.STRUCT toStruct(T source, Connection conn, String typeName)
          Create a struct of the defined type and populate it with values from the passed in source object.
 

Method Detail

toStruct

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

Parameters:
source - instance containing 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

T 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