net.sf.farrago.namespace
Interface FarragoMedMetadataSink

All Known Implementing Classes:
DdlImportForeignSchemaStmt.ImportSink, FarragoMedUDR.BrowseSchemaSink, MedAbstractMetadataSink

public interface FarragoMedMetadataSink

FarragoMedMetadataSink provides a target for instances of FarragoMedNameDirectory to write metadata results in response to a FarragoMedMetadataQuery. Results must be written in dependency order (e.g. a table before its columns), and columns must be written in ordinal order.

Results may be filtered as they are written, in which case the sink reports the filter result back to the caller.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/namespace/FarragoMedMetadataSink.java#8 $
Author:
John V. Sichi

Method Summary
 FarragoTypeFactory getTypeFactory()
           
 boolean writeColumnDescriptor(String tableName, String columnName, int ordinal, RelDataType type, String remarks, String defaultValue, Properties properties)
          Writes a descriptor for a column.
 boolean writeObjectDescriptor(String name, String typeName, String remarks, Properties properties)
          Writes a generic descriptor for an object.
 

Method Detail

writeObjectDescriptor

boolean writeObjectDescriptor(String name,
                              String typeName,
                              String remarks,
                              Properties properties)
Writes a generic descriptor for an object. Some objects (such as columns) have more specific write methods.

Parameters:
name - unqualified object name
remarks - object description, or null for none
properties - storage options
Returns:
true if object was accepted; false if object was filtered out

writeColumnDescriptor

boolean writeColumnDescriptor(String tableName,
                              String columnName,
                              int ordinal,
                              RelDataType type,
                              String remarks,
                              String defaultValue,
                              Properties properties)
Writes a descriptor for a column.

Parameters:
tableName - unqualified table name
columnName - unqualified column name
ordinal - 0-based ordinal of column within table
type - column datatype
remarks - column description, or null for none
defaultValue - column default value, or null for none
properties - storage options
Returns:
true if object was accepted; false if object was filtered out

getTypeFactory

FarragoTypeFactory getTypeFactory()
Returns:
a type factory for use in creating type instances for calls such as writeColumnDescriptor(java.lang.String, java.lang.String, int, org.eigenbase.reltype.RelDataType, java.lang.String, java.lang.String, java.util.Properties)