MySQL5InnoDBDialect (Hyperic HQ Plugin API)
Keywords: org.hyperic.hibernate.dialect.MySQL5InnoDBDialect class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hibernate.dialect
Class MySQL5InnoDBDialect

    java.lang.Object
      org.hibernate.dialect.Dialect
          org.hibernate.dialect.MySQLDialect
              org.hibernate.dialect.MySQL5Dialect
                  org.hibernate.dialect.MySQL5InnoDBDialect
                      org.hyperic.hibernate.dialect.MySQL5InnoDBDialect

All Implemented Interfaces:
  HQDialect

    public class MySQL5InnoDBDialect

extends org.hibernate.dialect.MySQL5InnoDBDialect
implements HQDialect

HQ's version of MySQL5InnoDBDialect to create pseudo sequences. This class must be public for Hibernate to access it.

Field Summary

Fields inherited from class org.hibernate.dialect.Dialect
`CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE`

Constructor Summary
`MySQL5InnoDBDialect()`

Method Summary
`java.lang.String` | `getAddForeignKeyConstraintString(java.lang.String constraintName, java.lang.String[] foreignKey, java.lang.String referencedTable, java.lang.String[] primaryKey, boolean referencesPrimaryKey)`
`java.util.Map` | `getLastData(java.sql.Connection conn, java.lang.String minMax, java.util.Map resMap, java.util.Map lastMap, java.lang.Integer[] iids, long begin, long end, java.lang.String table)`
`java.lang.String` | `getLimitBuf(java.lang.String sql, int offset, int limit)`
`java.lang.String` | `getLimitString(int num)` Returns the limit string.
`int` | `getMaxExpressions()` Returns -1 if Max Expressions supported in the db is unlimited.
`java.lang.String` | `getOptimizeStmt(java.lang.String table, int cost)` Returns the table optimize statement for a particular database
`java.lang.String` | `getRegExSQL(java.lang.String column, java.lang.String regex, boolean ignoreCase, boolean invertMatch)` Returns a db specific SQL syntax for a POSIX style Regular Expression.
`boolean` | `supportsDuplicateInsertStmt()` Returns true if the database supports an insert stmt which updates when the unique key is violated
`boolean` | `supportsIdentityColumns()`
`boolean` | `supportsInsertSelectIdentity()`
`boolean` | `supportsMultiInsertStmt()` Returns true if the database supports a multi insert stmt.
`boolean` | `supportsPLSQL()` true if the database supports PL/SQL
`boolean` | `tableExists(java.sql.Statement stmt, java.lang.String tableName)` Returns true if the database contains the specified tableName
`boolean` | `useEamNumbers()` Returns true if using the EAM_NUMBERS table to iterate over a certain amount of time ranges is optimal for the database
`boolean` | `useMetricUnion()` Returns true if using the EAM_MEASUREMENT_DATA view instead of constructing it dynamically is optimal
`boolean` | `usesSequenceGenerator()` If true, tells the ComboGenerator to use the SequenceGenerator, else uses the MultipleHiLoPerTableGenerator
`boolean` | `viewExists(java.sql.Statement stmt, java.lang.String viewName)` Returns true if the database contains the specified viewName

Methods inherited from class org.hibernate.dialect.MySQL5InnoDBDialect
`getTableTypeString, hasSelfReferentialForeignKeyBug, supportsCascadeDelete`

Methods inherited from class org.hibernate.dialect.MySQL5Dialect
`registerVarcharTypes`

Methods inherited from class org.hibernate.dialect.MySQLDialect
`areStringComparisonsCaseInsensitive, closeQuote, getAddColumnString, getCastTypeName, getColumnComment, getCreateTemporaryTableString, getCurrentTimestampSelectString, getDropForeignKeyString, getIdentityColumnString, getIdentitySelectString, getLimitString, getResultSet, getSelectGUIDString, getTableComment, isCurrentTimestampSelectStringCallable, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, registerResultSetOutParameter, supportsCurrentTimestampSelection, supportsEmptyInList, supportsIfExistsBeforeTableName, supportsLimit, supportsLobValueChangePropogation, supportsRowValueConstructorSyntax, supportsSubqueryOnMutatingTable, supportsTemporaryTables`

Methods inherited from class org.hibernate.dialect.Dialect
`appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, createCaseFragment, createOuterJoinFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, dropTemporaryTableAfterUse, forUpdateOfColumns, generateTemporaryTableName, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTablePostfix, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropSequenceString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getKeywords, getLimitString, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getQuerySequencesString, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceNextValString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, supportsBindAsCallableArgument, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterTableName, supportsLimitOffset, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsUnboundedLobLocatorMaterialization, 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

### MySQL5InnoDBDialect

    public MySQL5InnoDBDialect()

Method Detail

### supportsIdentityColumns

    public boolean supportsIdentityColumns()

  Overrides:
    `supportsIdentityColumns` in class `org.hibernate.dialect.MySQLDialect`

### supportsInsertSelectIdentity

    public boolean supportsInsertSelectIdentity()

  Overrides:
    `supportsInsertSelectIdentity` in class `org.hibernate.dialect.Dialect`

### getOptimizeStmt

    public java.lang.String getOptimizeStmt(java.lang.String table,
                                            int cost)

  Description copied from interface: `HQDialect`
  Returns the table optimize statement for a particular database

  Specified by:
    `getOptimizeStmt` in interface `HQDialect`
  Parameters:
    `table` - - name of table
    `cost` - - based on the database, may be table percentage or random number

### supportsDuplicateInsertStmt

    public boolean supportsDuplicateInsertStmt()

  Description copied from interface: `HQDialect`
  Returns true if the database supports an insert stmt which updates when the unique key is violated

  Specified by:
    `supportsDuplicateInsertStmt` in interface `HQDialect`

### supportsMultiInsertStmt

    public boolean supportsMultiInsertStmt()

  Description copied from interface: `HQDialect`
  Returns true if the database supports a multi insert stmt.

  Specified by:
    `supportsMultiInsertStmt` in interface `HQDialect`

### viewExists

    public boolean viewExists(java.sql.Statement stmt,
                              java.lang.String viewName)
                       throws java.sql.SQLException

  Description copied from interface: `HQDialect`
  Returns true if the database contains the specified viewName

  Specified by:
    `viewExists` in interface `HQDialect`
  Throws:
    `java.sql.SQLException`

### tableExists

    public boolean tableExists(java.sql.Statement stmt,
                               java.lang.String tableName)
                        throws java.sql.SQLException

  Description copied from interface: `HQDialect`
  Returns true if the database contains the specified tableName

  Specified by:
    `tableExists` in interface `HQDialect`
  Throws:
    `java.sql.SQLException`

### getLimitBuf

    public java.lang.String getLimitBuf(java.lang.String sql,
                                        int offset,
                                        int limit)

  Specified by:
    `getLimitBuf` in interface `HQDialect`
  Returns:
    the limit sql associated with the offset and limit params

### getLimitString

    public java.lang.String getLimitString(int num)

  Description copied from interface: `HQDialect`
  Returns the limit string.

  Specified by:
    `getLimitString` in interface `HQDialect`
  Parameters:
    `num` - The number of rows to limit by.
  Returns:
    The limit string.

### getLastData

    public java.util.Map getLastData(java.sql.Connection conn,
                                     java.lang.String minMax,
                                     java.util.Map resMap,
                                     java.util.Map lastMap,
                                     java.lang.Integer[] iids,
                                     long begin,
                                     long end,
                                     java.lang.String table)
                              throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### getAddForeignKeyConstraintString

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

  Overrides:
    `getAddForeignKeyConstraintString` in class `org.hibernate.dialect.MySQLDialect`

### usesSequenceGenerator

    public boolean usesSequenceGenerator()

  Description copied from interface: `HQDialect`
  If true, tells the ComboGenerator to use the SequenceGenerator, else uses the MultipleHiLoPerTableGenerator

  Specified by:
    `usesSequenceGenerator` in interface `HQDialect`

### getRegExSQL

    public java.lang.String getRegExSQL(java.lang.String column,
                                        java.lang.String regex,
                                        boolean ignoreCase,
                                        boolean invertMatch)

  Description copied from interface: `HQDialect`
  Returns a db specific SQL syntax for a POSIX style Regular Expression.

  Specified by:
    `getRegExSQL` in interface `HQDialect`
  Parameters:
    `column` - - the column to match against
    `regex` - - the POSIX style regex. The param passed in allows for prepared statement type syntax. If that is not desired put quotes around the value to ensure the SQL will not fail.
    `ignoreCase` - - similar to grep -i
    `invertMatch` - - similar to grep -v

### useEamNumbers

    public boolean useEamNumbers()

  Description copied from interface: `HQDialect`
  Returns true if using the EAM_NUMBERS table to iterate over a certain amount of time ranges is optimal for the database

  Specified by:
    `useEamNumbers` in interface `HQDialect`

### getMaxExpressions

    public int getMaxExpressions()

  Description copied from interface: `HQDialect`
  Returns -1 if Max Expressions supported in the db is unlimited. This applies mainly to SQL in statements e.g. where ids in (0, 1, 2,...) Or a sequence of SQL 'and' or 'or' statements in one statement

  Specified by:
    `getMaxExpressions` in interface `HQDialect`

### supportsPLSQL

    public boolean supportsPLSQL()

  Description copied from interface: `HQDialect`
  true if the database supports PL/SQL

  Specified by:
    `supportsPLSQL` in interface `HQDialect`

### useMetricUnion

    public boolean useMetricUnion()

  Description copied from interface: `HQDialect`
  Returns true if using the EAM_MEASUREMENT_DATA view instead of constructing it dynamically is optimal

  Specified by:
    `useMetricUnion` in interface `HQDialect`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.