Module eclipselink

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

      • JGeometryConverter

        public JGeometryConverter()
    • Method Detail

      • getStructName

        public String getStructName()
        Description copied from interface: StructConverter
        PUBLIC:
        Specified by:
        getStructName in interface StructConverter
        Returns:
        The value return by getSQLTypeName() called when called on the appropriate Struct
      • 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 interface StructConverter
        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 interface StructConverter
        Parameters:
        geometry - The Object to convert
        connection - The JDBC connection
        Returns:
        The Object as a Struct
        Throws:
        SQLException