org.datanucleus.store.rdbms.adapter
Class OracleSpatialAdapter

java.lang.Object
  extended by org.datanucleus.store.rdbms.adapter.DatabaseAdapter
      extended by org.datanucleus.store.rdbms.adapter.OracleAdapter
          extended by org.datanucleus.store.rdbms.adapter.OracleSpatialAdapter
All Implemented Interfaces:
org.datanucleus.store.mapped.DatastoreAdapter, org.datanucleus.store.mapped.expression.ExpressionConversionAdapter, org.datanucleus.store.mapped.expression.ExpressionLogicSetAdapter, org.datanucleus.store.mapped.expression.ExpressionMethodAdapter, org.datanucleus.store.mapped.expression.ExpressionOperatorAdapter, org.datanucleus.store.mapped.expression.ExpressionPatternAdapter, org.datanucleus.store.rdbms.adapter.RDBMSAdapter, SpatialRDBMSAdapter

public class OracleSpatialAdapter
extends org.datanucleus.store.rdbms.adapter.OracleAdapter
implements SpatialRDBMSAdapter

Provides methods for adapting SQL language elements for Oracle spatial elements.


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.adapter.OracleAdapter
ORACLE_10_RESERVED_WORDS, ORACLE_8_RESERVED_WORDS, ORACLE_9_RESERVED_WORDS
 
Fields inherited from class org.datanucleus.store.rdbms.adapter.DatabaseAdapter
catalogSeparator, datastoreMajorVersion, datastoreMinorVersion, datastoreProductName, datastoreProductVersion, datastoreRevisionVersion, driverMajorVersion, driverMinorVersion, driverName, driverVersion, identifierQuoteString, LOCALISER, LOCALISER_BASE, maxColumnNameLength, maxConstraintNameLength, maxIndexNameLength, maxTableNameLength, properties, reservedKeywords, supportedOptions
 
Fields inherited from interface org.datanucleus.store.rdbms.adapter.SpatialRDBMSAdapter
DIMENSION_EXTENSION_KEY, SRID_EXTENSION_KEY
 
Fields inherited from interface org.datanucleus.store.rdbms.adapter.RDBMSAdapter
ACCESS_PARENTQUERY_IN_SUBQUERY, ALTER_TABLE_DROP_CONSTRAINT_SYNTAX, ALTER_TABLE_DROP_FOREIGN_KEY_CONSTRAINT, ANSI_JOIN_SYNTAX, AUTO_INCREMENT_COLUMN_TYPE_SPECIFICATION, AUTO_INCREMENT_KEYS_NULL_SPECIFICATION, BLOB_SET_USING_SETSTRING, CHAR_COLUMNS_PADDED_WITH_SPACES, CHECK_IN_CREATE_STATEMENTS, CHECK_IN_END_CREATE_STATEMENTS, CLOB_SET_USING_SETSTRING, CREATE_INDEXES_BEFORE_FOREIGN_KEYS, DATETIME_STORES_MILLISECS, DEFAULT_BEFORE_NULL_IN_COLUMN_OPTIONS, DEFAULT_KEYWORD_IN_COLUMN_OPTIONS, DEFAULT_KEYWORD_WITH_NOT_NULL_IN_COLUMN_OPTIONS, DEFERRED_CONSTRAINTS, DISTINCT_WITH_SELECT_FOR_UPDATE, EXISTS_SYNTAX, FK_DELETE_ACTION_CASCADE, FK_DELETE_ACTION_DEFAULT, FK_DELETE_ACTION_NULL, FK_DELETE_ACTION_RESTRICT, FK_UPDATE_ACTION_CASCADE, FK_UPDATE_ACTION_DEFAULT, FK_UPDATE_ACTION_NULL, FK_UPDATE_ACTION_RESTRICT, GET_GENERATED_KEYS_STATEMENT, INCLUDE_ORDERBY_COLS_IN_SELECT, LOCK_OPTION_PLACED_AFTER_FROM, LOCK_OPTION_PLACED_WITHIN_JOIN, LOCK_WITH_SELECT_FOR_UPDATE, NULL_EQUALS_EMPTY_STRING, NULLS_IN_CANDIDATE_KEYS, NULLS_KEYWORD_IN_COLUMN_OPTIONS, ORDERBY_USING_SELECT_COLUMN_INDEX, PERSIST_OF_UNASSIGNED_CHAR, PRIMARYKEY_IN_CREATE_STATEMENTS, STATEMENT_BATCHING, TX_ISOLATION_NONE, TX_ISOLATION_READ_COMMITTED, TX_ISOLATION_READ_UNCOMMITTED, TX_ISOLATION_REPEATABLE_READ, TX_ISOLATION_SERIALIZABLE, UNION_SYNTAX, UNIQUE_IN_END_CREATE_STATEMENTS, USE_UNION_ALL, VIEWS
 
Fields inherited from interface org.datanucleus.store.mapped.DatastoreAdapter
ANALYSIS_METHODS, BIT_IS_REALLY_BOOLEAN, BOOLEAN_COMPARISON, CATALOGS_IN_TABLE_DEFINITIONS, ESCAPE_EXPRESSION_IN_LIKE_PREDICATE, IDENTIFIERS_LOWERCASE, IDENTIFIERS_LOWERCASE_QUOTED, IDENTIFIERS_MIXEDCASE, IDENTIFIERS_MIXEDCASE_QUOTED, IDENTIFIERS_MIXEDCASE_QUOTED_SENSITIVE, IDENTIFIERS_MIXEDCASE_SENSITIVE, IDENTIFIERS_UPPERCASE, IDENTIFIERS_UPPERCASE_QUOTED, IDENTITY_COLUMNS, PROJECTION_IN_TABLE_REFERENCE_JOINS, SCHEMAS_IN_TABLE_DEFINITIONS, SEQUENCES
 
Constructor Summary
OracleSpatialAdapter(java.sql.DatabaseMetaData metadata)
           
 
Method Summary
 java.lang.String getCalculateBoundsStatement(org.datanucleus.store.rdbms.table.Table table, org.datanucleus.store.rdbms.table.Column column)
          Returns the appropriate SQL statement that calculates the bounds of all geometries in the given column.
 java.lang.String getRetrieveCrsNameStatement(org.datanucleus.store.rdbms.table.Table table, int srid)
          Returns the appropriate SQL statement to retrieve the name of the Coordinate Reference System (CRS) with the given srid.
 java.lang.String getRetrieveCrsWktStatement(org.datanucleus.store.rdbms.table.Table table, int srid)
          Returns the appropriate SQL statement to retrieve description of the Coordinate Reference System (CRS) with the given srid.
 boolean isGeometryColumn(org.datanucleus.store.rdbms.table.Column c)
          Checks whether the given column is geometry backed by the datastore.
 
Methods inherited from class org.datanucleus.store.rdbms.adapter.OracleAdapter
getCatalogName, getColumns, getDatastoreDateStatement, getDropTableStatement, getExistingIndexes, getMappingManager, getNonAnsiInnerJoinWhereClause, getNonAnsiLeftOuterJoinWhereClause, getNonAnsiRightOuterJoinWhereClause, getNumericExpressionForMethod, getSchemaName, getSequenceCreateStmt, getSequenceNextStmt, getSurrogateForEmptyStrings, getTransactionIsolationForSchemaCreation, getVendorID, indexOfMethod, initialiseTypes, modOperator, newQueryStatement, newRDBMSColumnInfo, newSQLTypeInfo, substringMethod, substringMethod
 
Methods inherited from class org.datanucleus.store.rdbms.adapter.DatabaseAdapter
addSQLTypeForJDBCType, cartersianProduct, concatOperator, endsWithMethod, getAdapterTime, getAddCandidateKeyStatement, getAddColumnStatement, getAddForeignKeyStatement, getAddPrimaryKeyStatement, getAutoIncrementKeyword, getAutoIncrementStmt, getCatalogSeparator, getCheckConstraintForValues, getConnection, getContinuationString, getCreateIndexStatement, getCreateTableStatement, getCurrentDateMethod, getCurrentTimeMethod, getCurrentTimestampMethod, getDatastoreIdentifierMaxLength, getDatastoreMajorVersion, getDatastoreMinorVersion, getDriverMajorVersion, getDriverMinorVersion, getDropViewStatement, getEscapeCharacter, getEscapedPatternExpression, getEscapePatternExpression, getIdentifierQuoteString, getInsertStatementForNoColumns, getMapping, getMaxForeignKeys, getMaxIndexes, getMiliseconds, getNewUUIDFunction, getNumericConversionFunction, getOperatorConcat, getPatternExpressionAnyCharacter, getPatternExpressionZeroMoreCharacters, getRangeByLimitSelectClause, getRangeByLimitWhereClause, getRangeByRowNumberColumn, getRequiredTransactionIsolationLevel, getSelectForUpdateText, getSelectNewUUIDStmt, getSelectWithLockOption, getSupportedOptions, getTime, getUnlimitedLengthPrecisionValue, getValueForProperty, initialiseDatastore, isIdentityFieldDataType, isKeyword, isReservedKeyword, isValidPrimaryKeyType, iteratorReservedWords, logConfiguration, lowerMethod, matchesMethod, newFKInfo, newTableExpression, parseKeywordList, removeUnsupportedMappings, setProperties, startsWithMethod, supportsOption, supportsQueryFetchSize, supportsTransactionIsolation, toNumericExpression, toString, toStringExpression, toStringExpression, translateMethod, trimMethod, upperMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.datanucleus.store.rdbms.adapter.RDBMSAdapter
getAddCandidateKeyStatement, getAddColumnStatement, getAddForeignKeyStatement, getAddPrimaryKeyStatement, getAutoIncrementKeyword, getAutoIncrementStmt, getCatalogName, getCheckConstraintForValues, getColumns, getConnection, getCreateIndexStatement, getCreateTableStatement, getDatastoreDateStatement, getDropTableStatement, getDropViewStatement, getExistingIndexes, getInsertStatementForNoColumns, getNonAnsiInnerJoinWhereClause, getNonAnsiLeftOuterJoinWhereClause, getRangeByLimitSelectClause, getRangeByLimitWhereClause, getRangeByRowNumberColumn, getRequiredTransactionIsolationLevel, getSchemaName, getSelectNewUUIDStmt, getSelectWithLockOption, getSequenceCreateStmt, getSequenceNextStmt, getSurrogateForEmptyStrings, getTransactionIsolationForSchemaCreation, getUnlimitedLengthPrecisionValue, isValidPrimaryKeyType, iteratorReservedWords, logConfiguration, newFKInfo, newRDBMSColumnInfo, newSQLTypeInfo, newTableExpression, supportsTransactionIsolation
 
Methods inherited from interface org.datanucleus.store.mapped.DatastoreAdapter
getAdapterTime, getCatalogSeparator, getDatastoreIdentifierMaxLength, getDatastoreMajorVersion, getDatastoreMinorVersion, getIdentifierQuoteString, getMappingManager, getMaxForeignKeys, getMaxIndexes, getNumericExpressionForMethod, getSupportedOptions, getVendorID, initialiseDatastore, initialiseTypes, isIdentityFieldDataType, isReservedKeyword, modOperator, newQueryStatement, removeUnsupportedMappings, setProperties, supportsOption, supportsQueryFetchSize, toString
 
Methods inherited from interface org.datanucleus.store.mapped.expression.ExpressionConversionAdapter
toNumericExpression, toStringExpression, toStringExpression
 
Methods inherited from interface org.datanucleus.store.mapped.expression.ExpressionOperatorAdapter
concatOperator, getOperatorConcat
 
Methods inherited from interface org.datanucleus.store.mapped.expression.ExpressionMethodAdapter
endsWithMethod, getCurrentDateMethod, getCurrentTimeMethod, getCurrentTimestampMethod, indexOfMethod, lowerMethod, matchesMethod, startsWithMethod, substringMethod, substringMethod, translateMethod, trimMethod, upperMethod
 
Methods inherited from interface org.datanucleus.store.mapped.expression.ExpressionPatternAdapter
getEscapeCharacter, getEscapedPatternExpression, getEscapePatternExpression, getPatternExpressionAnyCharacter, getPatternExpressionZeroMoreCharacters
 
Methods inherited from interface org.datanucleus.store.mapped.expression.ExpressionLogicSetAdapter
cartersianProduct
 

Constructor Detail

OracleSpatialAdapter

public OracleSpatialAdapter(java.sql.DatabaseMetaData metadata)
Method Detail

isGeometryColumn

public boolean isGeometryColumn(org.datanucleus.store.rdbms.table.Column c)
Description copied from interface: SpatialRDBMSAdapter
Checks whether the given column is geometry backed by the datastore.

Specified by:
isGeometryColumn in interface SpatialRDBMSAdapter
Parameters:
c - Column to check
Returns:
true if the given column is geometry backed, false otherwise

getRetrieveCrsNameStatement

public java.lang.String getRetrieveCrsNameStatement(org.datanucleus.store.rdbms.table.Table table,
                                                    int srid)
Description copied from interface: SpatialRDBMSAdapter
Returns the appropriate SQL statement to retrieve the name of the Coordinate Reference System (CRS) with the given srid.

Specified by:
getRetrieveCrsNameStatement in interface SpatialRDBMSAdapter
Parameters:
table - A table
srid - The srid
Returns:
SQL statement, null if not available for the datastore

getRetrieveCrsWktStatement

public java.lang.String getRetrieveCrsWktStatement(org.datanucleus.store.rdbms.table.Table table,
                                                   int srid)
Description copied from interface: SpatialRDBMSAdapter
Returns the appropriate SQL statement to retrieve description of the Coordinate Reference System (CRS) with the given srid.

Specified by:
getRetrieveCrsWktStatement in interface SpatialRDBMSAdapter
Parameters:
table - A table
srid - The srid
Returns:
SQL statement, null if not available for the datastore

getCalculateBoundsStatement

public java.lang.String getCalculateBoundsStatement(org.datanucleus.store.rdbms.table.Table table,
                                                    org.datanucleus.store.rdbms.table.Column column)
Description copied from interface: SpatialRDBMSAdapter
Returns the appropriate SQL statement that calculates the bounds of all geometries in the given column.

Specified by:
getCalculateBoundsStatement in interface SpatialRDBMSAdapter
Parameters:
table - The table
column - The column
Returns:
SQL statement, null if not available for the datastore


Copyright © 2009. All Rights Reserved.