| java.lang.Object org.deegree.io.datastore.Datastore org.deegree.io.datastore.sql.AbstractSQLDatastore org.deegree.io.datastore.sql.oracle.OracleDatastore
OracleDatastore | public class OracleDatastore extends AbstractSQLDatastore (Code) | | Datastore implementation for Oracle Spatial database systems. Supports Oracle Spatial for Oracle 10g.
author: Markus Schneider author: Torsten Friebe author: last edited by: $Author: apoth $ version: $Revision: 9342 $, $Date: 2007-12-27 04:32:57 -0800 (Thu, 27 Dec 2007) $ |
Method Summary | |
public SQLFunctionCall | buildSRSTransformCall(MappedGeometryPropertyType geoProperty, String targetSRS) Returns an
SQLFunctionCall that refers to the given
MappingGeometryField in the specified target
SRS using a database specific SQL function. | public String | buildSRSTransformCall(String geomIdentifier, int nativeSRSCode) | protected boolean | canTransformTo(String targetSRS) Returns whether the datastore is capable of performing a native coordinate transformation (using an SQL function
call for example) into the given SRS. | public Geometry | convertDBToDeegreeGeometry(Object value, CoordinateSystem targetCS, Connection conn) Converts an Oracle specific geometry Object from the ResultSet to a deegree
Geometry . | public STRUCT | convertDeegreeToDBGeometry(Geometry geometry, int nativeSRSCode, Connection conn) Converts a deegree Geometry to an Oracle specific geometry object. | public Object | convertFromDBType(Object rsObject, int sqlTypeCode) Converts the given object from a java.sql.ResultSet column to the common type to be used as a
feature property. | public static String | fromOracleSRIDCode(int srid) | public int | getNativeSRSCode(String srsName) | public static int | getOracleSRIDCode(String code) | public Object | getSequenceNextVal(Connection conn, String sequence) Returns the next value of the given SQL sequence. | public WhereBuilder | getWhereBuilder(MappedFeatureType[] rootFts, String[] aliases, Filter filter, SortProperty[] sortProperties, TableAliasGenerator aliasGenerator, VirtualContentProvider vcProvider) Returns a specific
WhereBuilder implementation for Oracle Spatial. | public PreparedStatement | prepareStatement(Connection conn, StatementBuffer statementBuffer) Converts the
StatementBuffer into a
PreparedStatement , which is initialized and ready to be
performed. | protected Query | transformQuery(Query query) Transforms the incoming
Query so that the
CoordinateSystem of all spatial arguments (BBOX, etc.)
in the
Filter match the SRS of the targeted
MappingGeometryField s.
NOTE: If this transformation can be performed by the backend (e.g. | protected FeatureCollection | transformResult(FeatureCollection fc, String targetSRS) Transforms the
FeatureCollection so that the geometries of all contained geometry properties use the
requested SRS. |
canTransformTo | protected boolean canTransformTo(String targetSRS)(Code) | | Returns whether the datastore is capable of performing a native coordinate transformation (using an SQL function
call for example) into the given SRS.
Parameters: targetSRS - target spatial reference system (usually "EPSG:XYZ") true, if the datastore can perform the coordinate transformation, false otherwise |
convertDBToDeegreeGeometry | public Geometry convertDBToDeegreeGeometry(Object value, CoordinateSystem targetCS, Connection conn) throws SQLException(Code) | | Converts an Oracle specific geometry Object from the ResultSet to a deegree
Geometry .
Parameters: value - Parameters: targetCS - Parameters: conn - corresponding deegree geometry throws: SQLException - |
convertDeegreeToDBGeometry | public STRUCT convertDeegreeToDBGeometry(Geometry geometry, int nativeSRSCode, Connection conn) throws DatastoreException(Code) | | Converts a deegree Geometry to an Oracle specific geometry object.
Parameters: geometry - Parameters: nativeSRSCode - Parameters: conn - corresponding Oracle specific geometry object throws: DatastoreException - |
convertFromDBType | public Object convertFromDBType(Object rsObject, int sqlTypeCode) throws DatastoreException(Code) | | Converts the given object from a java.sql.ResultSet column to the common type to be used as a
feature property.
NOTE: String- and boolean-valued results have a special conversion handling:
Strings: because we encountered difficulties when inserting empty strings "" into String-type
columns with NOT NULL constraints (for example in VARCHAR2 fields), "$EMPTY_STRING$" is used to mark them.
Boolean:because Oracle has no special boolean type, it is assumed that a CHAR(1) column is used
instead (with values 'Y'=true and 'N'=false)
Parameters: rsObject - Parameters: sqlTypeCode - an object that is suitable for a table column of the specified SQL type throws: DatastoreException - |
fromOracleSRIDCode | public static String fromOracleSRIDCode(int srid)(Code) | | Parameters: srid - an EPSG code or "-1", if none was found |
getNativeSRSCode | public int getNativeSRSCode(String srsName)(Code) | | |
getOracleSRIDCode | public static int getOracleSRIDCode(String code)(Code) | | Parameters: code - an EPSG code the oracle code as stored in srs_codes_oracle.properties |
getSequenceNextVal | public Object getSequenceNextVal(Connection conn, String sequence) throws DatastoreException(Code) | | Returns the next value of the given SQL sequence.
Parameters: conn - JDBC connection to be used. Parameters: sequence - name of the SQL sequence next value of the given SQL sequence throws: DatastoreException - if the value could not be retrieved |
getWhereBuilder | public WhereBuilder getWhereBuilder(MappedFeatureType[] rootFts, String[] aliases, Filter filter, SortProperty[] sortProperties, TableAliasGenerator aliasGenerator, VirtualContentProvider vcProvider) throws DatastoreException(Code) | | Returns a specific
WhereBuilder implementation for Oracle Spatial.
Parameters: rootFts - involved (requested) feature types Parameters: aliases - aliases for the feature types, may be null Parameters: filter - filter that restricts the matched features Parameters: sortProperties - sort criteria for the result, may be null or empty Parameters: aliasGenerator - used to generate unique table aliases Parameters: vcProvider - WhereBuilder implementation for Oracle Spatial throws: DatastoreException - |
prepareStatement | public PreparedStatement prepareStatement(Connection conn, StatementBuffer statementBuffer) throws SQLException(Code) | | Converts the
StatementBuffer into a
PreparedStatement , which is initialized and ready to be
performed.
TODO remove this method (use super class method instead), change handling of JGeometry NOTE: String- and
boolean-valued results have a special conversion handling:
Strings: because we encountered difficulties when inserting empty strings "" into String-type
columns with NOT NULL constraints (for example in VARCHAR2 fields), "$EMPTY_STRING$" is used to mark them.
Boolean:because Oracle has no special boolean type, it is assumed that a CHAR(1) column is used
instead (with values 'Y'=true and 'N'=false)
Parameters: conn - connection to be used to create the PreparedStatement Parameters: statementBuffer - the PreparedStatment , ready to be performed throws: SQLException - if a JDBC related error occurs |
transformQuery | protected Query transformQuery(Query query)(Code) | | Transforms the incoming
Query so that the
CoordinateSystem of all spatial arguments (BBOX, etc.)
in the
Filter match the SRS of the targeted
MappingGeometryField s.
NOTE: If this transformation can be performed by the backend (e.g. by Oracle Spatial), this method should be
overwritten to return the original input
Query .
Parameters: query - query to be transformed query with spatial arguments transformed to target SRS |
transformResult | protected FeatureCollection transformResult(FeatureCollection fc, String targetSRS)(Code) | | Transforms the
FeatureCollection so that the geometries of all contained geometry properties use the
requested SRS.
Parameters: fc - feature collection to be transformed Parameters: targetSRS - requested SRS transformed FeatureCollection |
Methods inherited from org.deegree.io.datastore.sql.AbstractSQLDatastore | protected Connection acquireConnection() throws DatastoreException(Code)(Java Doc) public synchronized DatastoreTransaction acquireTransaction() throws DatastoreException(Code)(Java Doc) public SQLFunctionCall buildSRSTransformCall(MappedGeometryPropertyType geoProperty, String targetSRS) throws DatastoreException(Code)(Java Doc) public String buildSRSTransformCall(String geomIdentifier, int nativeSRSCode) throws DatastoreException(Code)(Java Doc) public void close() throws DatastoreException(Code)(Java Doc) public void configure(DatastoreConfiguration datastoreConfiguration) throws DatastoreException(Code)(Java Doc) abstract public Geometry convertDBToDeegreeGeometry(Object value, CoordinateSystem targetSRS, Connection conn) throws SQLException(Code)(Java Doc) abstract public Object convertDeegreeToDBGeometry(Geometry geometry, int nativeSRSCode, Connection conn) throws DatastoreException(Code)(Java Doc) public Object convertFromDBType(Object rsObject, int sqlTypeCode) throws DatastoreException(Code)(Java Doc) protected SQLTransaction createTransaction() throws DatastoreException(Code)(Java Doc) public Set<FeatureId> determineFidsToLock(List<Lock> requestParts) throws DatastoreException(Code)(Java Doc) public AnnotationDocument getAnnotationParser()(Code)(Java Doc) public int getMaxValue(Connection conn, String tableName, String columnName) throws IdGenerationException(Code)(Java Doc) public int getNativeSRSCode(String srsName) throws DatastoreException(Code)(Java Doc) public Object getSequenceNextVal(Connection conn, String sequence) throws DatastoreException(Code)(Java Doc) public WhereBuilder getWhereBuilder(MappedFeatureType[] rootFts, String[] aliases, Filter filter, SortProperty[] sortProperties, TableAliasGenerator aliasGenerator, VirtualContentProvider vcProvider) throws DatastoreException(Code)(Java Doc) public FeatureCollection performQuery(Query query, MappedFeatureType[] rootFts) throws DatastoreException, UnknownCRSException(Code)(Java Doc) public FeatureCollection performQuery(Query query, MappedFeatureType[] rootFts, DatastoreTransaction context) throws DatastoreException, UnknownCRSException(Code)(Java Doc) protected FeatureCollection performQuery(Query query, MappedFeatureType[] rootFts, Connection conn) throws DatastoreException, UnknownCRSException(Code)(Java Doc) public PreparedStatement prepareStatement(Connection conn, StatementBuffer statementBuffer) throws SQLException, DatastoreException(Code)(Java Doc) public void releaseConnection(Connection conn) throws DatastoreException(Code)(Java Doc) public synchronized void releaseTransaction(DatastoreTransaction ta) throws DatastoreException(Code)(Java Doc)
|
|
|