Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ddlutils.platform.derby
Class DerbyModelReader

    java.lang.Object
      org.apache.ddlutils.platform.JdbcModelReader
          org.apache.ddlutils.platform.derby.DerbyModelReader

    public class DerbyModelReader

extends JdbcModelReader

Reads a database model from a Derby database.

Version:
  $Revision: $

Constructor Summary
`DerbyModelReader(Platform platform)` Creates a new model reader for Derby databases.

Method Summary
`protected boolean` | `isInternalForeignKeyIndex(DatabaseMetaDataWrapper metaData, Table table, ForeignKey fk, Index index)` Tries to determine whether the index is the internal database-generated index for the given foreign key.
`protected boolean` | `isInternalPrimaryKeyIndex(DatabaseMetaDataWrapper metaData, Table table, Index index)` Tries to determine whether the index is the internal database-generated index for the given table's primary key.
`protected Column` | `readColumn(DatabaseMetaDataWrapper metaData, Map values)` Extracts a column definition from the result set.

Methods inherited from class org.apache.ddlutils.platform.JdbcModelReader
`determineAutoIncrementFromResultSetMetaData, determineSchemaOf, getColumnsForColumn, getColumnsForFK, getColumnsForIndex, getColumnsForPK, getColumnsForTable, getConnection, getDatabase, getDatabase, getDefaultCatalogPattern, getDefaultColumnPattern, getDefaultSchemaPattern, getDefaultTablePattern, getDefaultTableTypes, getPlatform, getPlatformInfo, initColumnsForColumn, initColumnsForFK, initColumnsForIndex, initColumnsForPK, initColumnsForTable, matches, readColumns, readColumns, readForeignKey, readForeignKeys, readIndex, readIndices, readPrimaryKeyName, readPrimaryKeyNames, readTable, readTables, removeInternalForeignKeyIndex, removeInternalPrimaryKeyIndex, removeSystemIndices, setDefaultCatalogPattern, setDefaultColumnPattern, setDefaultSchemaPattern, setDefaultTablePattern, setDefaultTableTypes, sortForeignKeys, unescape`

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

Constructor Detail

### DerbyModelReader

    public DerbyModelReader(Platform platform)

  Creates a new model reader for Derby databases.

  Parameters:
    `platform` - The platform that this model reader belongs to

Method Detail

### readColumn

    protected Column readColumn(DatabaseMetaDataWrapper metaData,
                                Map values)
                         throws SQLException

  Extracts a column definition from the result set.

  Overrides:
    `readColumn` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `values` - The column meta data values as defined by `JdbcModelReader.getColumnsForColumn()`
  Returns:
    The column
  Throws:
    `SQLException`

### isInternalForeignKeyIndex

    protected boolean isInternalForeignKeyIndex(DatabaseMetaDataWrapper metaData,
                                                Table table,
                                                ForeignKey fk,
                                                Index index)

  Tries to determine whether the index is the internal database-generated index for the given foreign key. Note that only non-unique indices with the correct columns are fed to this method. Redefine this method for specific platforms if there are better ways to determine internal indices.

  Overrides:
    `isInternalForeignKeyIndex` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `table` - The table owning the index and foreign key
    `fk` - The foreign key
    `index` - The index to check
  Returns:
    `true` if the index seems to be an internal primary key one

### isInternalPrimaryKeyIndex

    protected boolean isInternalPrimaryKeyIndex(DatabaseMetaDataWrapper metaData,
                                                Table table,
                                                Index index)

  Tries to determine whether the index is the internal database-generated index for the given table's primary key. Note that only unique indices with the correct columns are fed to this method. Redefine this method for specific platforms if there are better ways to determine internal indices.

  Overrides:
    `isInternalPrimaryKeyIndex` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `table` - The table owning the index
    `index` - The index to check
  Returns:
    `true` if the index seems to be an internal primary key one

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.