net.sf.farrago.namespace.impl
Class MedAbstractNameDirectory

java.lang.Object
  extended by net.sf.farrago.plugin.FarragoAbstractPluginBase
      extended by net.sf.farrago.namespace.impl.MedAbstractBase
          extended by net.sf.farrago.namespace.impl.MedAbstractNameDirectory
All Implemented Interfaces:
FarragoMedNameDirectory
Direct Known Subclasses:
FlatFileNameDirectory, MedJdbcNameDirectory, MedMdrNameDirectory, MedMockNameDirectory

public abstract class MedAbstractNameDirectory
extends MedAbstractBase
implements FarragoMedNameDirectory

MedAbstractNameDirectory is an abstract base class for implementations of the FarragoMedNameDirectory interface.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/namespace/impl/MedAbstractNameDirectory.java#14 $
Author:
John V. Sichi

Field Summary
 
Fields inherited from class net.sf.farrago.plugin.FarragoAbstractPluginBase
BOOLEAN_CHOICES_DEFAULT_FALSE, BOOLEAN_CHOICES_DEFAULT_TRUE, EMPTY_DRIVER_PROPERTIES
 
Constructor Summary
MedAbstractNameDirectory()
           
 
Method Summary
 FarragoMedNameDirectory lookupSubdirectory(String foreignName)
          Looks up an immediate subdirectory by name.
 FemBaseColumnSet newImportedColumnSet(FarragoRepos repos, String tableName)
          Creates a new instance of FemBaseColumnSet in the catalog to represent an imported table.
 boolean queryMetadata(FarragoMedMetadataQuery query, FarragoMedMetadataSink sink)
          Executes a query against the metadata contained by this directory.
 
Methods inherited from class net.sf.farrago.plugin.FarragoAbstractPluginBase
getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getShortProperty, requireProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.farrago.namespace.FarragoMedNameDirectory
lookupColumnSet
 

Constructor Detail

MedAbstractNameDirectory

public MedAbstractNameDirectory()
Method Detail

lookupSubdirectory

public FarragoMedNameDirectory lookupSubdirectory(String foreignName)
                                           throws SQLException
Description copied from interface: FarragoMedNameDirectory
Looks up an immediate subdirectory by name.

Specified by:
lookupSubdirectory in interface FarragoMedNameDirectory
Parameters:
foreignName - identifier for subdirectory
Returns:
subdirectory, or null if none found
Throws:
SQLException - if metadata access is unsuccessful

queryMetadata

public boolean queryMetadata(FarragoMedMetadataQuery query,
                             FarragoMedMetadataSink sink)
                      throws SQLException
Description copied from interface: FarragoMedNameDirectory
Executes a query against the metadata contained by this directory. This method supports the SQL/MED IMPORT FOREIGN SCHEMA statement, and general metadata browsing.

NOTE: the supplied sink may be used to implement passive aborts by throwing an unchecked exception when an abort request is detected.

Specified by:
queryMetadata in interface FarragoMedNameDirectory
Parameters:
query - the query to execute
sink - target which receives the query results
Returns:
true if the query executed successfully; false if the requested query type was not supported
Throws:
SQLException - if metadata access is unsuccessful (but not if query is unsupported)

newImportedColumnSet

public FemBaseColumnSet newImportedColumnSet(FarragoRepos repos,
                                             String tableName)
Description copied from interface: FarragoMedNameDirectory
Creates a new instance of FemBaseColumnSet in the catalog to represent an imported table.

Specified by:
newImportedColumnSet in interface FarragoMedNameDirectory
Parameters:
repos - repository storing catalog
tableName - name of imported table
Returns:
new object in catalog