Module eclipselink
Class JGeometryConverter
- java.lang.Object
-
- org.eclipse.persistence.platform.database.oracle.converters.JGeometryConverter
-
- All Implemented Interfaces:
StructConverter
public class JGeometryConverter extends Object implements StructConverter
PUBLIC: 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
-
-
Constructor Summary
Constructors Constructor Description JGeometryConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
convertToObject(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 methodStruct
convertToStruct(Object geometry, 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 methodClass<?>
getJavaType()
PUBLIC:String
getStructName()
PUBLIC:
-
-
-
Method Detail
-
getStructName
public String getStructName()
Description copied from interface:StructConverter
PUBLIC:- Specified by:
getStructName
in interfaceStructConverter
- Returns:
- The value return by getSQLTypeName() called when called on the appropriate Struct
-
getJavaType
public Class<?> getJavaType()
Description copied from interface:StructConverter
PUBLIC:- Specified by:
getJavaType
in interfaceStructConverter
- Returns:
- The Java Class to perform conversions on
-
convertToObject
public Object convertToObject(Struct struct) throws SQLException
Description copied from interface:StructConverter
PUBLIC: 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 interfaceStructConverter
- Parameters:
struct
- the Struct that will be read- Returns:
- The Object converted back from the Struct
- Throws:
SQLException
-
convertToStruct
public Struct convertToStruct(Object geometry, Connection connection) throws SQLException
Description copied from interface:StructConverter
PUBLIC: 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 interfaceStructConverter
- Parameters:
geometry
- The Object to convertconnection
- The JDBC connection- Returns:
- The Object as a Struct
- Throws:
SQLException
-
-