com.sptci.rwt
Class AbstractViewAnalyser
java.lang.Object
com.sptci.rwt.Analyser
com.sptci.rwt.AbstractViewAnalyser
- Direct Known Subclasses:
- OracleViewAnalyser, StandardViewAnalyser
public abstract class AbstractViewAnalyser
- extends Analyser
An abstractanalyser for analysing view type objects in the database.
Sub-classes perform database engine specific analysis since not all
database engines support the SQL92 standard information schema.
© Copyright 2007 Sans Pareil Technologies, Inc.
- Since:
- Version 1.2
- Version:
- $Id: AbstractViewAnalyser.java 4123 2008-05-25 21:49:01Z rakesh $
- Author:
- Rakesh Vidyadharan 2007-11-02
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE
protected 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.
AbstractViewAnalyser
protected AbstractViewAnalyser(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<ViewMetaData> analyse(MetaData... parameters)
throws SQLException
- Returns a collection of
ViewMetaData objects that contain the
basic information pertaining to the views in the schema. You must
invoke getAdditionalAttributes(com.sptci.rwt.ViewMetaData) to fetch information from
the information_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
catalogue or schema may be null or an empty string.
- 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)
getViews
protected abstract void getViews(RootMetaData root,
Collection<ViewMetaData> collection)
throws SQLException
- Fetch the views directly from
information_schema if no
information is available through DatabaseMetaData.
- Parameters:
root - The metadata object that represents the catalog/schema for
which the views are to be retrieved.collection - The collection to which the ViewMetaData
objects are to be added.
- Throws:
SQLException - If errors are encountered while fetching the views.- See Also:
Analyser.getNames(com.sptci.rwt.MetaData)
getAdditionalAttributes
protected abstract void getAdditionalAttributes(ViewMetaData vmd)
- Fetch additional meta data about the specified view from the
information_schema.
- Parameters:
vmd - The meta data object that is to have additional attributes
populated.- Since:
- Version 1.1