SPT RWT Application API

com.sptci.rwt
Class TableAnalyser

java.lang.Object
  extended by com.sptci.rwt.Analyser
      extended by com.sptci.rwt.TableTypeAnalyser
          extended by com.sptci.rwt.TableAnalyser

public class TableAnalyser
extends TableTypeAnalyser

An analyser for analysing table type objects in the database.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: TableAnalyser.java 4123 2008-05-25 21:49:01Z rakesh $
Author:
Rakesh Vidyadharan 2007-09-25

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sptci.rwt.Analyser
Analyser.CatalogueSchema
 
Field Summary
private static String[] TYPE
          The types parameters to specify while invoking the DatabaseMetaData.getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) method.
 
Fields inherited from class com.sptci.rwt.Analyser
logger, manager
 
Constructor Summary
TableAnalyser(ConnectionManager manager)
          Create a new instance of the class using the specified connection manager.
 
Method Summary
 Collection<TableMetaData> analyse(MetaData... parameters)
          Returns a collection of TableMetaData objects that contain the basic information pertaining to the tables in the schema.
 Collection<ForeignKeyMetaData> getExportedKeys(TableMetaData metaData)
          Retrieve the meta data about the foreign key references to this table.
 
Methods inherited from class com.sptci.rwt.TableTypeAnalyser
getNumberOfRows
 
Methods inherited from class com.sptci.rwt.Analyser
getNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

private static final String[] TYPE
The types parameters to specify while invoking the DatabaseMetaData.getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) method.

Constructor Detail

TableAnalyser

public TableAnalyser(ConnectionManager manager)
Create a new instance of the class using the specified connection manager.

Parameters:
manager - The manager for obtaining database connections.
Method Detail

analyse

public Collection<TableMetaData> analyse(MetaData... parameters)
                                  throws SQLException
Returns a collection of TableMetaData objects that contain the basic information pertaining to the tables in the schema.

Specified by:
analyse in class Analyser
Parameters:
parameters - Must contain one parameter which is a RootMetaData that represents the catalog or schema to restrict the analysis to. The name of the catalog or schema may be null or an empty string. See DatabaseMetaData.getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) for a description of the behaviour of specifying the schema.
Returns:
The collection of metadata objects representing all objects of this type.
Throws:
SQLException - If errors are encountered while analysisng the
See Also:
Analyser.analyse(com.sptci.rwt.MetaData...), Analyser.getNames(com.sptci.rwt.MetaData)

getExportedKeys

public Collection<ForeignKeyMetaData> getExportedKeys(TableMetaData metaData)
                                               throws SQLException
Retrieve the meta data about the foreign key references to this table.

Parameters:
metaData - The meta data object whose foreign key references are to be retrieved.
Returns:
The collection of ForeignKeyMetaData objects that represent the columns that reference the specified table columns.
Throws:
SQLException - If errors are encountered while fetching the details.
Since:
Version 1.1
See Also:
Analyser.getNames(com.sptci.rwt.MetaData)

SPT RWT Application API