com.sptci.rwt
Class ForeignKeyAnalyser
java.lang.Object
com.sptci.rwt.Analyser
com.sptci.rwt.KeyAnalyser
com.sptci.rwt.ForeignKeyAnalyser
public class ForeignKeyAnalyser
- extends KeyAnalyser
An analyser for analysing foreign key columns for tables in the database.
© Copyright 2007 Sans Pareil Technologies, Inc.
- Version:
- $Id: ForeignKeyAnalyser.java 4123 2008-05-25 21:49:01Z rakesh $
- Author:
- Rakesh Vidyadharan 2007-09-25
- See Also:
DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ForeignKeyAnalyser
public ForeignKeyAnalyser(ConnectionManager manager)
- Create a new instance of the class using the specified connection
manager.
- Parameters:
manager - The manager for obtaining database connections.
analyse
public Collection<ForeignKeyMetaData> analyse(MetaData... parameters)
throws SQLException
- Returns a collection of
ForeignKeyMetaData objects that
contain all information pertaining to the foreign keys for the
specified table.
- Specified by:
analyse in class Analyser
- Parameters:
parameters - Must contain two parameters which are the names of
the catalog/schema and table from which foreign key
metadata are to be retrieved.
- 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)
processRule
protected ForeignKeyMetaData.Rule processRule(short value)
- Process the
update_rule/delete_rule values and match
them with the appropriate ForeignKeyMetaData.Rule value.
- Parameters:
value - The the short value read from result set.
- Returns:
- The appropriate rule value.
processDeferrability
protected ForeignKeyMetaData.Deferrability processDeferrability(short value)
- Process the
deferrability value and match them with the
appropriate ForeignKeyMetaData.Deferrability value.
- Parameters:
value - The the short value read from result set.
- Returns:
- The appropriate deferrability value.