|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.io.datastore.Datastore
org.deegree.io.datastore.sql.AbstractSQLDatastore
org.deegree.io.datastore.sql.oracle.OracleDatastore
public class OracleDatastore
Datastore implementation for Oracle Spatial database systems. Supports Oracle Spatial for Oracle 10g.
TODO Which Oracle spatial versions are supported exactly?
| Field Summary |
|---|
| Fields inherited from class org.deegree.io.datastore.sql.AbstractSQLDatastore |
|---|
pool |
| Constructor Summary | |
|---|---|
OracleDatastore()
|
|
| Method Summary | |
|---|---|
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. |
String |
buildSRSTransformCall(String geomIdentifier,
int nativeSRSCode)
Builds an SQL fragment that converts the given geometry to the specified SRS. |
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. |
Geometry |
convertDBToDeegreeGeometry(Object value,
CoordinateSystem targetCS,
Connection conn)
Converts an Oracle specific geometry Object from the ResultSet to a deegree
Geometry. |
oracle.sql.STRUCT |
convertDeegreeToDBGeometry(Geometry geometry,
int nativeSRSCode,
Connection conn)
Converts a deegree Geometry to an Oracle specific geometry object. |
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. |
static String |
fromOracleSRIDCode(int srid)
|
int |
getNativeSRSCode(String srsName)
Returns the database specific code for the given SRS name. |
static int |
getOracleSRIDCode(String code)
|
Object |
getSequenceCurrValPlusOffset(Connection conn,
String sequence,
int offset)
Returns the current value (plus an offset) of the given SQL sequence. |
Object |
getSequenceNextVal(Connection conn,
String sequence)
Returns the next value of the given SQL sequence. |
WhereBuilder |
getWhereBuilder(MappedFeatureType[] rootFts,
String[] aliases,
Filter filter,
SortProperty[] sortProperties,
TableAliasGenerator aliasGenerator,
VirtualContentProvider vcProvider)
Returns a specific WhereBuilder implementation for Oracle Spatial. |
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.) |
protected FeatureCollection |
transformResult(FeatureCollection fc,
String targetSRS)
Transforms the FeatureCollection so that the geometries of all contained geometry properties use the
requested SRS. |
| Methods inherited from class org.deegree.io.datastore.sql.AbstractSQLDatastore |
|---|
acquireConnection, acquireTransaction, appendGeometryColumnGet, close, configure, createTransaction, determineFidsToLock, getAnnotationParser, getMaxValue, performQuery, performQuery, performQuery, releaseConnection, releaseTransaction |
| Methods inherited from class org.deegree.io.datastore.Datastore |
|---|
bindSchema, getConfiguration, getFeatureType, getSchemas |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OracleDatastore()
| Method Detail |
|---|
public static int getOracleSRIDCode(String code)
code - an EPSG code
public static String fromOracleSRIDCode(int srid)
srid -
public WhereBuilder getWhereBuilder(MappedFeatureType[] rootFts,
String[] aliases,
Filter filter,
SortProperty[] sortProperties,
TableAliasGenerator aliasGenerator,
VirtualContentProvider vcProvider)
throws DatastoreException
WhereBuilder implementation for Oracle Spatial.
getWhereBuilder in class AbstractSQLDatastorerootFts - involved (requested) feature typesaliases - aliases for the feature types, may be nullfilter - filter that restricts the matched featuressortProperties - sort criteria for the result, may be null or emptyaliasGenerator - used to generate unique table aliasesvcProvider -
WhereBuilder implementation for Oracle Spatial
DatastoreException
public Geometry convertDBToDeegreeGeometry(Object value,
CoordinateSystem targetCS,
Connection conn)
throws SQLException
Object from the ResultSet to a deegree
Geometry.
convertDBToDeegreeGeometry in class AbstractSQLDatastorevalue - targetCS - conn -
SQLException
public oracle.sql.STRUCT convertDeegreeToDBGeometry(Geometry geometry,
int nativeSRSCode,
Connection conn)
throws DatastoreException
Geometry to an Oracle specific geometry object.
convertDeegreeToDBGeometry in class AbstractSQLDatastoregeometry - nativeSRSCode - conn -
DatastoreException
public Object convertFromDBType(Object rsObject,
int sqlTypeCode)
throws DatastoreException
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)
convertFromDBType in class AbstractSQLDatastorersObject - sqlTypeCode -
DatastoreException
public Object getSequenceNextVal(Connection conn,
String sequence)
throws DatastoreException
getSequenceNextVal in class AbstractSQLDatastoreconn - JDBC connection to be used.sequence - name of the SQL sequence
DatastoreException - if the value could not be retrieved
public Object getSequenceCurrValPlusOffset(Connection conn,
String sequence,
int offset)
throws DatastoreException
getSequenceCurrValPlusOffset in class AbstractSQLDatastoreconn - JDBC connection to be used.sequence - name of the SQL sequenceoffset - offset added to the sequence value
DatastoreException - if the value could not be retrieved
public PreparedStatement prepareStatement(Connection conn,
StatementBuffer statementBuffer)
throws SQLException
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)
prepareStatement in class AbstractSQLDatastoreconn - connection to be used to create the PreparedStatementstatementBuffer -
PreparedStatment, ready to be performed
SQLException - if a JDBC related error occursprotected Query transformQuery(Query query)
Query so that the CoordinateSystem of all spatial arguments (BBOX, etc.)
in the Filter match the SRS of the targeted MappingGeometryFields.
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.
transformQuery in class Datastorequery - query to be transformed
protected FeatureCollection transformResult(FeatureCollection fc,
String targetSRS)
FeatureCollection so that the geometries of all contained geometry properties use the
requested SRS.
transformResult in class Datastorefc - feature collection to be transformedtargetSRS - requested SRS
protected boolean canTransformTo(String targetSRS)
canTransformTo in class DatastoretargetSRS - target spatial reference system (usually "EPSG:XYZ")
public SQLFunctionCall buildSRSTransformCall(MappedGeometryPropertyType geoProperty,
String targetSRS)
throws DatastoreException
SQLFunctionCall that refers to the given MappingGeometryField in the specified target
SRS using a database specific SQL function.
buildSRSTransformCall in class AbstractSQLDatastoregeoProperty - geometry propertytargetSRS - target spatial reference system (usually "EPSG:XYZ")
SQLFunctionCall that refers to the geometry in the specified srs
DatastoreException
public String buildSRSTransformCall(String geomIdentifier,
int nativeSRSCode)
throws DatastoreException
AbstractSQLDatastore
buildSRSTransformCall in class AbstractSQLDatastoreDatastoreExceptionpublic int getNativeSRSCode(String srsName)
AbstractSQLDatastore
getNativeSRSCode in class AbstractSQLDatastoresrsName - spatial reference system name (usually "EPSG:XYZ")
|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org