Class SqlServer2008SpatialDialect

  • All Implemented Interfaces:
    java.io.Serializable, org.hibernate.exception.spi.ConversionContext, SpatialDialect

    public class SqlServer2008SpatialDialect
    extends org.hibernate.dialect.SQLServer2008Dialect
    implements SpatialDialect
    The SpatialDialect for Microsoft SQL Server (2008).
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SHORT_NAME
      The short name for this dialect
      • Fields inherited from class org.hibernate.dialect.Dialect

        CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String applyLocksToSql​(java.lang.String arg0, org.hibernate.LockOptions arg1, java.util.Map<java.lang.String,​java.lang.String[]> arg2)  
      void contributeTypes​(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)  
      java.lang.String getAddColumnString()  
      org.hibernate.hql.spi.id.MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()  
      java.lang.String getDWithinSQL​(java.lang.String columnName)
      Returns The SQL fragment when parsing a DWithinExpression.
      java.lang.String getForUpdateString()  
      java.lang.String getHavingSridSQL​(java.lang.String columnName)
      Returns the SQL fragment when parsing a 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 getNullColumnString()  
      java.sql.ResultSet getResultSet​(java.sql.CallableStatement arg0)  
      java.lang.String getSelectGUIDString()  
      java.lang.String getSpatialAggregateSQL​(java.lang.String columnName, int aggregation)
      Returns the SQL fragment for the specfied Spatial aggregate expression.
      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.
      boolean isCurrentTimestampSelectStringCallable()  
      boolean qualifyIndexName()  
      int registerResultSetOutParameter​(java.sql.CallableStatement arg0, int arg1)  
      boolean supports​(SpatialFunction function)
      Does this dialect supports the specified SpatialFunction.
      boolean supportsCurrentTimestampSelection()  
      boolean supportsEmptyInList()  
      boolean supportsExistsInSelect()  
      boolean supportsFiltering()
      Returns true if this SpatialDialect supports a specific filtering function.
      boolean supportsPartitionBy()  
      boolean supportsTupleDistinctCounts()  
      boolean supportsTuplesInSubqueries()  
      boolean supportsUnionAll()  
      • Methods inherited from class org.hibernate.dialect.SQLServer2008Dialect

        renderOrderByElement, supportsValuesList
      • Methods inherited from class org.hibernate.dialect.SQLServer2005Dialect

        appendLockHint, buildSQLExceptionConversionDelegate, getDefaultLimitHandler, supportsNonQueryWithCTE, supportsNoWait, supportsSkipLocked
      • Methods inherited from class org.hibernate.dialect.SQLServerDialect

        areStringComparisonsCaseInsensitive, closeQuote, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, getCurrentSchemaCommand, getCurrentTimestampSelectString, getIdentityColumnSupport, getInExpressionCountLimit, getLimitHandler, getLimitString, getNoColumnsInsertString, getSqlTypeDescriptorOverride, openQuote, supportsCircularCascadeDeleteConstraints, supportsLimit, supportsLimitOffset, supportsLobValueChangePropogation, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsVariableLimit, useMaxForLimit
      • Methods inherited from class org.hibernate.dialect.Dialect

        addSqlHintOrComment, appendLockHint, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, dropConstraints, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNotExpression, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, prependComment, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsColumnCheck, supportsCommentOn, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • SHORT_NAME

        public static final java.lang.String SHORT_NAME
        The short name for this dialect
        See Also:
        Constant Field Values
    • Constructor Detail

      • SqlServer2008SpatialDialect

        public SqlServer2008SpatialDialect()
        Constructs an instance
    • Method Detail

      • contributeTypes

        public void contributeTypes​(org.hibernate.boot.model.TypeContributions typeContributions,
                                    org.hibernate.service.ServiceRegistry serviceRegistry)
        Overrides:
        contributeTypes in class org.hibernate.dialect.Dialect
      • 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 SpatialRelateExpression
      • 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
        Parameters:
        columnName - The name of the geometry-typed column to which the filter is be applied
        Returns:
        Rhe SQL fragment for the SpatialFilterExpression
      • getSpatialAggregateSQL

        public java.lang.String getSpatialAggregateSQL​(java.lang.String columnName,
                                                       int aggregation)
        Description copied from interface: SpatialDialect
        Returns the SQL fragment for the specfied Spatial aggregate expression.
        Specified by:
        getSpatialAggregateSQL in interface SpatialDialect
        Parameters:
        columnName - The name of the Geometry property
        aggregation - 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:
        The SQL fragment when parsing a DWithinExpression.
      • getHavingSridSQL

        public java.lang.String getHavingSridSQL​(java.lang.String columnName)
        Description copied from interface: SpatialDialect
        Returns the SQL fragment when parsing a HavingSridExpression.
        Specified by:
        getHavingSridSQL in interface SpatialDialect
        Parameters:
        columnName - The geometry column to test against
        Returns:
        The SQL fragment for a HavingSridExpression.
      • 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:
        The SQL fragment for the isempty function
      • 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
        Returns:
        True if filtering is supported
      • 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.
      • getAddColumnString

        public java.lang.String getAddColumnString()
        Overrides:
        getAddColumnString in class org.hibernate.dialect.Dialect
      • getNullColumnString

        public java.lang.String getNullColumnString()
        Overrides:
        getNullColumnString in class org.hibernate.dialect.Dialect
      • qualifyIndexName

        public boolean qualifyIndexName()
        Overrides:
        qualifyIndexName in class org.hibernate.dialect.Dialect
      • getForUpdateString

        public java.lang.String getForUpdateString()
        Overrides:
        getForUpdateString in class org.hibernate.dialect.Dialect
      • applyLocksToSql

        public java.lang.String applyLocksToSql​(java.lang.String arg0,
                                                org.hibernate.LockOptions arg1,
                                                java.util.Map<java.lang.String,​java.lang.String[]> arg2)
        Overrides:
        applyLocksToSql in class org.hibernate.dialect.Dialect
      • registerResultSetOutParameter

        public int registerResultSetOutParameter​(java.sql.CallableStatement arg0,
                                                 int arg1)
                                          throws java.sql.SQLException
        Overrides:
        registerResultSetOutParameter in class org.hibernate.dialect.Dialect
        Throws:
        java.sql.SQLException
      • getResultSet

        public java.sql.ResultSet getResultSet​(java.sql.CallableStatement arg0)
                                        throws java.sql.SQLException
        Overrides:
        getResultSet in class org.hibernate.dialect.Dialect
        Throws:
        java.sql.SQLException
      • supportsCurrentTimestampSelection

        public boolean supportsCurrentTimestampSelection()
        Overrides:
        supportsCurrentTimestampSelection in class org.hibernate.dialect.Dialect
      • isCurrentTimestampSelectStringCallable

        public boolean isCurrentTimestampSelectStringCallable()
        Overrides:
        isCurrentTimestampSelectStringCallable in class org.hibernate.dialect.Dialect
      • getDefaultMultiTableBulkIdStrategy

        public org.hibernate.hql.spi.id.MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
        Overrides:
        getDefaultMultiTableBulkIdStrategy in class org.hibernate.dialect.Dialect
      • getSelectGUIDString

        public java.lang.String getSelectGUIDString()
        Overrides:
        getSelectGUIDString in class org.hibernate.dialect.Dialect
      • supportsEmptyInList

        public boolean supportsEmptyInList()
        Overrides:
        supportsEmptyInList in class org.hibernate.dialect.Dialect
      • supportsUnionAll

        public boolean supportsUnionAll()
        Overrides:
        supportsUnionAll in class org.hibernate.dialect.Dialect
      • supportsExistsInSelect

        public boolean supportsExistsInSelect()
        Overrides:
        supportsExistsInSelect in class org.hibernate.dialect.Dialect
      • supportsTupleDistinctCounts

        public boolean supportsTupleDistinctCounts()
        Overrides:
        supportsTupleDistinctCounts in class org.hibernate.dialect.Dialect
      • supportsTuplesInSubqueries

        public boolean supportsTuplesInSubqueries()
        Overrides:
        supportsTuplesInSubqueries in class org.hibernate.dialect.Dialect
      • supportsPartitionBy

        public boolean supportsPartitionBy()
        Overrides:
        supportsPartitionBy in class org.hibernate.dialect.Dialect