|
|||||||||
| 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<T>
public class StructDatumMapper<T>
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<T> 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<T> mapper)
Constructor that takes the type name and a StructMapper implemenatation that will handle the mapping to and from STRUCT values. |
|
| Method Summary | |
|---|---|
T |
fromDatum(oracle.sql.Datum datum)
Extract the Datum content and return it in a domain class instance. |
oracle.sql.Datum |
toDatum(T source,
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<T> mapper)
typeName - name of the database typemapper - StructMapper implementation to do the mapping
public StructDatumMapper(String typeName,
Class<T> 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(T source,
Connection conn)
throws SQLException
DatumMapperDatum object based on the passed in object using the connection if necessary.
toDatum in interface DatumMapper<T>source - the object containing tha data to be usedconn - the database Connection that can be used to create database specific instances
SQLException
public T fromDatum(oracle.sql.Datum datum)
throws SQLException
DatumMapperDatum content and return it in a domain class instance.
fromDatum in interface DatumMapper<T>datum - the Datum containing the data
Datum
SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||