Class PostgisPG10Dialect

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

    public class PostgisPG10Dialect
    extends org.hibernate.dialect.PostgreSQL10Dialect
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static PostgisSupport support  
      • 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, TWO_SINGLE_QUOTES_REPLACEMENT
    • Method Summary

      All Methods Instance Methods Concrete Methods Default Methods 
      Modifier and Type Method Description
      void contributeTypes​(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)  
      boolean equivalentTypes​(int typeCode1, int typeCode2)  
      default SpatialFunctionsRegistry functionsToRegister()  
      default java.lang.String getDWithinSQL​(java.lang.String columnName)
      Returns The SQL fragment when parsing a DWithinExpression.
      default java.lang.String getHavingSridSQL​(java.lang.String columnName)
      Returns the SQL fragment when parsing a HavingSridExpression.
      default java.lang.String getIsEmptySQL​(java.lang.String columnName, boolean isEmpty)
      Returns the SQL fragment when parsing a IsEmptyExpression or IsNotEmpty expression.
      default java.lang.String getSpatialAggregateSQL​(java.lang.String columnName, int aggregation)
      Returns the SQL fragment for the specfied Spatial aggregate expression.
      default 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.
      default 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.
      default boolean isSpatial​(int typeCode)
      Checks whether the typeCode is (potentially) the code for a spatial type
      default boolean supports​(SpatialFunction function)
      Does this dialect supports the specified SpatialFunction.
      default boolean supportsFiltering()
      Returns true if this SpatialDialect supports a specific filtering function.
      • Methods inherited from class org.hibernate.dialect.PostgreSQL10Dialect

        augmentRecognizedTableTypes, getIdentityColumnSupport
      • Methods inherited from class org.hibernate.dialect.PostgreSQL95Dialect

        getForUpdateSkipLockedString, getForUpdateSkipLockedString, getReadLockString, getReadLockString, getWriteLockString, getWriteLockString, supportsSkipLocked
      • Methods inherited from class org.hibernate.dialect.PostgreSQL92Dialect

        supportsIfExistsAfterAlterTable
      • Methods inherited from class org.hibernate.dialect.PostgreSQL91Dialect

        supportsNonQueryWithCTE, supportsPartitionBy
      • Methods inherited from class org.hibernate.dialect.PostgreSQL9Dialect

        supportsIfExistsBeforeConstraintName
      • Methods inherited from class org.hibernate.dialect.PostgreSQL82Dialect

        getDefaultMultiTableBulkIdStrategy, getDropSequenceString, supportsIfExistsBeforeTableName, supportsRowValueConstructorSyntaxInInList, supportsValuesList
      • Methods inherited from class org.hibernate.dialect.PostgreSQL81Dialect

        bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConversionDelegate, dropConstraints, getAddColumnString, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCreateSequenceString, getCreateSequenceString, getCurrentSchemaCommand, getCurrentTimestampSelectString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getLimitHandler, getLimitString, getNameQualifierSupport, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getQuerySequencesString, getResultSet, getResultSet, getResultSet, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceNextValString, getSqlTypeDescriptorOverride, getViolatedConstraintNameExtracter, isCurrentTimestampSelectStringCallable, qualifyIndexName, registerResultSetOutParameter, requiresParensForTupleDistinctCounts, supportsCaseInsensitiveLike, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExpectedLobUsagePattern, supportsJdbcConnectionLobCreation, supportsLimit, supportsLobValueChangePropogation, supportsNationalizedTypes, supportsNoWait, supportsOuterJoinForUpdate, supportsPooledSequences, supportsRowValueConstructorSyntax, supportsSelectAliasInGroupByClause, supportsSequences, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, toBooleanValueString, useInputStreamToInsertBlob
      • Methods inherited from class org.hibernate.dialect.Dialect

        addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentPhysicalTableTypes, bindLimitParametersFirst, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCrossJoinSeparator, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNotExpression, getNullColumnString, getQueryHintString, getQueryHintString, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExistsInSelect, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsLimitOffset, supportsLockTimeouts, supportsNamedParameters, supportsNoColumnsInsert, supportsNotNullUnique, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInSet, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useMaxForLimit
      • Methods inherited from class java.lang.Object

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

      • PostgisPG10Dialect

        public PostgisPG10Dialect()
    • Method Detail

      • contributeTypes

        public void contributeTypes​(org.hibernate.boot.model.TypeContributions typeContributions,
                                    org.hibernate.service.ServiceRegistry serviceRegistry)
        Overrides:
        contributeTypes in class org.hibernate.dialect.PostgreSQL82Dialect
      • equivalentTypes

        public boolean equivalentTypes​(int typeCode1,
                                       int typeCode2)
        Overrides:
        equivalentTypes in class org.hibernate.dialect.Dialect
      • getSpatialRelateSQL

        public default 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.

        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 default 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.
        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 default java.lang.String getSpatialAggregateSQL​(java.lang.String columnName,
                                                               int aggregation)
        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 default java.lang.String getDWithinSQL​(java.lang.String columnName)
        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 default java.lang.String getHavingSridSQL​(java.lang.String columnName)
        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 default java.lang.String getIsEmptySQL​(java.lang.String columnName,
                                                      boolean isEmpty)
        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 default boolean supportsFiltering()
        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 default boolean supports​(SpatialFunction function)
        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.
      • isSpatial

        public default boolean isSpatial​(int typeCode)
        Checks whether the typeCode is (potentially) the code for a spatial type
        Parameters:
        typeCode - the JDBC type code
        Returns:
        if the typecode corresponds with a spatialt type