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.firebird
Class FirebirdModelReader

    java.lang.Object
      org.apache.ddlutils.platform.JdbcModelReader
          org.apache.ddlutils.platform.firebird.FirebirdModelReader

    public class FirebirdModelReader

extends JdbcModelReader

The Jdbc Model Reader for Firebird.

Version:
  $Revision: $

Constructor Summary
`FirebirdModelReader(Platform platform)` Creates a new model reader for Firebird databases.

Method Summary
`protected void` | `determineAutoIncrementColumns(Table table)` Helper method that determines the auto increment status using Firebird's system tables.
`String` | `determineSchemaOf(Connection connection, String schemaPattern, Table table)` Tries to find the schema to which the given table belongs.
`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.
`protected Collection` | `readColumns(DatabaseMetaDataWrapper metaData, String tableName)` Reads the column definitions for the indicated table.
`protected Collection` | `readForeignKeys(DatabaseMetaDataWrapper metaData, String tableName)` Retrieves the foreign keys of the indicated table.
`protected Collection` | `readIndices(DatabaseMetaDataWrapper metaData, String tableName)` Determines the indices for the indicated table.
`protected Collection` | `readPrimaryKeyNames(DatabaseMetaDataWrapper metaData, String tableName)` Retrieves the names of the columns that make up the primary key for a given table.
`protected Table` | `readTable(DatabaseMetaDataWrapper metaData, Map values)` Reads the next table from the meta data.

Methods inherited from class org.apache.ddlutils.platform.JdbcModelReader
`determineAutoIncrementFromResultSetMetaData, getColumnsForColumn, getColumnsForFK, getColumnsForIndex, getColumnsForPK, getColumnsForTable, getConnection, getDatabase, getDatabase, getDefaultCatalogPattern, getDefaultColumnPattern, getDefaultSchemaPattern, getDefaultTablePattern, getDefaultTableTypes, getPlatform, getPlatformInfo, initColumnsForColumn, initColumnsForFK, initColumnsForIndex, initColumnsForPK, initColumnsForTable, matches, readColumns, readForeignKey, readIndex, readPrimaryKeyName, 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

### FirebirdModelReader

    public FirebirdModelReader(Platform platform)

  Creates a new model reader for Firebird databases.

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

Method Detail

### readTable

    protected Table readTable(DatabaseMetaDataWrapper metaData,
                              Map values)
                       throws SQLException

  Reads the next table from the meta data.

  Overrides:
    `readTable` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `values` - The table metadata values as defined by `JdbcModelReader.getColumnsForTable()`
  Returns:
    The table or `null` if the result set row did not contain a valid table
  Throws:
    `SQLException`

### readColumns

    protected Collection readColumns(DatabaseMetaDataWrapper metaData,
                                     String tableName)
                              throws SQLException

  Reads the column definitions for the indicated table.

  Overrides:
    `readColumns` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `tableName` - The name of the table
  Returns:
    The columns
  Throws:
    `SQLException`

### 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`

### determineAutoIncrementColumns

    protected void determineAutoIncrementColumns(Table table)
                                          throws SQLException

  Helper method that determines the auto increment status using Firebird's system tables.

  Parameters:
    `table` - The table
  Throws:
    `SQLException`

### readPrimaryKeyNames

    protected Collection readPrimaryKeyNames(DatabaseMetaDataWrapper metaData,
                                             String tableName)
                                      throws SQLException

  Retrieves the names of the columns that make up the primary key for a given table.

  Overrides:
    `readPrimaryKeyNames` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `tableName` - The name of the table from which to retrieve PK information
  Returns:
    The primary key column names
  Throws:
    `SQLException`

### readForeignKeys

    protected Collection readForeignKeys(DatabaseMetaDataWrapper metaData,
                                         String tableName)
                                  throws SQLException

  Retrieves the foreign keys of the indicated table.

  Overrides:
    `readForeignKeys` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `tableName` - The name of the table from which to retrieve FK information
  Returns:
    The foreign keys
  Throws:
    `SQLException`

### readIndices

    protected Collection readIndices(DatabaseMetaDataWrapper metaData,
                                     String tableName)
                              throws SQLException

  Determines the indices for the indicated table.

  Overrides:
    `readIndices` in class `JdbcModelReader`
  Parameters:
    `metaData` - The database meta data
    `tableName` - The name of the table
  Returns:
    The list of indices
  Throws:
    `SQLException`

### isInternalPrimaryKeyIndex

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

  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
  Throws:
    `SQLException`

### isInternalForeignKeyIndex

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

  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
  Throws:
    `SQLException`

### determineSchemaOf

    public String determineSchemaOf(Connection connection,
                                    String schemaPattern,
                                    Table table)
                             throws SQLException

  Tries to find the schema to which the given table belongs.

  Overrides:
    `determineSchemaOf` in class `JdbcModelReader`
  Parameters:
    `connection` - The database connection
    `schemaPattern` - The schema pattern to limit the schemas to search in
    `table` - The table to search for
  Returns:
    The schema name or `null` if the schema of the table could not be found
  Throws:
    `SQLException`

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.