Class PostgisPG95Dialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.PostgreSQL81Dialect
-
- org.hibernate.dialect.PostgreSQL82Dialect
-
- org.hibernate.dialect.PostgreSQL9Dialect
-
- org.hibernate.dialect.PostgreSQL91Dialect
-
- org.hibernate.dialect.PostgreSQL92Dialect
-
- org.hibernate.dialect.PostgreSQL93Dialect
-
- org.hibernate.dialect.PostgreSQL94Dialect
-
- org.hibernate.dialect.PostgreSQL95Dialect
-
- org.hibernate.spatial.dialect.postgis.PostgisPG95Dialect
-
- All Implemented Interfaces:
java.io.Serializable,org.hibernate.exception.spi.ConversionContext,SpatialDialect
public class PostgisPG95Dialect extends org.hibernate.dialect.PostgreSQL95DialectExtends thePostgreSQL95Dialectto add support for the Postgis spatial types, functions and operators . Created by Karel Maesen, Geovise BVBA on 01/11/16.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PostgisSupportsupport
-
Constructor Summary
Constructors Constructor Description PostgisPG95Dialect()Creates an instance
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description voidcontributeTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)booleanequivalentTypes(int typeCode1, int typeCode2)default SpatialFunctionsRegistryfunctionsToRegister()default java.lang.StringgetDWithinSQL(java.lang.String columnName)Returns The SQL fragment when parsing aDWithinExpression.default java.lang.StringgetHavingSridSQL(java.lang.String columnName)Returns the SQL fragment when parsing aHavingSridExpression.default java.lang.StringgetIsEmptySQL(java.lang.String columnName, boolean isEmpty)Returns the SQL fragment when parsing aIsEmptyExpressionorIsNotEmptyexpression.default java.lang.StringgetSpatialAggregateSQL(java.lang.String columnName, int aggregation)Returns the SQL fragment for the specfied Spatial aggregate expression.default java.lang.StringgetSpatialFilterExpression(java.lang.String columnName)Returns the SQL fragment for the SQL WHERE-expression when parsingorg.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.default java.lang.StringgetSpatialRelateSQL(java.lang.String columnName, int spatialRelation)Returns the SQL fragment for the SQL WHERE-clause when parsingorg.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.default booleanisSpatial(int typeCode)Checks whether the typeCode is (potentially) the code for a spatial typedefault booleansupports(SpatialFunction function)Does this dialect supports the specifiedSpatialFunction.default booleansupportsFiltering()Returns true if thisSpatialDialectsupports a specific filtering function.-
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, getIdentityColumnSupport, 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
-
-
-
-
Field Detail
-
support
public static final PostgisSupport support
-
-
Method Detail
-
contributeTypes
public void contributeTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)- Overrides:
contributeTypesin classorg.hibernate.dialect.PostgreSQL82Dialect
-
equivalentTypes
public boolean equivalentTypes(int typeCode1, int typeCode2)- Overrides:
equivalentTypesin classorg.hibernate.dialect.Dialect
-
functionsToRegister
public default SpatialFunctionsRegistry functionsToRegister()
-
getSpatialRelateSQL
public default java.lang.String getSpatialRelateSQL(java.lang.String columnName, int spatialRelation)Returns the SQL fragment for the SQL WHERE-clause when parsingorg.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.- Specified by:
getSpatialRelateSQLin interfaceSpatialDialect- Parameters:
columnName- The name of the geometry-typed column to which the relation is appliedspatialRelation- The type of spatial relation (as defined inSpatialRelation).- 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 parsingorg.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.- Specified by:
getSpatialFilterExpressionin interfaceSpatialDialect- 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:
getSpatialAggregateSQLin interfaceSpatialDialect- Parameters:
columnName- The name of the Geometry propertyaggregation- The type ofSpatialAggregate- Returns:
- The SQL fragment for the projection
-
getDWithinSQL
public default java.lang.String getDWithinSQL(java.lang.String columnName)
Returns The SQL fragment when parsing aDWithinExpression.- Specified by:
getDWithinSQLin interfaceSpatialDialect- 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 aHavingSridExpression.- Specified by:
getHavingSridSQLin interfaceSpatialDialect- 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 aIsEmptyExpressionorIsNotEmptyexpression.- Specified by:
getIsEmptySQLin interfaceSpatialDialect- Parameters:
columnName- The geometry columnisEmpty- 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 thisSpatialDialectsupports a specific filtering function.This is intended to signal DB-support for fast window queries, or MBR-overlap queries.
- Specified by:
supportsFilteringin interfaceSpatialDialect- Returns:
- True if filtering is supported
-
supports
public default boolean supports(SpatialFunction function)
Does this dialect supports the specifiedSpatialFunction.- Specified by:
supportsin interfaceSpatialDialect- Parameters:
function-SpatialFunction- Returns:
- True if this
SpatialDialectsupports 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
-
-