org.hibernate.dialect
Class SAPDBDialect

java.lang.Object
  extended byorg.hibernate.dialect.Dialect
      extended byorg.hibernate.dialect.SAPDBDialect

public class SAPDBDialect
extends Dialect

An SQL dialect compatible with SAP DB.

Author:
Brad Clow

Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, QUOTE
 
Constructor Summary
SAPDBDialect()
           
 
Method Summary
 CaseFragment createCaseFragment()
          Create a CaseFragment for this dialect.
 JoinFragment createOuterJoinFragment()
          Create an OuterJoinGenerator for this dialect.
 boolean dropConstraints()
          Do we need to drop constraints before dropping tables in this dialect?
 String generateTemporaryTableName(String baseTableName)
           
 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)
          The syntax used to create a sequence, if sequences are supported.
 String getCreateTemporaryTablePostfix()
           
 String getDropSequenceString(String sequenceName)
          The syntax used to drop a sequence, if sequences are supported.
 String getNullColumnString()
          The keyword used to specify a nullable column.
 String getQuerySequencesString()
          A query used to find all sequences
 String getSelectSequenceNextValString(String sequenceName)
          Generate the select expression fragment that will retreive the next value of a sequence, if sequences are supported.
 String getSequenceNextValString(String sequenceName)
          Generate the appropriate select statement to to retreive the next value of a sequence, if sequences are supported.
 boolean supportsSequences()
          Does this dialect support sequences?
 boolean supportsTemporaryTables()
           
 
Methods inherited from class org.hibernate.dialect.Dialect
appendIdentitySelectToInsert, appendLockHint, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, dropTemporaryTableAfterUse, forUpdateOfColumns, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateSequenceStrings, getCreateTemporaryTableString, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLimitString, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getResultSet, getSelectClauseNullString, getSelectGUIDString, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, supportsCascadeDelete, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimit, supportsLimitOffset, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsTableCheck, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob, useMaxForLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SAPDBDialect

public SAPDBDialect()
Method Detail

dropConstraints

public boolean dropConstraints()
Description copied from class: Dialect
Do we need to drop constraints before dropping tables in this dialect?

Overrides:
dropConstraints in class Dialect
Returns:
boolean

getAddColumnString

public String getAddColumnString()
Description copied from class: Dialect
The syntax used to add a column to a table (optional).

Overrides:
getAddColumnString in class Dialect

getAddForeignKeyConstraintString

public String getAddForeignKeyConstraintString(String constraintName,
                                               String[] foreignKey,
                                               String referencedTable,
                                               String[] primaryKey,
                                               boolean referencesPrimaryKey)
Description copied from class: Dialect
The syntax used to add a foreign key constraint to a table.

Overrides:
getAddForeignKeyConstraintString in class Dialect
Parameters:
referencesPrimaryKey - if false, constraint should be explicit about which column names the constraint refers to
Returns:
String

getAddPrimaryKeyConstraintString

public String getAddPrimaryKeyConstraintString(String constraintName)
Description copied from class: Dialect
The syntax used to add a primary key constraint to a table.

Overrides:
getAddPrimaryKeyConstraintString in class Dialect
Returns:
String

getNullColumnString

public String getNullColumnString()
Description copied from class: Dialect
The keyword used to specify a nullable column.

Overrides:
getNullColumnString in class Dialect
Returns:
String

getSequenceNextValString

public String getSequenceNextValString(String sequenceName)
Description copied from class: Dialect
Generate the appropriate select statement to to retreive the next value of a sequence, if sequences are supported.

This should be a "stand alone" select statement.

Overrides:
getSequenceNextValString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String The "nextval" select string.

getSelectSequenceNextValString

public String getSelectSequenceNextValString(String sequenceName)
Description copied from class: Dialect
Generate the select expression fragment that will retreive the next value of a sequence, if sequences are supported.

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

Overrides:
getSelectSequenceNextValString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String

getCreateSequenceString

public String getCreateSequenceString(String sequenceName)
Description copied from class: Dialect
The syntax used to create a sequence, if sequences are supported.

Overrides:
getCreateSequenceString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String

getDropSequenceString

public String getDropSequenceString(String sequenceName)
Description copied from class: Dialect
The syntax used to drop a sequence, if sequences are supported.

Overrides:
getDropSequenceString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String

getQuerySequencesString

public String getQuerySequencesString()
Description copied from class: Dialect
A query used to find all sequences

Overrides:
getQuerySequencesString in class Dialect
See Also:
SchemaUpdate

createOuterJoinFragment

public JoinFragment createOuterJoinFragment()
Description copied from class: Dialect
Create an OuterJoinGenerator for this dialect.

Overrides:
createOuterJoinFragment in class Dialect
Returns:
OuterJoinGenerator

supportsSequences

public boolean supportsSequences()
Description copied from class: Dialect
Does this dialect support sequences?

Overrides:
supportsSequences in class Dialect
Returns:
boolean

createCaseFragment

public CaseFragment createCaseFragment()
Description copied from class: Dialect
Create a CaseFragment for this dialect.

Overrides:
createCaseFragment in class Dialect
Returns:
OuterJoinGenerator

supportsTemporaryTables

public boolean supportsTemporaryTables()
Overrides:
supportsTemporaryTables in class Dialect

getCreateTemporaryTablePostfix

public String getCreateTemporaryTablePostfix()
Overrides:
getCreateTemporaryTablePostfix in class Dialect

generateTemporaryTableName

public String generateTemporaryTableName(String baseTableName)
Overrides:
generateTemporaryTableName in class Dialect