Skip navigation links
oracle.toplink.platform.database.oracle.converters
Class JGeometryConverter
java.lang.Object
oracle.toplink.platform.database.oracle.converters.JGeometryConverter
- All Implemented Interfaces:
- StructConverter
-
public class JGeometryConverter
- extends java.lang.Object
- implements StructConverter
A StructConverter that can be used to convert the oracle.spatial.geometry.JGeometry as it is read and written from the database. To use this StructConverter, it must be added to the DatabasePlatform either with the addStructConverter(StructConverter) method or specified in sessions.xml. It requires that the oracle.spatial.geometry.JGeometry type is available on the Classpath
Method Summary |
java.lang.Object |
convertToObject(java.sql.Struct struct)
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 geometry, java.sql.Connection connection)
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()
|
java.lang.String |
getStructName()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JGEOMETRY_DB_TYPE
public static final java.lang.String JGEOMETRY_DB_TYPE
-
- See Also:
- Constant Field Values
JGEOMETRY_CLASS
public static final java.lang.Class JGEOMETRY_CLASS
JGeometryConverter
public JGeometryConverter()
getStructName
public java.lang.String getStructName()
- Description copied from interface: oracle.toplink.platform.database.converters.StructConverter
-
- Specified by:
getStructName
in interface StructConverter
-
- Returns:
- The value return by getSQLTypeName() called when called on the appropriate Struct
getJavaType
public java.lang.Class getJavaType()
- Description copied from interface: oracle.toplink.platform.database.converters.StructConverter
-
- Specified by:
getJavaType
in interface StructConverter
-
- Returns:
- The Java Class to perform conversions on
convertToObject
public java.lang.Object convertToObject(java.sql.Struct struct)
throws java.sql.SQLException
- Description copied from interface: oracle.toplink.platform.database.converters.StructConverter
- This method will be invoked internally when reading a Struct from the database Implementers should put any custom conversion logic in this method
-
- Specified by:
convertToObject
in interface StructConverter
-
- Parameters:
struct
- the Struct that will be read
- Returns:
- Throws:
java.sql.SQLException
convertToStruct
public java.sql.Struct convertToStruct(java.lang.Object geometry,
java.sql.Connection connection)
throws java.sql.SQLException
- Description copied from interface: oracle.toplink.platform.database.converters.StructConverter
- This method will be invoked internally when writing an Object to the database Implementers should put any custom conversion logic in this method
-
- Specified by:
convertToStruct
in interface StructConverter
-
- Parameters:
geometry
- The Object to convert
connection
- The JDBC connection
- Returns:
- Throws:
java.sql.SQLException
Skip navigation links