Top Description Inners Fields Constructors Methods
org.hibernate.dialect

public abstract Class AbstractHANADialect

extends Dialect
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.HANACloudColumnStoreDialect, org.hibernate.dialect.HANAColumnStoreDialect, org.hibernate.dialect.HANARowStoreDialect
Imports
java.io.ByteArrayInputStream, .ByteArrayOutputStream, .FilterInputStream, .FilterReader, .IOException, .InputStream, .OutputStream, .Reader, .StringReader, .Writer, java.nio.charset.StandardCharsets, java.sql.Blob, .CallableStatement, .Clob, .Connection, .DatabaseMetaData, .NClob, .PreparedStatement, .ResultSet, .SQLException, .SQLFeatureNotSupportedException, .Statement, .Types, java.time.Duration, java.util.Arrays, .List, java.util.regex.Matcher, .Pattern, org.hibernate.JDBCException, .LockMode, .LockOptions, .MappingException, .ScrollMode, org.hibernate.boot.Metadata, org.hibernate.boot.model.TypeContributions, org.hibernate.boot.model.naming.Identifier, org.hibernate.boot.model.relational.SqlStringGenerationContext, org.hibernate.cfg.AvailableSettings, org.hibernate.dialect.function.AnsiTrimFunction, .NoArgSQLFunction, .SQLFunctionTemplate, .StandardSQLFunction, .VarArgsSQLFunction, org.hibernate.dialect.identity.HANAIdentityColumnSupport, .IdentityColumnSupport, org.hibernate.dialect.pagination.AbstractLimitHandler, .LimitHandler, .LimitHelper, org.hibernate.engine.config.spi.ConfigurationService, .ConfigurationService.Converter, .StandardConverters, org.hibernate.engine.jdbc.BinaryStream, .BlobImplementer, .CharacterStream, .ClobImplementer, .NClobImplementer, org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, org.hibernate.engine.jdbc.env.spi.AnsiSqlKeywords, .IdentifierCaseStrategy, .IdentifierHelper, .IdentifierHelperBuilder, .NameQualifierSupport, org.hibernate.engine.spi.RowSelection, org.hibernate.exception.ConstraintViolationException, .LockAcquisitionException, .LockTimeoutException, .SQLGrammarException, org.hibernate.exception.spi.SQLExceptionConversionDelegate, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.JdbcExceptionHelper, org.hibernate.mapping.Table, org.hibernate.procedure.internal.StandardCallableStatementSupport, org.hibernate.procedure.spi.CallableStatementSupport, org.hibernate.service.ServiceRegistry, org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorHANADatabaseImpl, org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor, org.hibernate.tool.schema.internal.StandardTableExporter, org.hibernate.tool.schema.spi.Exporter, org.hibernate.type.StandardBasicTypes, org.hibernate.type.descriptor.ValueBinder, .ValueExtractor, .WrapperOptions, org.hibernate.type.descriptor.java.DataHelper, .JavaTypeDescriptor, org.hibernate.type.descriptor.sql.BasicBinder, .BasicExtractor, .BitTypeDescriptor, .BlobTypeDescriptor, .BooleanTypeDescriptor, .CharTypeDescriptor, .ClobTypeDescriptor, .DecimalTypeDescriptor, .DoubleTypeDescriptor, .NCharTypeDescriptor, .NClobTypeDescriptor, .NVarcharTypeDescriptor, .SmallIntTypeDescriptor, .SqlTypeDescriptor, .VarcharTypeDescriptor

An abstract base class for SAP HANA dialects.

For more information on interacting with the SAP HANA database, refer to the SAP HANA SQL and System Views Reference and the SAP HANA Client Interface Programming Reference.

Note

This dialect is configured to create foreign keys with on update cascade.

Authors
Andrew Clemons, Jonathan Bregler

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
public static class
private static class
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private AbstractHANADialect.HANABlobTypeDescriptor
private AbstractHANADialect.HANAClobTypeDescriptor
private final StandardTableExporter
private static final AbstractLimitHandler
private static final CoreMessageLogger
private static final int
private static final String
private AbstractHANADialect.HANANClobTypeDescriptor
private static final Boolean
private static final String
private boolean
private static final Boolean
private static final String
private static final String
private boolean
private boolean
Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTEDEFAULT_BATCH_SIZELEGACY_LOB_MERGE_STRATEGYNEW_LOCATOR_LOB_MERGE_STRATEGYNO_BATCHQUOTESTANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGYSTREAM_XFER_LOB_MERGE_STRATEGYTWO_SINGLE_QUOTES_REPLACEMENT

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
bindLimitParametersInReverseOrder()

Overrides org.hibernate.dialect.Dialect.bindLimitParametersInReverseOrder.

ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit.
public IdentifierHelper
buildIdentifierHelper(IdentifierHelperBuilder
A semi-configured IdentifierHelper builder.
builder
,
DatabaseMetaData
Access to the metadata returned from the driver if needed and if available.

Warning

may be null

dbMetaData
)

Overrides org.hibernate.dialect.Dialect.buildIdentifierHelper.

Build the IdentifierHelper indicated by this Dialect for handling identifier conversions.
public SQLExceptionConversionDelegate
buildSQLExceptionConversionDelegate()

Overrides org.hibernate.dialect.Dialect.buildSQLExceptionConversionDelegate.

Build an instance of a SQLExceptionConversionDelegate for interpreting dialect-specific error or SQLState codes.
public void
contributeTypes(TypeContributions
Callback to contribute the types
typeContributions
,
ServiceRegistry
The service registry
serviceRegistry
)

Overrides org.hibernate.dialect.Dialect.contributeTypes.

Allows the Dialect to contribute additional types
public ScrollMode
defaultScrollMode()

Overrides org.hibernate.dialect.Dialect.defaultScrollMode.

Certain dialects support a subset of ScrollModes.
public boolean
dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

Do we need to drop constraints before dropping tables in this dialect?
public boolean
forUpdateOfColumns()

Overrides org.hibernate.dialect.Dialect.forUpdateOfColumns.

Is FOR UPDATE OF syntax supported?
public String
getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table (optional).
public String
getAddColumnSuffixString()

Overrides org.hibernate.dialect.Dialect.getAddColumnSuffixString.

The syntax for the suffix used to add a column to a table (optional).
public SqlTypeDescriptor
public CallableStatementSupport
public String
getCascadeConstraintsString()

Overrides org.hibernate.dialect.Dialect.getCascadeConstraintsString.

Completely optional cascading drop clause
public String
getColumnComment(String
The comment to apply
comment
)

Overrides org.hibernate.dialect.Dialect.getColumnComment.

Get the comment into a form supported for column definition.
public String
getCreateSequenceString(final String
The name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

Typically dialects which support sequences can create a sequence with a single command.
protected String
getCreateSequenceString(String
The name of the sequence
sequenceName
,
int
The initial value to apply to 'create sequence' statement
initialValue
,
int
The increment value to apply to 'create sequence' statement
incrementSize
)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

Overloaded form of getCreateSequenceString(String), additionally taking the initial value and increment size to be applied to the sequence definition.
public String
getCurrentSchemaCommand()

Overrides org.hibernate.dialect.Dialect.getCurrentSchemaCommand.

Get the SQL command used to retrieve the current schema name.
public String
getCurrentTimestampSelectString()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

Retrieve the command used to retrieve the current timestamp from the database.
public String
getDropSequenceString(final String
The name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

Typically dialects which support sequences can drop a sequence with a single command.
public String
getForUpdateNowaitString()

Overrides org.hibernate.dialect.Dialect.getForUpdateNowaitString.

Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
public String
getForUpdateNowaitString(String
The columns to be write locked.
aliases
)

Overrides org.hibernate.dialect.Dialect.getForUpdateNowaitString.

Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect given the aliases of the columns to be write locked.
public String
getForUpdateString(final String
The columns to be write locked.
aliases
)

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
public String
getForUpdateString(final String
The columns to be write locked.
aliases
,
final LockOptions
the lock options to apply
lockOptions
)

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
private String
getForUpdateString(String aliases, LockMode lockMode, int timeout)

public IdentityColumnSupport
public LimitHandler
getLimitHandler()

Overrides org.hibernate.dialect.Dialect.getLimitHandler.

Returns the delegate managing LIMIT clause.
public String
getLimitString(final String
The query to which to apply the limit.
sql
,
final boolean
Is the query requesting an offset?
hasOffset
)

Overrides org.hibernate.dialect.Dialect.getLimitString.

Apply a limit clause to the query.
private long
getLockWaitTimeoutInSeconds(int timeoutInMilliseconds)

public int
getMaxAliasLength()

Overrides org.hibernate.dialect.Dialect.getMaxAliasLength.

What is the maximum length Hibernate can use for generated aliases?
public NameQualifierSupport
getNameQualifierSupport()

Overrides org.hibernate.dialect.Dialect.getNameQualifierSupport.

By default interpret this based on DatabaseMetaData.
public String
getNotExpression(final String
The expression to negate
expression
)

Overrides org.hibernate.dialect.Dialect.getNotExpression.

Negate an expression
public String
getQueryHintString(String
The query to which to apply the hint.
query
,
List<String>
The hints to apply
hints
)

Overrides org.hibernate.dialect.Dialect.getQueryHintString.

Apply a hint to the query.
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.
public String
getReadLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect.
public String
getReadLockString(String
The columns to be read locked.
aliases
,
int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect given the aliases of the columns to be read locked.
public String
getSelectGUIDString()

Overrides org.hibernate.dialect.Dialect.getSelectGUIDString.

Get the command used to select a GUID from the underlying database.
public String
getSelectSequenceNextValString(final String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.
public SequenceInformationExtractor
public String
getSequenceNextValString(final String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

Generate the appropriate select statement to to retrieve the next value of a sequence.
protected SqlTypeDescriptor
getSqlTypeDescriptorOverride(final int
A Types constant indicating the SQL column type
sqlCode
)

Overrides org.hibernate.dialect.Dialect.getSqlTypeDescriptorOverride.

Returns the SqlTypeDescriptor that should be used to handle the given JDBC type code.
public String
getTableComment(String
The comment to apply
comment
)

Overrides org.hibernate.dialect.Dialect.getTableComment.

Get the comment into a form supported for table definition.
public Exporter<Table>
public String
getWriteLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire WRITE locks for this dialect.
public String
getWriteLockString(String
The columns to be read locked.
aliases
,
int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire WRITE locks for this dialect given the aliases of the columns to be write locked.
public boolean
public boolean
protected void
public int
registerResultSetOutParameter(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
position
)

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*.
public int
registerResultSetOutParameter(CallableStatement
The callable statement.
statement
,
String
The parameter name (for drivers which support named parameters).
name
)

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by name*.
protected abstract boolean
public boolean
supportsColumnCheck()

Overrides org.hibernate.dialect.Dialect.supportsColumnCheck.

HANA currently does not support check constraints.
public boolean
supportsCommentOn()

Overrides org.hibernate.dialect.Dialect.supportsCommentOn.

Does this dialect/database support commenting on tables, columns, etc?
public boolean
supportsCurrentTimestampSelection()

Overrides org.hibernate.dialect.Dialect.supportsCurrentTimestampSelection.

Does this dialect support a way to retrieve the database's current timestamp value?
public boolean
supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

Does this dialect support empty IN lists?
public boolean
supportsExistsInSelect()

Overrides org.hibernate.dialect.Dialect.supportsExistsInSelect.

Does the dialect support an exists statement in the select clause?
public boolean
supportsExpectedLobUsagePattern()

Overrides org.hibernate.dialect.Dialect.supportsExpectedLobUsagePattern.

Expected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes...
public boolean
supportsJdbcConnectionLobCreation(DatabaseMetaData
JDBC DatabaseMetaData which can be used if LOB creation is supported only starting from a given Driver version
databaseMetaData
)

Overrides org.hibernate.dialect.Dialect.supportsJdbcConnectionLobCreation.

Check whether the JDBC Connection supports creating LOBs via Connection#createBlob(), Connection#createNClob() or Connection#createClob().
public boolean
supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Does this dialect support some form of limiting query results via a SQL clause?
public boolean
supportsNoColumnsInsert()

Overrides org.hibernate.dialect.Dialect.supportsNoColumnsInsert.

Check if the INSERT statement is allowed to contain no column.
public boolean
supportsNoWait()

Overrides org.hibernate.dialect.Dialect.supportsNoWait.

Does this dialect/database support NO_WAIT timeout.
public boolean
supportsPartitionBy()

Overrides org.hibernate.dialect.Dialect.supportsPartitionBy.

Does the underlying database support partition by
public boolean
supportsPooledSequences()

Overrides org.hibernate.dialect.Dialect.supportsPooledSequences.

Does this dialect support "pooled" sequences.
public boolean
supportsRowValueConstructorSyntax()

Overrides org.hibernate.dialect.Dialect.supportsRowValueConstructorSyntax.

Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.
public boolean
supportsRowValueConstructorSyntaxInInList()

Overrides org.hibernate.dialect.Dialect.supportsRowValueConstructorSyntaxInInList.

If the dialect supports row values, does it offer such support in IN lists as well?
public boolean
supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?
public boolean
supportsTableCheck()

Overrides org.hibernate.dialect.Dialect.supportsTableCheck.

Does this dialect support table-level check constraints?
public boolean
supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support `count(distinct a,b)`?
public boolean
supportsUnboundedLobLocatorMaterialization()

Overrides org.hibernate.dialect.Dialect.supportsUnboundedLobLocatorMaterialization.

Is it supported to materialize a LOB locator outside the transaction in which it was created?
public boolean
supportsUnionAll()

Overrides org.hibernate.dialect.Dialect.supportsUnionAll.

Does this dialect support UNION ALL, which is generally a faster variant of UNION?
public String
toBooleanValueString(boolean
The boolean value
bool
)

Overrides org.hibernate.dialect.Dialect.toBooleanValueString.

The SQL literal value to which this database maps boolean values.
protected abstract Boolean
Inherited from org.hibernate.dialect.Dialect:
addSqlHintOrCommentappendLockHintappendLockHintapplyLocksToSqlareStringComparisonsCaseInsensitiveaugmentPhysicalTableTypesaugmentRecognizedTableTypesbindLimitParametersFirstbuildSQLExceptionConvertercanCreateCatalogcanCreateSchemacastcastcastcloseQuoteconvertToFirstRowValuecreateCaseFragmentcreateOuterJoinFragmentdoesReadCommittedCauseWritersToBlockReadersdoesRepeatableReadCauseReadersToBlockWritersequivalentTypesescapeCommentescapeLiteralforceLimitUsageforceLobAsLastValuegetAddForeignKeyConstraintStringgetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetAddUniqueConstraintStringgetAlterTableStringgetAuxiliaryDatabaseObjectExportergetCaseInsensitiveLikegetCastTypeNamegetColumnAliasExtractorgetCreateCatalogCommandgetCreateMultisetTableStringgetCreateSchemaCommandgetCreateSequenceStringsgetCreateSequenceStringsgetCreateTableStringgetCreateTemporaryTableColumnAnnotationgetCrossJoinSeparatorgetCurrentTimestampSQLFunctionNamegetDefaultBatchLoadSizingStrategygetDefaultMultiTableBulkIdStrategygetDefaultPropertiesgetDialectgetDialectgetDropCatalogCommandgetDropForeignKeyStringgetDropSchemaCommandgetDropSequenceStringsgetDropTableStringgetForeignKeyExportergetForUpdateSkipLockedStringgetForUpdateSkipLockedStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFunctionsgetHibernateTypeNamegetHibernateTypeNamegetIndexExportergetInExpressionCountLimitgetKeywordsgetLimitStringgetLobMergeStrategygetLockingStrategygetLowercaseFunctiongetNativeIdentifierGeneratorClassgetNativeIdentifierGeneratorStrategygetNoColumnsInsertStringgetNullColumnStringgetQueryHintStringgetResultSetgetResultSetgetResultSetgetSchemaNameResolvergetSelectClauseNullStringgetSequenceExportergetTableTypeStringgetTypeNamegetTypeNamegetUniqueDelegategetUniqueKeyExportergetViolatedConstraintNameExtracterhasAlterTablehasSelfReferentialForeignKeyBuginlineLiteralisJdbcLogWarningsEnabledByDefaultisLegacyLimitHandlerBehaviorEnabledisLockTimeoutParameterizedisTypeNameRegisteredopenQuoteprependCommentqualifyIndexNamequoteregisterColumnTyperegisterColumnTyperegisterFunctionregisterHibernateTyperegisterHibernateTyperegisterKeywordremapSqlTypeDescriptorrenderOrderByElementreplaceResultVariableInOrderByClauseWithPositionrequiresCastingOfParametersInSelectClauserequiresParensForTupleDistinctCountssupportsBindAsCallableArgumentsupportsCascadeDeletesupportsCaseInsensitiveLikesupportsCircularCascadeDeleteConstraintssupportsIfExistsAfterAlterTablesupportsIfExistsAfterConstraintNamesupportsIfExistsAfterTableNamesupportsIfExistsBeforeConstraintNamesupportsIfExistsBeforeTableNamesupportsLimitOffsetsupportsLobValueChangePropogationsupportsLockTimeoutssupportsNamedParameterssupportsNationalizedTypessupportsNonQueryWithCTEsupportsNotNullUniquesupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsRowValueConstructorSyntaxInSetsupportsSelectAliasInGroupByClausesupportsSkipLockedsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTupleCountssupportsTuplesInSubqueriessupportsUniquesupportsUniqueConstraintInCreateAlterTablesupportsValuesListsupportsVariableLimittoStringtransformSelectStringuseFollowOnLockinguseFollowOnLockinguseInputStreamToInsertBlobuseMaxForLimit