Top Description Fields Constructors Methods
org.hibernate.dialect

public Class SAPDBDialect

extends Dialect
Class Inheritance
Imports
java.sql.DatabaseMetaData, .Types, org.hibernate.cfg.Environment, org.hibernate.dialect.function.NoArgSQLFunction, .SQLFunctionTemplate, .StandardSQLFunction, .VarArgsSQLFunction, org.hibernate.hql.spi.id.IdTableSupportStandardImpl, .MultiTableBulkIdStrategy, org.hibernate.hql.spi.id.local.AfterUseAction, .LocalTemporaryTableBulkIdStrategy, org.hibernate.sql.CaseFragment, .DecodeCaseFragment, org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorSAPDBDatabaseImpl, org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor, org.hibernate.type.StandardBasicTypes

An SQL dialect compatible with SAP DB.
Author
Brad Clow

Field Summary

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
SAPDBDialect()

Constructs a SAPDBDialect

Method Summary

Modifier and TypeMethod and Description
public CaseFragment
createCaseFragment()

Overrides org.hibernate.dialect.Dialect.createCaseFragment.

Create a CaseFragment strategy responsible for handling this dialect's variations in how CASE statements are handled.
public boolean
dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

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

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table (optional).
public String
getAddForeignKeyConstraintString(String
The FK constraint name.
constraintName
,
String[]
The names of the columns comprising the FK
foreignKey
,
String
The table referenced by the FK
referencedTable
,
String[]
The explicit columns in the referencedTable referenced by this FK.
primaryKey
,
boolean
if false, constraint should be explicit about which column names the constraint refers to
referencesPrimaryKey
)

Overrides org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

The syntax used to add a foreign key constraint to a table.
public String
public String
getAddPrimaryKeyConstraintString(String
The name of the PK constraint.
constraintName
)

Overrides org.hibernate.dialect.Dialect.getAddPrimaryKeyConstraintString.

The syntax used to add a primary key constraint to a table.
public String
getCreateSequenceString(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.
public MultiTableBulkIdStrategy
public String
getDropSequenceString(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
getNullColumnString()

Overrides org.hibernate.dialect.Dialect.getNullColumnString.

The keyword used to specify a nullable column.
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.
public String
getSelectSequenceNextValString(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(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.
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
supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?
Inherited from org.hibernate.dialect.Dialect:
addSqlHintOrCommentappendLockHintappendLockHintapplyLocksToSqlareStringComparisonsCaseInsensitiveaugmentPhysicalTableTypesaugmentRecognizedTableTypesbindLimitParametersFirstbindLimitParametersInReverseOrderbuildIdentifierHelperbuildSQLExceptionConversionDelegatebuildSQLExceptionConvertercanCreateCatalogcanCreateSchemacastcastcastcloseQuotecontributeTypesconvertToFirstRowValuecreateOuterJoinFragmentdefaultScrollModedoesReadCommittedCauseWritersToBlockReadersdoesRepeatableReadCauseReadersToBlockWritersequivalentTypesescapeCommentescapeLiteralforceLimitUsageforceLobAsLastValueforUpdateOfColumnsgetAddColumnSuffixStringgetAddUniqueConstraintStringgetAlterTableStringgetAuxiliaryDatabaseObjectExportergetCallableStatementSupportgetCascadeConstraintsStringgetCaseInsensitiveLikegetCastTypeNamegetColumnAliasExtractorgetColumnCommentgetCreateCatalogCommandgetCreateMultisetTableStringgetCreateSchemaCommandgetCreateSequenceStringgetCreateSequenceStringsgetCreateSequenceStringsgetCreateTableStringgetCreateTemporaryTableColumnAnnotationgetCrossJoinSeparatorgetCurrentSchemaCommandgetCurrentTimestampSelectStringgetCurrentTimestampSQLFunctionNamegetDefaultBatchLoadSizingStrategygetDefaultPropertiesgetDialectgetDialectgetDropCatalogCommandgetDropForeignKeyStringgetDropSchemaCommandgetDropSequenceStringsgetDropTableStringgetForeignKeyExportergetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateSkipLockedStringgetForUpdateSkipLockedStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFunctionsgetHibernateTypeNamegetHibernateTypeNamegetIdentityColumnSupportgetIndexExportergetInExpressionCountLimitgetKeywordsgetLimitHandlergetLimitStringgetLimitStringgetLobMergeStrategygetLockingStrategygetLowercaseFunctiongetMaxAliasLengthgetNameQualifierSupportgetNativeIdentifierGeneratorClassgetNativeIdentifierGeneratorStrategygetNoColumnsInsertStringgetNotExpressiongetQueryHintStringgetQueryHintStringgetReadLockStringgetReadLockStringgetResultSetgetResultSetgetResultSetgetSchemaNameResolvergetSelectClauseNullStringgetSelectGUIDStringgetSequenceExportergetSqlTypeDescriptorOverridegetTableCommentgetTableExportergetTableTypeStringgetTypeNamegetTypeNamegetUniqueDelegategetUniqueKeyExportergetViolatedConstraintNameExtractergetWriteLockStringgetWriteLockStringhasAlterTablehasSelfReferentialForeignKeyBuginlineLiteralisCurrentTimestampSelectStringCallableisJdbcLogWarningsEnabledByDefaultisLegacyLimitHandlerBehaviorEnabledisLockTimeoutParameterizedisTypeNameRegisteredopenQuoteprependCommentqualifyIndexNamequoteregisterColumnTyperegisterColumnTyperegisterFunctionregisterHibernateTyperegisterHibernateTyperegisterKeywordregisterResultSetOutParameterregisterResultSetOutParameterremapSqlTypeDescriptorrenderOrderByElementreplaceResultVariableInOrderByClauseWithPositionrequiresCastingOfParametersInSelectClauserequiresParensForTupleDistinctCountssupportsBindAsCallableArgumentsupportsCascadeDeletesupportsCaseInsensitiveLikesupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsCommentOnsupportsCurrentTimestampSelectionsupportsEmptyInListsupportsExistsInSelectsupportsExpectedLobUsagePatternsupportsIfExistsAfterAlterTablesupportsIfExistsAfterConstraintNamesupportsIfExistsAfterTableNamesupportsIfExistsBeforeConstraintNamesupportsIfExistsBeforeTableNamesupportsLimitsupportsLimitOffsetsupportsLobValueChangePropogationsupportsLockTimeoutssupportsNamedParameterssupportsNationalizedTypessupportsNoColumnsInsertsupportsNonQueryWithCTEsupportsNotNullUniquesupportsNoWaitsupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsPartitionBysupportsPooledSequencessupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsRowValueConstructorSyntaxsupportsRowValueConstructorSyntaxInInListsupportsRowValueConstructorSyntaxInSetsupportsSelectAliasInGroupByClausesupportsSkipLockedsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTupleCountssupportsTupleDistinctCountssupportsTuplesInSubqueriessupportsUnboundedLobLocatorMaterializationsupportsUnionAllsupportsUniquesupportsUniqueConstraintInCreateAlterTablesupportsValuesListsupportsVariableLimittoBooleanValueStringtoStringtransformSelectStringuseFollowOnLockinguseFollowOnLockinguseInputStreamToInsertBlobuseMaxForLimit

Constructor Detail

SAPDBDialectback to summary
public SAPDBDialect()

Constructs a SAPDBDialect

Method Detail

createCaseFragmentback to summary
public CaseFragment createCaseFragment()

Overrides org.hibernate.dialect.Dialect.createCaseFragment.

Doc from org.hibernate.dialect.Dialect.createCaseFragment.

Create a CaseFragment strategy responsible for handling this dialect's variations in how CASE statements are handled.

Returns:CaseFragment

This dialect's CaseFragment strategy.

Annotations
@Override
dropConstraintsback to summary
public boolean dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

Doc from org.hibernate.dialect.Dialect.dropConstraints.

Do we need to drop constraints before dropping tables in this dialect?

Returns:boolean

True if constraints must be dropped prior to dropping the table; false otherwise.

Annotations
@Override
getAddColumnStringback to summary
public String getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

Doc from org.hibernate.dialect.Dialect.getAddColumnString.

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

Returns:String

The "add column" fragment.

Annotations
@Override
getAddForeignKeyConstraintStringback to summary
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)

Overrides org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

Doc from org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

The syntax used to add a foreign key constraint to a table.

Parameters
constraintName:String

The FK constraint name.

foreignKey:String[]

The names of the columns comprising the FK

referencedTable:String

The table referenced by the FK

primaryKey:String[]

The explicit columns in the referencedTable referenced by this FK.

referencesPrimaryKey:boolean

if false, constraint should be explicit about which column names the constraint refers to

Returns:String

the "add FK" fragment

Annotations
@Override
getAddForeignKeyConstraintStringback to summary
public String getAddForeignKeyConstraintString(String constraintName, String foreignKeyDefinition)

Overrides org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

getAddPrimaryKeyConstraintStringback to summary
public String getAddPrimaryKeyConstraintString(String constraintName)

Overrides org.hibernate.dialect.Dialect.getAddPrimaryKeyConstraintString.

Doc from org.hibernate.dialect.Dialect.getAddPrimaryKeyConstraintString.

The syntax used to add a primary key constraint to a table.

Parameters
constraintName:String

The name of the PK constraint.

Returns:String

The "add PK" fragment

Annotations
@Override
getCreateSequenceStringback to summary
public String getCreateSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

Doc from org.hibernate.dialect.Dialect.getCreateSequenceString.

Typically dialects which support sequences can create a sequence with a single command. This is convenience form of getCreateSequenceStrings to help facilitate that.

Dialects which support sequences and can create a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to create a sequence should instead override getCreateSequenceStrings.

Parameters
sequenceName:String

The name of the sequence

Returns:String

The sequence creation command

Annotations
@Override
getDefaultMultiTableBulkIdStrategyback to summary
public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()

Overrides org.hibernate.dialect.Dialect.getDefaultMultiTableBulkIdStrategy.

Annotations
@Override
getDropSequenceStringback to summary
public String getDropSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

Doc from org.hibernate.dialect.Dialect.getDropSequenceString.

Typically dialects which support sequences can drop a sequence with a single command. This is convenience form of getDropSequenceStrings to help facilitate that.

Dialects which support sequences and can drop a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to drop a sequence should instead override getDropSequenceStrings.

Parameters
sequenceName:String

The name of the sequence

Returns:String

The sequence drop commands

Annotations
@Override
getNullColumnStringback to summary
public String getNullColumnString()

Overrides org.hibernate.dialect.Dialect.getNullColumnString.

Doc from org.hibernate.dialect.Dialect.getNullColumnString.

The keyword used to specify a nullable column.

Returns:String

String

Annotations
@Override
getQuerySequencesStringback to summary
public String getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Doc from org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.

Returns:String

The select command; or null if sequences are not supported.

Annotations
@Override
getSelectSequenceNextValStringback to summary
public String getSelectSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Doc from 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.

This differs from getSequenceNextValString(String) in that this should return an expression usable within another statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

The "nextval" fragment.

Annotations
@Override
getSequenceInformationExtractorback to summary
public SequenceInformationExtractor getSequenceInformationExtractor()

Overrides org.hibernate.dialect.Dialect.getSequenceInformationExtractor.

Annotations
@Override
getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

Doc from org.hibernate.dialect.Dialect.getSequenceNextValString.

Generate the appropriate select statement to to retrieve the next value of a sequence.

This should be a "stand alone" select statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

String The "nextval" select string.

Annotations
@Override
supportsJdbcConnectionLobCreationback to summary
public boolean supportsJdbcConnectionLobCreation(DatabaseMetaData databaseMetaData)

Overrides org.hibernate.dialect.Dialect.supportsJdbcConnectionLobCreation.

Doc from org.hibernate.dialect.Dialect.supportsJdbcConnectionLobCreation.

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

Parameters
databaseMetaData:DatabaseMetaData

JDBC DatabaseMetaData which can be used if LOB creation is supported only starting from a given Driver version

Returns:boolean

true if LOBs can be created via the JDBC Connection.

Annotations
@Override
supportsSequencesback to summary
public boolean supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Doc from org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?

Returns:boolean

True if sequences supported; false otherwise.

Annotations
@Override