Interface WKAdapter

  • All Known Implementing Classes:
    WKB, WKBasis, WKT

    public interface WKAdapter
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] fromJGeometry​(JGeometry geom)
      This transforms a JGeometry to a WKB/WKT geometry.
      byte[] fromSTRUCT​(oracle.sql.STRUCT geom)
      Creates a WKB/WKT geometry from a STRUCT object.
      JGeometry toJGeometry​(byte[] wkContent)
      This transforms a WKB/WKT geometry to a JGeometry.
      oracle.sql.STRUCT toSTRUCT​(byte[] wkContent, java.sql.Connection conn)
      Convert the given WKB/WKT geometry into an Oracle JDBC STRUCT object.
    • Method Detail

      • toSTRUCT

        oracle.sql.STRUCT toSTRUCT​(byte[] wkContent,
                                   java.sql.Connection conn)
                            throws java.sql.SQLException,
                                   GeometryExceptionWithContext
        Convert the given WKB/WKT geometry into an Oracle JDBC STRUCT object. You can then bind the STRUCT object to a SQL DML statment.
        Parameters:
        wkContent - the WKB/WKT geometry (byte array) to be converted
        conn - the connection to be used
        Returns:
        an Oracle STRUCT object when successful; otherwise null
        Throws:
        java.sql.SQLException
        GeometryExceptionWithContext
      • fromSTRUCT

        byte[] fromSTRUCT​(oracle.sql.STRUCT geom)
                   throws java.sql.SQLException,
                          GeometryExceptionWithContext
        Creates a WKB/WKT geometry from a STRUCT object.
        Parameters:
        geom - the STRUCT object from an oracle result set
        Returns:
        a WKB/WKT geometry (byte array) if successful; otherwise null
        Throws:
        java.sql.SQLException
        GeometryExceptionWithContext