net.sf.farrago.namespace.mdr
Class MedMdrNameDirectory
java.lang.Object
net.sf.farrago.plugin.FarragoAbstractPluginBase
net.sf.farrago.namespace.impl.MedAbstractBase
net.sf.farrago.namespace.impl.MedAbstractNameDirectory
net.sf.farrago.namespace.mdr.MedMdrNameDirectory
- All Implemented Interfaces:
- FarragoMedNameDirectory
class MedMdrNameDirectory
- extends MedAbstractNameDirectory
MedMdrNameDirectory implements the FarragoMedNameDirectory interface by
mapping the package structure of an MDR repository.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/namespace/mdr/MedMdrNameDirectory.java#22 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
server
final MedMdrDataServer server
rootPackage
final RefPackage rootPackage
MedMdrNameDirectory
MedMdrNameDirectory(MedMdrDataServer server,
RefPackage rootPackage)
- Instantiates a MedMdrNameDirectory.
- Parameters:
server
- MedMdrDataServer from which this directory was openedrootPackage
- root package from which to map names in repository;
so, when a table name like x.y.z is looked up, rootPackage will be
searched for subpackage x, which will be searched for subpackage y, which
will be searched for class z
lookupRefPackage
RefPackage lookupRefPackage(String[] names,
int prefix)
lookupRefClass
RefClass lookupRefClass(String[] foreignName)
- Looks up a RefClass from its qualified name.
- Parameters:
foreignName
- name of this class relative to this directory's root
package
lookupRefBaseObject
RefBaseObject lookupRefBaseObject(String[] foreignName)
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
lookupColumnSetAndImposeType
FarragoMedColumnSet lookupColumnSetAndImposeType(FarragoTypeFactory typeFactory,
String[] foreignName,
String[] localName,
RelDataType rowType)
throws SQLException
- Throws:
SQLException
computeRowType
private RelDataType computeRowType(FarragoTypeFactory typeFactory,
RefClass refClass)
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