org.hibernate.spatial.dialect.oracle
Class OracleSpatial10gDialect

java.lang.Object
  extended by org.hibernate.dialect.Dialect
      extended by org.hibernate.dialect.Oracle8iDialect
          extended by org.hibernate.dialect.Oracle9iDialect
              extended by org.hibernate.dialect.Oracle10gDialect
                  extended by org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect
All Implemented Interfaces:
java.io.Serializable, org.hibernate.exception.spi.ConversionContext, SpatialDialect

public class OracleSpatial10gDialect
extends org.hibernate.dialect.Oracle10gDialect
implements SpatialDialect, java.io.Serializable

Spatial Dialect for Oracle10g databases.

See Also:
Serialized Form

Field Summary
static java.lang.String SHORT_NAME
           
 
Fields inherited from class org.hibernate.dialect.Oracle8iDialect
DEPRECATED_ORACLE_TYPES_CLASS_NAME, INIT_ORACLETYPES_CURSOR_VALUE, ORACLE_TYPES_CLASS_NAME
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE
 
Constructor Summary
OracleSpatial10gDialect()
           
OracleSpatial10gDialect(HibernateSpatialConfiguration config)
           
 
Method Summary
 ConnectionFinder getConnectionFinder()
          Reports the ConnectionFinder used by this Dialect (or rather its associated TypeDescriptor).
 java.lang.String getDWithinSQL(java.lang.String columnName)
          Returns the SQL fragment when parsing a DWithinExpression.
 java.lang.String getHavingSridSQL(java.lang.String columnName)
          Returns the SQL fragment when parsing an HavingSridExpression.
 java.lang.String getIsEmptySQL(java.lang.String columnName, boolean isEmpty)
          Returns the SQL fragment when parsing a IsEmptyExpression or IsNotEmpty expression.
 java.lang.String getNativeSpatialAggregateSQL(java.lang.String arg1, int aggregation)
           
 java.lang.String getNativeSpatialRelateSQL(java.lang.String arg1, java.lang.String arg2, int spatialRelation)
           
 java.lang.String getOGCSpatialRelateSQL(java.lang.String arg1, java.lang.String arg2, int spatialRelation)
           
 java.lang.String getSpatialAggregateSQL(java.lang.String columnName, int spatialAggregateFunction)
           
 java.lang.String getSpatialAnalysisSQL(java.util.List args, int spatialAnalysisFunction, boolean useFilter)
           
 java.lang.String getSpatialFilterExpression(java.lang.String columnName)
          Returns the SQL fragment for the SQL WHERE-expression when parsing org.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.
 java.lang.String getSpatialRelateSQL(java.lang.String columnName, int spatialRelation)
          Returns the SQL fragment for the SQL WHERE-clause when parsing org.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.
 java.lang.String getTypeName(int code, long length, int precision, int scale)
          Get the name of the database type associated with the given Types typecode with the given storage specification parameters.
 boolean isOGCStrict()
          Reports whether this dialect is in OGC_STRICT mode or not.
 org.hibernate.type.descriptor.sql.SqlTypeDescriptor remapSqlTypeDescriptor(org.hibernate.type.descriptor.sql.SqlTypeDescriptor sqlTypeDescriptor)
          Allows the dialect to override a SqlTypeDescriptor.
 boolean supports(SpatialFunction function)
          Does this dialect supports the specified SpatialFunction.
 boolean supportsFiltering()
          Returns true if this SpatialDialect supports a specific filtering function.
 
Methods inherited from class org.hibernate.dialect.Oracle10gDialect
createOuterJoinFragment
 
Methods inherited from class org.hibernate.dialect.Oracle9iDialect
createCaseFragment, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getForUpdateString, getLimitString, getReadLockString, getSelectClauseNullString, getWriteLockString, supportsRowValueConstructorSyntaxInInList, supportsTupleDistinctCounts
 
Methods inherited from class org.hibernate.dialect.Oracle8iDialect
bindLimitParametersInReverseOrder, buildSQLExceptionConversionDelegate, dropConstraints, dropTemporaryTableAfterUse, forceLobAsLastValue, forUpdateOfColumns, generateTemporaryTableName, getAddColumnString, getBasicSelectClauseNullString, getCascadeConstraintsString, getCreateSequenceString, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCrossJoinSeparator, getDropSequenceString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getInExpressionCountLimit, getNotExpression, getOracleCursorTypeSqlType, getQuerySequencesString, getResultSet, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, getViolatedConstraintNameExtracter, isCurrentTimestampSelectStringCallable, registerResultSetOutParameter, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExistsInSelect, supportsLimit, supportsPooledSequences, supportsSequences, supportsTemporaryTables, supportsUnionAll, useFollowOnLocking, useMaxForLimit
 
Methods inherited from class org.hibernate.dialect.Dialect
appendIdentitySelectToInsert, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, buildLimitHandler, buildSQLExceptionConverter, cast, cast, cast, closeQuote, convertToFirstRowValue, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, forceLimitUsage, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateMultisetTableString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getDropTableString, getDropTemporaryTableString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getTableComment, getTableTypeString, getTypeName, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isLockTimeoutParameterized, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimitOffset, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SHORT_NAME

public static final java.lang.String SHORT_NAME
See Also:
Constant Field Values
Constructor Detail

OracleSpatial10gDialect

public OracleSpatial10gDialect()

OracleSpatial10gDialect

public OracleSpatial10gDialect(HibernateSpatialConfiguration config)
Method Detail

getTypeName

public java.lang.String getTypeName(int code,
                                    long length,
                                    int precision,
                                    int scale)
                             throws org.hibernate.HibernateException
Description copied from class: org.hibernate.dialect.Dialect
Get the name of the database type associated with the given Types typecode with the given storage specification parameters.

Overrides:
getTypeName in class org.hibernate.dialect.Dialect
Parameters:
code - The Types typecode
length - The datatype length
precision - The datatype precision
scale - The datatype scale
Returns:
the database type name
Throws:
org.hibernate.HibernateException - If no mapping was specified for that type.

remapSqlTypeDescriptor

public org.hibernate.type.descriptor.sql.SqlTypeDescriptor remapSqlTypeDescriptor(org.hibernate.type.descriptor.sql.SqlTypeDescriptor sqlTypeDescriptor)
Description copied from class: org.hibernate.dialect.Dialect
Allows the dialect to override a SqlTypeDescriptor.

If the passed sqlTypeDescriptor allows itself to be remapped (per SqlTypeDescriptor.canBeRemapped()), then this method uses Dialect.getSqlTypeDescriptorOverride(int) to get an optional override based on the SQL code returned by SqlTypeDescriptor.getSqlType().

If this dialect does not provide an override or if the sqlTypeDescriptor doe not allow itself to be remapped, then this method simply returns the original passed sqlTypeDescriptor

Overrides:
remapSqlTypeDescriptor in class org.hibernate.dialect.Dialect
Parameters:
sqlTypeDescriptor - The SqlTypeDescriptor to override
Returns:
The SqlTypeDescriptor that should be used for this dialect; if there is no override, then original sqlTypeDescriptor is returned.
See Also:
Dialect.getSqlTypeDescriptorOverride(int)

getNativeSpatialRelateSQL

public java.lang.String getNativeSpatialRelateSQL(java.lang.String arg1,
                                                  java.lang.String arg2,
                                                  int spatialRelation)

getOGCSpatialRelateSQL

public java.lang.String getOGCSpatialRelateSQL(java.lang.String arg1,
                                               java.lang.String arg2,
                                               int spatialRelation)

getNativeSpatialAggregateSQL

public java.lang.String getNativeSpatialAggregateSQL(java.lang.String arg1,
                                                     int aggregation)

getSpatialFilterExpression

public java.lang.String getSpatialFilterExpression(java.lang.String columnName)
Description copied from interface: SpatialDialect
Returns the SQL fragment for the SQL WHERE-expression when parsing org.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.

Specified by:
getSpatialFilterExpression in interface SpatialDialect
Returns:

getSpatialRelateSQL

public java.lang.String getSpatialRelateSQL(java.lang.String columnName,
                                            int spatialRelation)
Description copied from interface: SpatialDialect
Returns the SQL fragment for the SQL WHERE-clause when parsing org.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.

Specified by:
getSpatialRelateSQL in interface SpatialDialect
Parameters:
columnName - The name of the geometry-typed column to which the relation is applied
spatialRelation - The type of spatial relation (as defined in SpatialRelation).
Returns:
SQL fragment for use in the SQL WHERE-clause.

getSpatialAnalysisSQL

public java.lang.String getSpatialAnalysisSQL(java.util.List args,
                                              int spatialAnalysisFunction,
                                              boolean useFilter)

getSpatialAggregateSQL

public java.lang.String getSpatialAggregateSQL(java.lang.String columnName,
                                               int spatialAggregateFunction)
Specified by:
getSpatialAggregateSQL in interface SpatialDialect
Parameters:
columnName - the name of the Geometry property
spatialAggregateFunction - the type of SpatialAggregate
Returns:
the SQL fragment for the projection

getDWithinSQL

public java.lang.String getDWithinSQL(java.lang.String columnName)
Description copied from interface: SpatialDialect
Returns the SQL fragment when parsing a DWithinExpression.

Specified by:
getDWithinSQL in interface SpatialDialect
Parameters:
columnName - the geometry column to test against
Returns:

getHavingSridSQL

public java.lang.String getHavingSridSQL(java.lang.String columnName)
Description copied from interface: SpatialDialect
Returns the SQL fragment when parsing an HavingSridExpression.

Specified by:
getHavingSridSQL in interface SpatialDialect
Parameters:
columnName - the geometry column to test against
Returns:

getIsEmptySQL

public java.lang.String getIsEmptySQL(java.lang.String columnName,
                                      boolean isEmpty)
Description copied from interface: SpatialDialect
Returns the SQL fragment when parsing a IsEmptyExpression or IsNotEmpty expression.

Specified by:
getIsEmptySQL in interface SpatialDialect
Parameters:
columnName - the geometry column
isEmpty - whether the geometry is tested for empty or non-empty
Returns:

isOGCStrict

public boolean isOGCStrict()
Reports whether this dialect is in OGC_STRICT mode or not. This method is for testing purposes.

Returns:
true if in OGC_STRICT mode, false otherwise

getConnectionFinder

public ConnectionFinder getConnectionFinder()
Reports the ConnectionFinder used by this Dialect (or rather its associated TypeDescriptor). This method is mainly used for testing purposes.

Returns:
the ConnectionFinder in use

supportsFiltering

public boolean supportsFiltering()
Description copied from interface: SpatialDialect
Returns true if this SpatialDialect supports a specific filtering function.

This is intended to signal DB-support for fast window queries, or MBR-overlap queries

Specified by:
supportsFiltering in interface SpatialDialect

supports

public boolean supports(SpatialFunction function)
Description copied from interface: SpatialDialect
Does this dialect supports the specified SpatialFunction.

Specified by:
supports in interface SpatialDialect
Parameters:
function - SpatialFunction
Returns:
true if this SpatialDialect supports the spatial function specified by the function parameter.