Interface SpatialResultSet

  • All Superinterfaces:
    AutoCloseable, ResultSet, Wrapper
    All Known Implementing Classes:
    SpatialResultSetImpl

    public interface SpatialResultSet
    extends ResultSet
    In order to provide a common API with H2 Spatial and PostGIS, this result set manage the conversion of column to JTS geometry. Usage: SpatialResultSet rs = myStatement.executeQuery().unwrap(SpatialResultSet.class);
    Author:
    Nicolas Fortin
    • Method Detail

      • getGeometry

        org.locationtech.jts.geom.Geometry getGeometry​(int columnIndex)
                                                throws SQLException
        Retrieves Geometry value of the specified column.
        Parameters:
        columnIndex - Column index [1-n]
        Returns:
        Geometry value or null
        Throws:
        SQLException - If the specified column is not a Geometry.
      • getGeometry

        org.locationtech.jts.geom.Geometry getGeometry​(String columnLabel)
                                                throws SQLException
        Retrieves Geometry value of the specified column.
        Parameters:
        columnLabel - Column label
        Returns:
        Geometry value or null
        Throws:
        SQLException - If the specified column is not a Geometry.
      • getGeometry

        org.locationtech.jts.geom.Geometry getGeometry()
                                                throws SQLException
        Retrieves Geometry value of the first geometry column.
        Returns:
        Geometry value or null
        Throws:
        SQLException - If there is no Geometry columns.
      • updateGeometry

        void updateGeometry​(int columnIndex,
                            org.locationtech.jts.geom.Geometry geometry)
                     throws SQLException
        Update the geometry value
        Parameters:
        columnIndex - Field index
        geometry - Geometry instance
        Throws:
        SQLException
      • updateGeometry

        void updateGeometry​(String columnLabel,
                            org.locationtech.jts.geom.Geometry geometry)
                     throws SQLException
        Update the geometry value
        Parameters:
        columnLabel - Field name
        geometry - Geometry instance
        Throws:
        SQLException