Package org.orbisgis.data.jdbc
Class JdbcSpatialTable
- java.lang.Object
-
- org.orbisgis.data.jdbc.resultset.DefaultResultSet
-
- org.orbisgis.data.jdbc.JdbcTable<StreamSpatialResultSet>
-
- org.orbisgis.data.jdbc.JdbcSpatialTable
-
- All Implemented Interfaces:
groovy.lang.GroovyObject,AutoCloseable,Iterable<StreamSpatialResultSet>,ResultSet,Wrapper,org.orbisgis.data.api.dataset.IDataSet<StreamSpatialResultSet>,org.orbisgis.data.api.dataset.IJdbcSpatialTable<StreamSpatialResultSet>,org.orbisgis.data.api.dataset.IJdbcTable<StreamSpatialResultSet>,org.orbisgis.data.api.dataset.IMatrix<StreamSpatialResultSet>,org.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>,org.orbisgis.data.api.dataset.ITable<StreamSpatialResultSet,StreamSpatialResultSet>,org.orbisgis.data.api.dsl.IBuilderResult,org.orbisgis.data.api.dsl.IFilterBuilder,org.orbisgis.data.api.dsl.IQueryBuilder
public abstract class JdbcSpatialTable extends JdbcTable<StreamSpatialResultSet> implements org.orbisgis.data.api.dataset.IJdbcSpatialTable<StreamSpatialResultSet>
Contains the methods which are in common to all the IJdbcTable subclasses.- Author:
- Erwan Bocher (CNRS), Sylvain PALOMINOS (UBS 2019)
-
-
Field Summary
-
Fields inherited from interface org.orbisgis.data.api.dataset.IJdbcTable
META_PROPERTY, QUERY_LOCATION
-
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
-
-
Constructor Summary
Constructors Constructor Description JdbcSpatialTable(org.h2gis.utilities.dbtypes.DBTypes dataBaseType, org.orbisgis.data.api.datasource.IJdbcDataSource jdbcDataSource, org.h2gis.utilities.TableLocation tableLocation, Statement statement, String baseQuery, List<Object> params)Main constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.geom.GeometrygetEstimatedExtent()org.locationtech.jts.geom.GeometrygetExtent()org.locationtech.jts.geom.GeometrygetExtent(String... geometryColumns)org.locationtech.jts.geom.GeometrygetExtent(String[] geometryColumns, String filter)List<String>getGeometricColumns()org.locationtech.jts.geom.GeometrygetGeometry()org.locationtech.jts.geom.GeometrygetGeometry(int columnIndex)org.locationtech.jts.geom.GeometrygetGeometry(String columnLabel)Map<String,String>getGeometryTypes()org.h2gis.utilities.SpatialResultSetMetaDatagetMetaData()org.orbisgis.data.api.dataset.IRastergetRaster()org.orbisgis.data.api.dataset.IRastergetRaster(int columnIndex)org.orbisgis.data.api.dataset.IRastergetRaster(String columnLabel)List<String>getRasterColumns()List<String>getSpatialColumns()booleanisSpatial()Iterator<StreamSpatialResultSet>iterator()voidsetSrid(int srid)Stream<StreamSpatialResultSet>stream()-
Methods inherited from class org.orbisgis.data.jdbc.JdbcTable
asType, columns, eachRow, filter, filter, filter, firstRow, forEach, get, get, getBaseQuery, getColumnCount, getColumnNames, getColumnNamesTypes, getColumnType, getDbType, getFirstRow, getJdbcDataSource, getMetaClass, getParams, getQuery, getResultSet, getResultSetLimit, getResultSetProperties, getRowCount, getSpatialTable, getStatement, getSummary, getTable, getTableLocation, getUniqueValues, isEmpty, isLinked, isTemporary, reload, save, save, save, save, save, save, save, setMetaClass, setResultSetProperties
-
Methods inherited from class org.orbisgis.data.jdbc.resultset.DefaultResultSet
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, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, unwrap, 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, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orbisgis.data.api.dsl.IBuilderResult
asType, getSpatialTable, getTable, toString
-
Methods inherited from interface org.orbisgis.data.api.dataset.IDataSet
asType, isEmpty, reload, toString
-
Methods inherited from interface org.orbisgis.data.api.dataset.IJdbcTable
eachRow, getDbType, getLocation, getName, getParams, getResultSetProperties, getSummary, getTableLocation, isLinked, isTemporary, setResultSetProperties
-
Methods inherited from interface org.orbisgis.data.api.dataset.ITable
first, firstRow, get, get, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getColumnCount, getColumnNames, getColumnNamesTypes, getColumnType, getDate, getDate, getDouble, getDouble, getFirstRow, getFloat, getFloat, getInt, getInt, getLong, getLong, getNDim, getObject, getObject, getObject, getObject, getRow, getRowCount, getShort, getShort, getSize, getString, getString, getTime, getTime, getTimestamp, getTimestamp, getUniqueValues, isFirst, isLast, last, next, previous, save, save, save, save, save, save, save, save, save
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
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, 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
-
-
-
-
Constructor Detail
-
JdbcSpatialTable
public JdbcSpatialTable(org.h2gis.utilities.dbtypes.DBTypes dataBaseType, org.orbisgis.data.api.datasource.IJdbcDataSource jdbcDataSource, org.h2gis.utilities.TableLocation tableLocation, Statement statement, String baseQuery, List<Object> params)Main constructor.- Parameters:
dataBaseType- Type of the DataBase where this table comes from.tableLocation- TableLocation that identify the represented table.baseQuery- Query for the creation of the ResultSetparams- Parameters fo the query.statement- Statement used to request the database.jdbcDataSource- DataSource to use for the creation of the resultSet.
-
-
Method Detail
-
isSpatial
public boolean isSpatial()
- Specified by:
isSpatialin interfaceorg.orbisgis.data.api.dataset.ITable<StreamSpatialResultSet,StreamSpatialResultSet>- Overrides:
isSpatialin classJdbcTable<StreamSpatialResultSet>
-
getGeometry
public org.locationtech.jts.geom.Geometry getGeometry(int columnIndex) throws Exception- Specified by:
getGeometryin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getGeometry
public org.locationtech.jts.geom.Geometry getGeometry(String columnLabel) throws Exception
- Specified by:
getGeometryin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getGeometry
public org.locationtech.jts.geom.Geometry getGeometry() throws Exception- Specified by:
getGeometryin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getRaster
public org.orbisgis.data.api.dataset.IRaster getRaster(int columnIndex) throws Exception- Specified by:
getRasterin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getRaster
public org.orbisgis.data.api.dataset.IRaster getRaster(String columnLabel) throws Exception
- Specified by:
getRasterin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getRaster
public org.orbisgis.data.api.dataset.IRaster getRaster() throws Exception- Specified by:
getRasterin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getSpatialColumns
public List<String> getSpatialColumns() throws Exception
- Specified by:
getSpatialColumnsin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getRasterColumns
public List<String> getRasterColumns() throws Exception
- Specified by:
getRasterColumnsin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getGeometricColumns
public List<String> getGeometricColumns() throws Exception
- Specified by:
getGeometricColumnsin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getExtent
public org.locationtech.jts.geom.Geometry getExtent(String[] geometryColumns, String filter) throws Exception
- Specified by:
getExtentin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getExtent
public org.locationtech.jts.geom.Geometry getExtent(String... geometryColumns) throws Exception
- Specified by:
getExtentin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getExtent
public org.locationtech.jts.geom.Geometry getExtent() throws Exception- Specified by:
getExtentin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getEstimatedExtent
public org.locationtech.jts.geom.Geometry getEstimatedExtent() throws Exception- Specified by:
getEstimatedExtentin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
setSrid
public void setSrid(int srid) throws Exception- Specified by:
setSridin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getGeometryTypes
public Map<String,String> getGeometryTypes() throws Exception
- Specified by:
getGeometryTypesin interfaceorg.orbisgis.data.api.dataset.ISpatialTable<StreamSpatialResultSet>- Throws:
Exception
-
getMetaData
public org.h2gis.utilities.SpatialResultSetMetaData getMetaData() throws SQLException- Specified by:
getMetaDatain interfaceorg.orbisgis.data.api.dataset.IDataSet<StreamSpatialResultSet>- Specified by:
getMetaDatain interfaceorg.orbisgis.data.api.dataset.IJdbcTable<StreamSpatialResultSet>- Specified by:
getMetaDatain interfaceResultSet- Overrides:
getMetaDatain classJdbcTable<StreamSpatialResultSet>- Throws:
SQLException
-
iterator
public Iterator<StreamSpatialResultSet> iterator()
- Specified by:
iteratorin interfaceIterable<StreamSpatialResultSet>
-
stream
public Stream<StreamSpatialResultSet> stream() throws Exception
- Specified by:
streamin interfaceorg.orbisgis.data.api.dataset.ITable<StreamSpatialResultSet,StreamSpatialResultSet>- Throws:
Exception
-
-