com.metamatrix.connector.metadata.index
Class MetadataConnectorMetadata

java.lang.Object
  extended by com.metamatrix.query.metadata.BasicQueryMetadata
      extended by com.metamatrix.modeler.transformation.metadata.TransformationMetadata
          extended by com.metamatrix.modeler.transformation.metadata.ServerRuntimeMetadata
              extended by com.metamatrix.connector.metadata.index.MetadataConnectorMetadata
All Implemented Interfaces:
QueryMetadataInterface

public class MetadataConnectorMetadata
extends ServerRuntimeMetadata

Extends the ServerRuntimeMetadata class with additional methods for querying the indexes.


Field Summary
 
Fields inherited from class com.metamatrix.modeler.transformation.metadata.TransformationMetadata
columnComparator, DELIMITER_CHAR, DELIMITER_STRING, NOT_EXISTS_MESSAGE
 
Fields inherited from interface com.metamatrix.query.metadata.QueryMetadataInterface
UNKNOWN_CARDINALITY
 
Constructor Summary
MetadataConnectorMetadata(VdbMetadataContext context)
          Constructor MetadataConnectorMetadata.
 
Method Summary
protected  java.util.Collection findMetadataRecords(java.lang.String indexName, java.util.Map criteria, boolean returnFirstMatch)
          Return all index records in the index file that match the given critera.
protected  java.util.Collection getFileRecords(java.util.Map criteria, boolean returnFirstMatch)
          Get all the file records for the available files in vdbs given the match criteria
protected  java.util.Collection getMetadataRecords(IEntryResult[] results, java.util.Map criteria, boolean hasCaseFunctions)
          Return the collection of MetadataRecord objects built from the specified array of IEntryResult.
 java.util.Collection getObjects(java.lang.String tableName, java.util.Map criteria)
          Get the metadataRecords by querying the indexFile with the given table name and a Map of criteria to be applied to limit the results.
 
Methods inherited from class com.metamatrix.modeler.transformation.metadata.ServerRuntimeMetadata
getIndexes, queryIndex
 
Methods inherited from class com.metamatrix.modeler.transformation.metadata.TransformationMetadata
elementSupports, filterMetadataRecordForUUID, findChildRecords, findChildRecordsForColumns, findChildRecordsWithoutFiltering, findMetadataRecord, findMetadataRecords, findMetadataRecords, getAccessPatternsInGroup, getBinaryVDBResource, getCardinality, getCharacterVDBResource, getContext, getDatatypeRecord, getDatatypeUUIDMatchPattern, getDefaultValue, getDeletePlan, getDistinctValues, getElementID, getElementIDsInAccessPattern, getElementIDsInGroupID, getElementIDsInIndex, getElementIDsInKey, getElementLength, getElementType, getExtensionProperties, getForeignKeysInGroup, getFormat, getFullElementName, getFullName, getGroupID, getGroupIDForElementID, getGroupName, getGroupsForPartialName, getIndexesInGroup, getIndexSelector, getInsertPlan, getMappingNode, getMatchPattern, getMaterialization, getMaterializationStage, getMaximumValue, getMaxSetSize, getMinimumValue, getModeledBaseType, getModeledPrimitiveType, getModeledType, getModelID, getNameInSource, getNativeType, getNullValues, getParentPrefixPattern, getPosition, getPrecision, getPrefixPattern, getPrimaryKeyIDForForeignKeyID, getRadix, getRecordByType, getScale, getShortElementName, getStoredProcedureInfoForProcedure, getUniqueKeysInGroup, getUpdatePlan, getUUIDMatchPattern, getUUIDPrefixPattern, getVDBResourcePaths, getVirtualDatabaseName, getVirtualPlan, getXMLSchemas, getXMLTempGroups, groupSupports, hasMaterialization, isProcedure, isTemporaryGroup, isVirtualGroup, isVirtualModel, isXMLGroup, modelSupports, queryIndex, queryIndex
 
Methods inherited from class com.metamatrix.query.metadata.BasicQueryMetadata
addToMetadataCache, getFromMetadataCache, isScalarGroup, isTemporaryTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataConnectorMetadata

public MetadataConnectorMetadata(VdbMetadataContext context)
Constructor MetadataConnectorMetadata.

Parameters:
context - The context object used to pass in info needed by metadata
Since:
4.3
Method Detail

getObjects

public java.util.Collection getObjects(java.lang.String tableName,
                                       java.util.Map criteria)
Get the metadataRecords by querying the indexFile with the given table name and a Map of criteria to be applied to limit the results.

Parameters:
tableName - The name of index file with/out a record seperator
criteria - Map of fieldNames to MetadataSearchCriteria objects
Returns:
Collection of metadata records.
Since:
4.3

findMetadataRecords

protected java.util.Collection findMetadataRecords(java.lang.String indexName,
                                                   java.util.Map criteria,
                                                   boolean returnFirstMatch)
                                            throws MetaMatrixComponentException
Return all index records in the index file that match the given critera.

Parameters:
indexName - The name of the index file to be searched
criteria - Map of fieldNames to MetadataSearchCriteria objects used to search
returnFirstMatch - Boolean indicating if first match is to be returned
Returns:
Collection of metadata records
Throws:
QueryMetadataException
MetaMatrixComponentException

getMetadataRecords

protected java.util.Collection getMetadataRecords(IEntryResult[] results,
                                                  java.util.Map criteria,
                                                  boolean hasCaseFunctions)
                                           throws MetaMatrixComponentException
Return the collection of MetadataRecord objects built from the specified array of IEntryResult. The resultant collection will be filtered based on the supplied criteria to ensure no MetadataRecord instances are returned that do not match the criteria

Parameters:
results - The array of IEntryResult instances
criteria - Map of fieldNames to MetadataSearchCriteria objects to use
Returns:
Collection of metadata records
Throws:
QueryMetadataException
MetaMatrixComponentException

getFileRecords

protected java.util.Collection getFileRecords(java.util.Map criteria,
                                              boolean returnFirstMatch)
Get all the file records for the available files in vdbs given the match criteria

Parameters:
criteria - Map of fieldNames to MetadataSearchCriteria objects used to search
returnFirstMatch - Boolean indicating if first match is to be returned
Returns:
Collection of file records
Throws:
MetaMatrixComponentException
Since:
4.3


Copyright © 2009. All Rights Reserved.