Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.impl.jdbc.schema.dict
Class MySQLDictionary

    java.lang.Object
      |
      +--com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
            |
            +--com.solarmetric.kodo.impl.jdbc.schema.dict.MySQLDictionary

All Implemented Interfaces:
  DBDictionary

public class MySQLDictionary
extends AbstractDictionary

Implementation of the DBDictionary interface for MySQL.

Fields inherited from class com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
`CENTI, DECI, meta, MICRO, MILLI, NANO, NUMBER_FORMAT, SEC`

Constructor Summary
`MySQLDictionary()`

Method Summary
`Object` | `blobFromSQL(ResultSet rs, int column)` Convert the specified column of the SQL ResultSet to the proper java type.
`protected SQLBuffer` | `getColumnDeclaration(Column column)` This method can be overridden if the database does not support standard column declarations, which are in the form: `<column-name> <sql-type> [NOT NULL]`.
`SQLBuffer[]` | `getCreateTableSQL(Table table)` Override the standard create table SQL to add a table type.
`protected SQLBuffer` | `getDropIndexSQL(Index index)` Return the SQL to drop an index.
`long` | `getNextAutoIncrementValue(Table table, SQLExecutionManager sqlem)` Returns the next auto-increment value for a given table.
`String` | `getPlatform()` Return the title of this database platform, used for display only.
`boolean` | `getSupportsSelectForUpdate()` Return whether this version of MySQL supports the 'SELECT FOR UPDATE' SQL clause.
`String` | `getTableType()` Return the MySQL table type to use when creating tables.
`void` | `setSupportsSelectForUpdate(boolean supports)` Set whether this version of MySQL supports the 'SELECT FOR UPDATE' SQL clause.
`void` | `setTableType(String tableType)` Set the MySQL table type to use when creating tables.
`protected void` | `setupSQLTypeMap(SQLTypeMap map)` This is the most commonly overridden method when porting to a new database.
`String` | `stringToSQL(String string)` Called from the `toSQL` method for Strings; by defualt escapes all single quote characters with another single quote.
`boolean` | `supportsAutoIncrement()` Returns `true` if this dictionary / database combination supports auto-incrementing primary-key columns.
`boolean` | `supportsLocking()` Returns whether or not this database supports locking (e.g., FOR UPDATE clause in SELECT).

Methods inherited from class com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
`, addForUpdateClause, bigDecimalFromSQL, bigDecimalToPreparedParameter, bigDecimalToSQL, bigIntegerFromSQL, bigIntegerToPreparedParameter, bigIntegerToSQL, blobToPreparedParameter, blobToSQL, booleanFromSQL, booleanToPreparedParameter, booleanToSQL, byteFromSQL, byteToPreparedParameter, byteToSQL, characterToPreparedParameter, charFromSQL, charToSQL, clobFromSQL, clobToPreparedParameter, clobToSQL, colsToString, createdSQLExecutionManager, dateFromSQL, dateToPreparedParameter, dateToSQL, dateToTimestamp, deserialize, deserialize, doubleFromSQL, doubleToPreparedParameter, doubleToSQL, dropTableDropsIndices, floatFromSQL, floatToPreparedParameter, floatToSQL, fromSQL, getAddColumnSQL, getClassMappingCandidateClasses, getColumns, getCreateIndexSQL, getCreateTableSuffix, getDatePrecision, getDBMetaData, getDropColumnSQL, getDropTableSQL, getFieldMappingCandidateClasses, getMaxColumnNameLength, getMaxIndexNameLength, getMaxTableNameLength, getNameTruncationVersion, getNonSQL92LeftOuterJoin, getPrimaryKeyClause, getQuoteNumbers, getSchemaName, getSimulateLocking, getSQLTypeMap, getStoreCharsAsStrings, getStoreLargeNumbersAsStrings, getSupportedResultSetType, getTables, getValidateConnections, getValidateConnectionSQL, getValidColumnName, getValidIndexName, getValidTableName, initTypeMap, intFromSQL, intToPreparedParameter, intToSQL, isClosed, localeFromSQL, localeToPreparedParameter, localeToSQL, longFromSQL, longToPreparedParameter, longToSQL, objectFromSQL, objectToPreparedParameter, objectToSQL, prepareLargeNumberAsString, prepareStatement, serialize, setColumnNameGenerator, setCreateTableSuffix, setDBMetaData, setIndexNameGenerator, setMaxColumnNameLength, setMaxIndexNameLength, setMaxTableNameLength, setNameTruncationVersion, setNullParameter, setQuoteNumbers, setSchemaName, setSimulateLocking, setStoreCharsAsStrings, setStoreLargeNumbersAsStrings, setTableNameGenerator, setTransactionIsolation, setValidateConnections, setValidateConnectionSQL, shortFromSQL, shortToPreparedParameter, shortToSQL, stringFromSQL, stringToPreparedParameter, supportsNonSQL92LeftOuterJoins, supportsUpdateCountsForBatch, tablesToString, timestampFromSQL, toPreparedParameter, toSelect, toSelect, toSelect, toSQL, truncate, truncate, validateConfiguration`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MySQLDictionary

    public MySQLDictionary()

Method Detail

### getSupportsSelectForUpdate

    public boolean getSupportsSelectForUpdate()

  Return whether this version of MySQL supports the 'SELECT FOR UPDATE' SQL clause.

### supportsLocking

    public boolean supportsLocking()

  Description copied from interface: `DBDictionary`
  Returns whether or not this database supports locking (e.g., FOR UPDATE clause in SELECT).
  Overrides:
    `supportsLocking` in class `AbstractDictionary`

### setSupportsSelectForUpdate

    public void setSupportsSelectForUpdate(boolean supports)

  Set whether this version of MySQL supports the 'SELECT FOR UPDATE' SQL clause. Defaults to true.

### getTableType

    public String getTableType()

  Return the MySQL table type to use when creating tables.

### setTableType

    public void setTableType(String tableType)

  Set the MySQL table type to use when creating tables. Defaults to null, in which case the default table type will be used.

### getPlatform

    public String getPlatform()

  Description copied from class: `AbstractDictionary`
  Return the title of this database platform, used for display only.
  Overrides:
    `getPlatform` in class `AbstractDictionary`

### getCreateTableSQL

    public SQLBuffer[] getCreateTableSQL(Table table)

  Override the standard create table SQL to add a table type.
  Overrides:
    `getCreateTableSQL` in class `AbstractDictionary`

### blobFromSQL

    public Object blobFromSQL(ResultSet rs,
                              int column)
                       throws SQLException

  Description copied from interface: `DBDictionary`
  Convert the specified column of the SQL ResultSet to the proper java type.
  Overrides:
    `blobFromSQL` in class `AbstractDictionary`

### stringToSQL

    public String stringToSQL(String string)

  Description copied from class: `AbstractDictionary`
  Called from the `toSQL` method for Strings; by defualt escapes all single quote characters with another single quote.
  Overrides:
    `stringToSQL` in class `AbstractDictionary`

### setupSQLTypeMap

    protected void setupSQLTypeMap(SQLTypeMap map)

  Description copied from class: `AbstractDictionary`
  This is the most commonly overridden method when porting to a new database. Most databases have different mappings between java and SQL types; this method can be used to setup the mappings for the database being ported.
  Overrides:
    `setupSQLTypeMap` in class `AbstractDictionary`

### getDropIndexSQL

    protected SQLBuffer getDropIndexSQL(Index index)

  Description copied from class: `AbstractDictionary`
  Return the SQL to drop an index. Defaults to: `DROP INDEX <index-name>`
  Overrides:
    `getDropIndexSQL` in class `AbstractDictionary`

### supportsAutoIncrement

    public boolean supportsAutoIncrement()

  Description copied from interface: `DBDictionary`
  Returns `true` if this dictionary / database combination supports auto-incrementing primary-key columns.
  Overrides:
    `supportsAutoIncrement` in class `AbstractDictionary`

### getNextAutoIncrementValue

    public long getNextAutoIncrementValue(Table table,
                                          SQLExecutionManager sqlem)
                                   throws SQLException

  Description copied from interface: `DBDictionary`
  Returns the next auto-increment value for a given table.
  Overrides:
    `getNextAutoIncrementValue` in class `AbstractDictionary`

### getColumnDeclaration

    protected SQLBuffer getColumnDeclaration(Column column)

  Description copied from class: `AbstractDictionary`
  This method can be overridden if the database does not support standard column declarations, which are in the form: `<column-name> <sql-type> [NOT NULL]`. Where NOT NULL is appended if it is a primary key column.
  Overrides:
    `getColumnDeclaration` in class `AbstractDictionary`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.