Class DB2SpatialDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.DB2Dialect
-
- org.hibernate.spatial.dialect.db2.DB2SpatialDialect
-
- All Implemented Interfaces:
Serializable,org.hibernate.exception.spi.ConversionContext,SpatialDialect
public class DB2SpatialDialect extends org.hibernate.dialect.DB2Dialect implements SpatialDialect
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DB2SpatialDialect()Construct a DB2Spatial dialect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontributeTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)StringgetDWithinSQL(String columnName)Returns The SQL fragment when parsing aDWithinExpression.StringgetHavingSridSQL(String columnName)Returns the SQL fragment when parsing aHavingSridExpression.StringgetIsEmptySQL(String columnName, boolean isEmpty)Returns the SQL fragment when parsing aIsEmptyExpressionorIsNotEmptyexpression.StringgetSpatialAggregateSQL(String columnName, int type)Returns the SQL fragment for the specfied Spatial aggregate expression.StringgetSpatialFilterExpression(String arg0)Returns the SQL fragment for the SQL WHERE-expression when parsingorg.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.StringgetSpatialRelateSQL(String columnName, int spatialRelation)Returns the SQL fragment for the SQL WHERE-clause when parsingorg.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.StringgetTypeName(int code, long length, int precision, int scale)booleansupports(SpatialFunction function)Does this dialect supports the specifiedSpatialFunction.booleansupportsFiltering()Returns true if thisSpatialDialectsupports a specific filtering function.-
Methods inherited from class org.hibernate.dialect.DB2Dialect
buildSQLExceptionConversionDelegate, convertToFirstRowValue, doesReadCommittedCauseWritersToBlockReaders, dropConstraints, getAddColumnString, getCreateSequenceString, getCrossJoinSeparator, getCurrentTimestampSelectString, getDefaultMultiTableBulkIdStrategy, getDropSequenceString, getForUpdateString, getIdentityColumnSupport, getLimitHandler, getLimitString, getLowercaseFunction, getNotExpression, getQuerySequencesString, getResultSet, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceNextValString, getSqlTypeDescriptorOverride, getUniqueDelegate, isCurrentTimestampSelectStringCallable, registerResultSetOutParameter, renderOrderByElement, requiresCastingOfParametersInSelectClause, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExistsInSelect, supportsLimit, supportsLobValueChangePropogation, supportsLockTimeouts, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSequences, supportsTupleDistinctCounts, supportsUnionAll, supportsVariableLimit, useMaxForLimit
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getTableComment, getTableExporter, getTableTypeString, getTypeName, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Method Detail
-
contributeTypes
public void contributeTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)- Overrides:
contributeTypesin classorg.hibernate.dialect.Dialect
-
getDWithinSQL
public String getDWithinSQL(String columnName)
Description copied from interface:SpatialDialectReturns 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 String getHavingSridSQL(String columnName)
Description copied from interface:SpatialDialectReturns 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 String getIsEmptySQL(String columnName, boolean isEmpty)
Description copied from interface:SpatialDialectReturns 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
-
getSpatialAggregateSQL
public String getSpatialAggregateSQL(String columnName, int type)
Description copied from interface:SpatialDialectReturns the SQL fragment for the specfied Spatial aggregate expression.- Specified by:
getSpatialAggregateSQLin interfaceSpatialDialect- Parameters:
columnName- The name of the Geometry propertytype- The type ofSpatialAggregate- Returns:
- The SQL fragment for the projection
-
getSpatialFilterExpression
public String getSpatialFilterExpression(String arg0)
Description copied from interface:SpatialDialectReturns the SQL fragment for the SQL WHERE-expression when parsingorg.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.- Specified by:
getSpatialFilterExpressionin interfaceSpatialDialect- Parameters:
arg0- The name of the geometry-typed column to which the filter is be applied- Returns:
- Rhe SQL fragment for the
SpatialFilterExpression
-
getTypeName
public String getTypeName(int code, long length, int precision, int scale) throws org.hibernate.HibernateException
- Overrides:
getTypeNamein classorg.hibernate.dialect.Dialect- Throws:
org.hibernate.HibernateException
-
getSpatialRelateSQL
public String getSpatialRelateSQL(String columnName, int spatialRelation)
Description copied from interface:SpatialDialectReturns 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
-
supports
public boolean supports(SpatialFunction function)
Description copied from interface:SpatialDialectDoes 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.
-
supportsFiltering
public boolean supportsFiltering()
Description copied from interface:SpatialDialectReturns 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
-
-