net.sf.farrago.namespace.flatfile
Class FlatFileNameDirectory
java.lang.Object
net.sf.farrago.plugin.FarragoAbstractPluginBase
net.sf.farrago.namespace.impl.MedAbstractBase
net.sf.farrago.namespace.impl.MedAbstractNameDirectory
net.sf.farrago.namespace.flatfile.FlatFileNameDirectory
- All Implemented Interfaces:
- FarragoMedNameDirectory
class FlatFileNameDirectory
- extends MedAbstractNameDirectory
FlatFileNameDirectory provides an implementation of the FarragoMedNameDirectory
interface.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/namespace/flatfile/FlatFileNameDirectory.java#2 $
- Author:
- Sunny Choi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
server
final FlatFileDataServer server
scope
String scope
FlatFileNameDirectory
FlatFileNameDirectory(FlatFileDataServer server,
String scope)
lookupColumnSet
public FarragoMedColumnSet lookupColumnSet(FarragoTypeFactory typeFactory,
String foreignName,
String[] localName)
throws SQLException
- Description copied from interface:
FarragoMedNameDirectory
- Looks up a FarragoMedColumnSet by name. This method supports Farrago's
capability to reference a foreign table directly without having to create
local metadata about it.
- Parameters:
typeFactory
- FarragoTypeFactory to use for defining typesforeignName
- simple name of foreign ColumnSet to lookup as a direct
child of this directorylocalName
- compound identifier by which FarragoMedColumnSet will be
referenced locally
- Returns:
- FarragoMedColumnSet, or null if none found
- Throws:
SQLException
- if metadata access is unsuccessful
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
- Overrides:
lookupSubdirectory
in class MedAbstractNameDirectory
- 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
- Overrides:
queryMetadata
in class MedAbstractNameDirectory
- Parameters:
query
- the query to executesink
- 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)
queryTables
private boolean queryTables(FarragoMedMetadataQuery query,
FarragoMedMetadataSink sink)
throws SQLException
- Throws:
SQLException
queryColumns
private boolean queryColumns(FarragoMedMetadataQuery query,
FarragoMedMetadataSink sink)
throws SQLException
- Throws:
SQLException