com.mizar.persistence.jpa.customizers
Class JGeometryConverter

java.lang.Object
  extended by com.mizar.persistence.jpa.customizers.JGeometryConverter
All Implemented Interfaces:
org.eclipse.persistence.platform.database.converters.StructConverter

public class JGeometryConverter
extends java.lang.Object
implements org.eclipse.persistence.platform.database.converters.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


Field Summary
static java.lang.Class JGEOMETRY_CLASS
           
static java.lang.String JGEOMETRY_DB_TYPE
           
 
Constructor Summary
JGeometryConverter()
           
 
Method Summary
 java.lang.Object convertToObject(weblogic.jdbc.wrapper.Struct struct)
           
 java.lang.Object convertToObject(java.sql.Struct struct)
           
 java.lang.Object convertToObject(oracle.sql.STRUCT struct)
           
 java.sql.Struct convertToStruct(java.lang.Object geometry, java.sql.Connection connection)
           
 java.lang.Class getJavaType()
           
static oracle.sql.STRUCT getSTRUCT(java.lang.Object mightBeWeblogicWrapped)
           
 java.lang.String getStructName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

JGeometryConverter

public JGeometryConverter()
Method Detail

getStructName

public java.lang.String getStructName()
Specified by:
getStructName in interface org.eclipse.persistence.platform.database.converters.StructConverter

getJavaType

public java.lang.Class getJavaType()
Specified by:
getJavaType in interface org.eclipse.persistence.platform.database.converters.StructConverter

getSTRUCT

public static oracle.sql.STRUCT getSTRUCT(java.lang.Object mightBeWeblogicWrapped)

convertToObject

public java.lang.Object convertToObject(weblogic.jdbc.wrapper.Struct struct)
                                 throws java.sql.SQLException
Throws:
java.sql.SQLException

convertToObject

public java.lang.Object convertToObject(java.sql.Struct struct)
                                 throws java.sql.SQLException
Specified by:
convertToObject in interface org.eclipse.persistence.platform.database.converters.StructConverter
Throws:
java.sql.SQLException

convertToObject

public java.lang.Object convertToObject(oracle.sql.STRUCT struct)
                                 throws java.sql.SQLException
Throws:
java.sql.SQLException

convertToStruct

public java.sql.Struct convertToStruct(java.lang.Object geometry,
                                       java.sql.Connection connection)
                                throws java.sql.SQLException
Specified by:
convertToStruct in interface org.eclipse.persistence.platform.database.converters.StructConverter
Throws:
java.sql.SQLException