|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StructConverter
PUBLIC: A StuctConverter can be added to a DatabasePlatform It allows custom processing dealing java.sql.Struct types When added to the DatabasePlatform: 1. convertToObject(Struct) will be invoked when a Struct named by the value returned by getStructName() is returned from the database. This conversion happens immediately after the object is returned from the database 2. convertToStruct(Object, Connection) will be invoked when an Object of the class returned by getJavaType() is written to the database. This conversion happens immediately before the object is written to the database Note: Many Structs can also be mapped with mappings StructureMapping and ObjectRelationalDataTypeDescriptor This class provides support for advanced types of Structures that require some processing immediately before writing to the database or immediately after reading from the database.
StructureMapping
,
ObjectRelationalDataTypeDescriptor
Method Summary | |
---|---|
java.lang.Object |
convertToObject(java.sql.Struct struct)
PUBLIC: This method will be invoked internally when reading a Struct from the database Implementers should put any custom conversion logic in this method |
java.sql.Struct |
convertToStruct(java.lang.Object struct,
java.sql.Connection connection)
PUBLIC: This method will be invoked internally when writing an Object to the database Implementers should put any custom conversion logic in this method |
java.lang.Class |
getJavaType()
PUBLIC: |
java.lang.String |
getStructName()
PUBLIC: |
Method Detail |
---|
java.lang.String getStructName()
java.lang.Class getJavaType()
java.lang.Object convertToObject(java.sql.Struct struct) throws java.sql.SQLException
struct
- the Struct that will be read
java.sql.SQLException
java.sql.Struct convertToStruct(java.lang.Object struct, java.sql.Connection connection) throws java.sql.SQLException
struct
- The Object to convertconnection
- The JDBC connection
java.sql.SQLException
|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |