org.hibernate.dialect
Class InformixDialect

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

public class InformixDialect
extends Dialect

Informix dialect.

Seems to work with Informix Dynamic Server Version 7.31.UD3, Informix JDBC driver version 2.21JC3.

Author:
Steve Molitor

Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, QUOTE
 
Constructor Summary
InformixDialect()
          Creates new InformixDialect instance.
 
Method Summary
 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 getCurrentTimestampSelectString()
           
 String getDropSequenceString(String sequenceName)
          The syntax used to drop a sequence, if sequences are supported.
 String getIdentityColumnString(int type)
          The keyword used to specify an identity column, if identity column key generation is supported.
 String getIdentitySelectString(String table, String column, int type)
          The syntax that returns the identity value of the last insert, if identity column key generation is supported.
 String getLimitString(String querySelect, int offset, int limit)
           
 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.
 ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
           
 boolean hasDataTypeInIdentityColumn()
          Whether this dialect have an Identity clause added to the data type or a completely seperate identity data type
 boolean isCurrentTimestampSelectStringCallable()
           
 boolean supportsCurrentTimestampSelection()
           
 boolean supportsIdentityColumns()
          Does this dialect support identity column key generation?
 boolean supportsLimit()
          Does this Dialect have some kind of LIMIT syntax?
 boolean supportsLimitOffset()
          Does this dialect support an offset?
 boolean supportsSequences()
          Does this dialect support sequences?
 boolean supportsVariableLimit()
           
 boolean useMaxForLimit()
          Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?
 
Methods inherited from class org.hibernate.dialect.Dialect
appendIdentitySelectToInsert, appendLockHint, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, createCaseFragment, createOuterJoinFragment, dropConstraints, dropTemporaryTableAfterUse, forUpdateOfColumns, generateTemporaryTableName, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateSequenceStrings, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getKeywords, getLimitString, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getQuerySequencesString, getResultSet, getSelectClauseNullString, getSelectGUIDString, getTableComment, getTableTypeString, getTypeName, getTypeName, hasAlterTable, hasSelfReferentialForeignKeyBug, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, supportsCascadeDelete, supportsColumnCheck, supportsCommentOn, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsTableCheck, supportsTemporaryTables, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InformixDialect

public InformixDialect()
Creates new InformixDialect instance. Sets up the JDBC / Informix type mappings.

Method Detail

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

supportsIdentityColumns

public boolean supportsIdentityColumns()
Description copied from class: Dialect
Does this dialect support identity column key generation?

Overrides:
supportsIdentityColumns in class Dialect
Returns:
boolean

getIdentitySelectString

public String getIdentitySelectString(String table,
                                      String column,
                                      int type)
                               throws MappingException
Description copied from class: Dialect
The syntax that returns the identity value of the last insert, if identity column key generation is supported.

Overrides:
getIdentitySelectString in class Dialect
Parameters:
type - TODO
Throws:
MappingException - if no native key generation

getIdentityColumnString

public String getIdentityColumnString(int type)
                               throws MappingException
Description copied from class: Dialect
The keyword used to specify an identity column, if identity column key generation is supported.

Overrides:
getIdentityColumnString in class Dialect
Parameters:
type - the SQL column type, as defined by java.sql.Types
Throws:
MappingException - if no native key generation

hasDataTypeInIdentityColumn

public boolean hasDataTypeInIdentityColumn()
Description copied from class: Dialect
Whether this dialect have an Identity clause added to the data type or a completely seperate identity data type

Overrides:
hasDataTypeInIdentityColumn in class Dialect
Returns:
boolean

getAddForeignKeyConstraintString

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. Informix constraint name must be at the end.

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)
The syntax used to add a primary key constraint to a table. Informix constraint name must be at the end.

Overrides:
getAddPrimaryKeyConstraintString in class Dialect
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

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

supportsSequences

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

Overrides:
supportsSequences in class Dialect
Returns:
boolean

supportsLimit

public boolean supportsLimit()
Description copied from class: Dialect
Does this Dialect have some kind of LIMIT syntax?

Overrides:
supportsLimit in class Dialect

useMaxForLimit

public boolean useMaxForLimit()
Description copied from class: Dialect
Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?

Overrides:
useMaxForLimit in class Dialect

supportsLimitOffset

public boolean supportsLimitOffset()
Description copied from class: Dialect
Does this dialect support an offset?

Overrides:
supportsLimitOffset in class Dialect

getLimitString

public String getLimitString(String querySelect,
                             int offset,
                             int limit)
Overrides:
getLimitString in class Dialect

supportsVariableLimit

public boolean supportsVariableLimit()
Overrides:
supportsVariableLimit in class Dialect

getViolatedConstraintNameExtracter

public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
Overrides:
getViolatedConstraintNameExtracter in class Dialect

supportsCurrentTimestampSelection

public boolean supportsCurrentTimestampSelection()
Overrides:
supportsCurrentTimestampSelection in class Dialect

isCurrentTimestampSelectStringCallable

public boolean isCurrentTimestampSelectStringCallable()
Overrides:
isCurrentTimestampSelectStringCallable in class Dialect

getCurrentTimestampSelectString

public String getCurrentTimestampSelectString()
Overrides:
getCurrentTimestampSelectString in class Dialect