Package org.h2gis.utilities
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
-
-
Field Summary
-
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.locationtech.jts.geom.GeometrygetGeometry()Retrieves Geometry value of the first geometry column.org.locationtech.jts.geom.GeometrygetGeometry(int columnIndex)Retrieves Geometry value of the specified column.org.locationtech.jts.geom.GeometrygetGeometry(String columnLabel)Retrieves Geometry value of the specified column.voidupdateGeometry(int columnIndex, org.locationtech.jts.geom.Geometry geometry)Update the geometry valuevoidupdateGeometry(String columnLabel, org.locationtech.jts.geom.Geometry geometry)Update the geometry value-
Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Method Detail
-
getGeometry
org.locationtech.jts.geom.Geometry getGeometry(int columnIndex) throws SQLExceptionRetrieves 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 SQLExceptionRetrieves 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 SQLExceptionUpdate the geometry value- Parameters:
columnIndex- Field indexgeometry- Geometry instance- Throws:
SQLException
-
updateGeometry
void updateGeometry(String columnLabel, org.locationtech.jts.geom.Geometry geometry) throws SQLException
Update the geometry value- Parameters:
columnLabel- Field namegeometry- Geometry instance- Throws:
SQLException
-
-