net.java.ao.schema.helper
Class DatabaseMetaDataReaderImpl

java.lang.Object
  extended by net.java.ao.schema.helper.DatabaseMetaDataReaderImpl
All Implemented Interfaces:
DatabaseMetaDataReader

public class DatabaseMetaDataReaderImpl
extends Object
implements DatabaseMetaDataReader


Constructor Summary
DatabaseMetaDataReaderImpl(DatabaseProvider databaseProvider, NameConverters nameConverters, SchemaConfiguration schemaConfiguration)
           
 
Method Summary
 Iterable<? extends Field> getFields(DatabaseMetaData databaseMetaData, String tableName)
           
 Iterable<ForeignKey> getForeignKeys(DatabaseMetaData metaData, String tableName)
          Gets the list of foreign keys for a given table
 Iterable<String> getTableNames(DatabaseMetaData metaData)
          Gets the names of the existing tables in the DB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseMetaDataReaderImpl

public DatabaseMetaDataReaderImpl(DatabaseProvider databaseProvider,
                                  NameConverters nameConverters,
                                  SchemaConfiguration schemaConfiguration)
Method Detail

getTableNames

public Iterable<String> getTableNames(DatabaseMetaData metaData)
Description copied from interface: DatabaseMetaDataReader
Gets the names of the existing tables in the DB

Specified by:
getTableNames in interface DatabaseMetaDataReader
Parameters:
metaData - the meta data from which to extract the table names
Returns:
an Iterable of table names as strings

getFields

public Iterable<? extends Field> getFields(DatabaseMetaData databaseMetaData,
                                           String tableName)
Specified by:
getFields in interface DatabaseMetaDataReader
Returns:

getForeignKeys

public Iterable<ForeignKey> getForeignKeys(DatabaseMetaData metaData,
                                           String tableName)
Description copied from interface: DatabaseMetaDataReader
Gets the list of foreign keys for a given table

Specified by:
getForeignKeys in interface DatabaseMetaDataReader
Parameters:
metaData - the database metadata to read the information from
tableName - the name of the table from which to read the foreign keys
Returns:
an Iterable of foreign keys


Copyright © 2007-2012. All Rights Reserved.