HQDialect (Hyperic HQ Plugin API)
Keywords: org.hyperic.hibernate.dialect.HQDialect interface

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
Interface HQDialect

All Known Implementing Classes:
  MySQL5InnoDBDialect, Oracle9Dialect, PostgreSQLDialect

    public interface HQDialect

Method Summary
`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` | `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

Method Detail

### getOptimizeStmt

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

  Returns the table optimize statement for a particular database

  Parameters:
    `table` - - name of table
    `cost` - - based on the database, may be table percentage or random number

### useMetricUnion

    boolean useMetricUnion()

  Returns true if using the EAM_MEASUREMENT_DATA view instead of constructing it dynamically is optimal

### useEamNumbers

    boolean useEamNumbers()

  Returns true if using the EAM_NUMBERS table to iterate over a certain amount of time ranges is optimal for the database

### getMaxExpressions

    int getMaxExpressions()

  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

### supportsMultiInsertStmt

    boolean supportsMultiInsertStmt()

  Returns true if the database supports a multi insert stmt.

### getRegExSQL

    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.

  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

### supportsDuplicateInsertStmt

    boolean supportsDuplicateInsertStmt()

  Returns true if the database supports an insert stmt which updates when the unique key is violated

### tableExists

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

  Returns true if the database contains the specified tableName

  Throws:
    `java.sql.SQLException`

### getLimitString

    java.lang.String getLimitString(int num)

  Returns the limit string.

  Parameters:
    `num` - The number of rows to limit by.
  Returns:
    The limit string.

### viewExists

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

  Returns true if the database contains the specified viewName

  Throws:
    `java.sql.SQLException`

### usesSequenceGenerator

    boolean usesSequenceGenerator()

  If true, tells the ComboGenerator to use the SequenceGenerator, else uses the MultipleHiLoPerTableGenerator

### supportsPLSQL

    boolean supportsPLSQL()

  true if the database supports PL/SQL

### getLimitBuf

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

  Returns:
    the limit sql associated with the offset and limit params

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.