|
Spring Data JDBC Extensions Support | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.jdbc.jms.support.oracle.StructDatumMapper
public class StructDatumMapper
Implementation of the DatumMapper interface. Provides mapping from an ADT STRUCT to a bean based on attribute to property name mapping.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses |
protected String |
typeName
The class we are mapping to |
| Constructor Summary | |
|---|---|
StructDatumMapper(String typeName,
Class<?> targetClass)
Constructor that takes the type name and a parameter with the class that the data should be mapped from/into. |
|
StructDatumMapper(String typeName,
StructMapper mapper)
Constructor that takes the type name and a StructMapper implemenatation that will handle the mapping to and from STRUCT values. |
|
| Method Summary | |
|---|---|
Object |
fromDatum(oracle.sql.Datum datum)
Extract the Datum content and return it in a domain class instance. |
oracle.sql.Datum |
toDatum(Object object,
Connection conn)
Create a Datum object based on the passed in object using the connection if necessary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
protected String typeName
| Constructor Detail |
|---|
public StructDatumMapper(String typeName,
StructMapper mapper)
typeName - name of the database typemapper - StructMapper implementation to do the mapping
public StructDatumMapper(String typeName,
Class<?> targetClass)
BeanPropertyStructMapper
being used for the mapping.
typeName - name of the database typetargetClass - JavaBean class that STRUCT attributes will be mapped to| Method Detail |
|---|
public oracle.sql.Datum toDatum(Object object,
Connection conn)
throws SQLException
DatumMapperDatum object based on the passed in object using the connection if necessary.
toDatum in interface DatumMapperobject - the object containing tha data to be usedconn - the database Connection that can be used to create database specific instances
SQLException
public Object fromDatum(oracle.sql.Datum datum)
throws SQLException
DatumMapperDatum content and return it in a domain class instance.
fromDatum in interface DatumMapperdatum - the Datum containing the data
Datum
SQLException
|
Spring Data JDBC Extensions Support | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||