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
Class DatabaseMetaDataWrapper

    java.lang.Object
      org.apache.ddlutils.platform.DatabaseMetaDataWrapper

    public class DatabaseMetaDataWrapper

extends Object

Wrapper class for database meta data that stores additional info.

Version:
  $Revision: 329426 $

Constructor Summary
`DatabaseMetaDataWrapper()`

Method Summary
`String` | `getCatalog()` Returns the catalog in the database to read.
`ResultSet` | `getColumns(String tableNamePattern, String columnNamePattern)` Convenience method to return the column meta data using the configured catalog and schema pattern.
`ResultSet` | `getForeignKeys(String tableNamePattern)` Convenience method to return the foreign key meta data using the configured catalog and schema pattern.
`ResultSet` | `getIndices(String tableNamePattern, boolean unique, boolean approximate)` Convenience method to return the index meta data using the configured catalog and schema pattern.
`DatabaseMetaData` | `getMetaData()` Returns the database meta data.
`ResultSet` | `getPrimaryKeys(String tableNamePattern)` Convenience method to return the primary key meta data using the configured catalog and schema pattern.
`String` | `getSchemaPattern()` Returns the schema in the database to read.
`ResultSet` | `getTables(String tableNamePattern)` Convenience method to return the table meta data using the configured catalog, schema pattern and table types.
`String[]` | `getTableTypes()` Returns the table types to recognize.
`void` | `setCatalog(String catalog)` Sets the catalog in the database to read.
`void` | `setMetaData(DatabaseMetaData metaData)` Sets the database meta data.
`void` | `setSchemaPattern(String schema)` Sets the schema in the database to read.
`void` | `setTableTypes(String[] types)` Sets the table types to recognize.

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

Constructor Detail

### DatabaseMetaDataWrapper

    public DatabaseMetaDataWrapper()

Method Detail

### getMetaData

    public DatabaseMetaData getMetaData()

  Returns the database meta data.

  Returns:
    The meta data

### setMetaData

    public void setMetaData(DatabaseMetaData metaData)

  Sets the database meta data.

  Parameters:
    `metaData` - The meta data

### getCatalog

    public String getCatalog()

  Returns the catalog in the database to read.

  Returns:
    The catalog

### setCatalog

    public void setCatalog(String catalog)

  Sets the catalog in the database to read.

  Parameters:
    `catalog` - The catalog

### getSchemaPattern

    public String getSchemaPattern()

  Returns the schema in the database to read.

  Returns:
    The schema

### setSchemaPattern

    public void setSchemaPattern(String schema)

  Sets the schema in the database to read.

  Parameters:
    `schema` - The schema

### getTableTypes

    public String[] getTableTypes()

  Returns the table types to recognize.

  Returns:
    The table types

### setTableTypes

    public void setTableTypes(String[] types)

  Sets the table types to recognize.

  Parameters:
    `types` - The table types

### getTables

    public ResultSet getTables(String tableNamePattern)
                        throws SQLException

  Convenience method to return the table meta data using the configured catalog, schema pattern and table types.

  Parameters:
    `tableNamePattern` - The pattern identifying for which tables to return info
  Returns:
    The table meta data
  Throws:
    `SQLException` - If an error occurred retrieving the meta data
  See Also:
    `DatabaseMetaData.getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])`

### getColumns

    public ResultSet getColumns(String tableNamePattern,
                                String columnNamePattern)
                         throws SQLException

  Convenience method to return the column meta data using the configured catalog and schema pattern.

  Parameters:
    `tableNamePattern` - The pattern identifying for which tables to return info
    `columnNamePattern` - The pattern identifying for which columns to return info
  Returns:
    The column meta data
  Throws:
    `SQLException` - If an error occurred retrieving the meta data
  See Also:
    `DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

### getPrimaryKeys

    public ResultSet getPrimaryKeys(String tableNamePattern)
                             throws SQLException

  Convenience method to return the primary key meta data using the configured catalog and schema pattern.

  Parameters:
    `tableNamePattern` - The pattern identifying for which tables to return info
  Returns:
    The primary key meta data
  Throws:
    `SQLException` - If an error occurred retrieving the meta data
  See Also:
    `DatabaseMetaData.getPrimaryKeys(java.lang.String, java.lang.String, java.lang.String)`

### getForeignKeys

    public ResultSet getForeignKeys(String tableNamePattern)
                             throws SQLException

  Convenience method to return the foreign key meta data using the configured catalog and schema pattern.

  Parameters:
    `tableNamePattern` - The pattern identifying for which tables to return info
  Returns:
    The foreign key meta data
  Throws:
    `SQLException` - If an error occurred retrieving the meta data
  See Also:
    `DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String)`

### getIndices

    public ResultSet getIndices(String tableNamePattern,
                                boolean unique,
                                boolean approximate)
                         throws SQLException

  Convenience method to return the index meta data using the configured catalog and schema pattern.

  Parameters:
    `tableNamePattern` - The pattern identifying for which tables to return info
    `unique` - Whether to return only indices for unique values
    `approximate` - Whether the result is allowed to reflect approximate or out of data values
  Returns:
    The index meta data
  Throws:
    `SQLException` - If an error occurred retrieving the meta data
  See Also:
    `DatabaseMetaData.getIndexInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean)`

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.