public class

SAPDBDialect

extends Dialect
java.lang.Object
   ↳ org.hibernate.dialect.Dialect
     ↳ org.hibernate.dialect.SAPDBDialect

Class Overview

An SQL dialect compatible with SAP DB.

Summary

[Expand]
Inherited Constants
From class org.hibernate.dialect.Dialect
Public Constructors
SAPDBDialect()
Public Methods
CaseFragment createCaseFragment()
Create a CaseFragment strategy responsible for handling this dialect's variations in how CASE statements are handled.
boolean dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
String generateTemporaryTableName(String baseTableName)
Generate a temporary table name given the base table.
String getAddColumnString()
The syntax used to add a column to a table (optional).
String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
The syntax used to add a foreign key constraint to a table.
String getAddPrimaryKeyConstraintString(String constraintName)
The syntax used to add a primary key constraint to a table.
String getCreateSequenceString(String sequenceName)
Typically dialects which support sequences can create a sequence with a single command.
String getCreateTemporaryTablePostfix()
Get any fragments needing to be postfixed to the command for temporary table creation.
String getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence with a single command.
String getNullColumnString()
The keyword used to specify a nullable column.
String getQuerySequencesString()
Get the select command used retrieve the names of all sequences.
String getSelectSequenceNextValString(String sequenceName)
Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.
String getSequenceNextValString(String sequenceName)
Generate the appropriate select statement to to retrieve the next value of a sequence.
boolean supportsSequences()
Does this dialect support sequences?
boolean supportsTemporaryTables()
Does this dialect support temporary tables?
[Expand]
Inherited Methods
From class org.hibernate.dialect.Dialect
From class java.lang.Object

Public Constructors

public SAPDBDialect ()

Public Methods

public CaseFragment createCaseFragment ()

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

Returns

public boolean dropConstraints ()

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

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

public String generateTemporaryTableName (String baseTableName)

Generate a temporary table name given the base table.

Parameters
baseTableName The table name from which to base the temp table name.
Returns
  • The generated temp table name.

public String getAddColumnString ()

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

Returns
  • The "add column" fragment.

public String getAddForeignKeyConstraintString (String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)

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

Parameters
constraintName The FK constraint name.
foreignKey The names of the columns comprising the FK
referencedTable The table referenced by the FK
primaryKey The explicit columns in the referencedTable referenced by this FK.
referencesPrimaryKey if false, constraint should be explicit about which column names the constraint refers to
Returns
  • the "add FK" fragment

public String getAddPrimaryKeyConstraintString (String constraintName)

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

Parameters
constraintName The name of the PK constraint.
Returns
  • The "add PK" fragment

public String getCreateSequenceString (String sequenceName)

Typically dialects which support sequences can create a sequence with a single command. This is convenience form of getCreateSequenceStrings(String) 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(String).

Parameters
sequenceName The name of the sequence
Returns
  • The sequence creation command

public String getCreateTemporaryTablePostfix ()

Get any fragments needing to be postfixed to the command for temporary table creation.

Returns
  • Any required postfix.

public String getDropSequenceString (String sequenceName)

Typically dialects which support sequences can drop a sequence with a single command. This is convenience form of getDropSequenceStrings(String) 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(String).

Parameters
sequenceName The name of the sequence
Returns
  • The sequence drop commands

public String getNullColumnString ()

The keyword used to specify a nullable column.

Returns
  • String

public String getQuerySequencesString ()

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

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

public String getSelectSequenceNextValString (String sequenceName)

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 the name of the sequence
Returns
  • The "nextval" fragment.

public String getSequenceNextValString (String sequenceName)

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

This should be a "stand alone" select statement.

Parameters
sequenceName the name of the sequence
Returns
  • String The "nextval" select string.

public boolean supportsSequences ()

Does this dialect support sequences?

Returns
  • True if sequences supported; false otherwise.

public boolean supportsTemporaryTables ()

Does this dialect support temporary tables?

Returns
  • True if temp tables are supported; false otherwise.