com.metamatrix.query.metadata
Class BasicQueryMetadataWrapper

java.lang.Object
  extended by com.metamatrix.query.metadata.BasicQueryMetadataWrapper
All Implemented Interfaces:
QueryMetadataInterface
Direct Known Subclasses:
TempMetadataAdapter

public class BasicQueryMetadataWrapper
extends java.lang.Object
implements QueryMetadataInterface


Field Summary
protected  QueryMetadataInterface actualMetadata
           
 
Fields inherited from interface com.metamatrix.query.metadata.QueryMetadataInterface
UNKNOWN_CARDINALITY
 
Constructor Summary
BasicQueryMetadataWrapper(QueryMetadataInterface actualMetadata)
           
 
Method Summary
 java.lang.Object addToMetadataCache(java.lang.Object metadataID, java.lang.String key, java.lang.Object value)
           
 boolean elementSupports(java.lang.Object elementID, int elementConstant)
          Determine whether the specified element supports some feature.
 java.util.Collection getAccessPatternsInGroup(java.lang.Object groupID)
          Get the access patterns for the specified group
 byte[] getBinaryVDBResource(java.lang.String resourcePath)
          Gets the contents of a VDB resource in binary form.
 int getCardinality(java.lang.Object groupID)
          Return the cardinality for this group
 java.lang.String getCharacterVDBResource(java.lang.String resourcePath)
          Gets the contents of a VDB resource as a String.
 java.lang.Object getDefaultValue(java.lang.Object elementID)
          Get the element's default value for an element symbol
 java.lang.String getDeletePlan(java.lang.Object groupID)
          Get procedure defining the delete plan for this group.
 int getDistinctValues(java.lang.Object elementID)
          Get the number of distinct values for this column.
 java.lang.Object getElementID(java.lang.String elementName)
          Get the metadata-implementation identifier object for the given element name.
 java.util.List getElementIDsInAccessPattern(java.lang.Object accessPattern)
          Get the elements in the access pattern
 java.util.List getElementIDsInGroupID(java.lang.Object groupID)
          Get list of metadata element IDs for a group ID
 java.util.List getElementIDsInIndex(java.lang.Object index)
          Get the elements in the index
 java.util.List getElementIDsInKey(java.lang.Object key)
          Get the elements in the key
 int getElementLength(java.lang.Object elementID)
          Get the element length for a given element ID.
 java.lang.String getElementType(java.lang.Object elementID)
          Get the element type name for an element symbol.
 java.util.Properties getExtensionProperties(java.lang.Object metadataID)
          Get all extension properties defined on this metadata object
 java.util.Collection getForeignKeysInGroup(java.lang.Object groupID)
          Get the foreign keys for the specified group
 java.lang.String getFormat(java.lang.Object elementID)
          Get the element's format
 java.lang.Object getFromMetadataCache(java.lang.Object metadataID, java.lang.String key)
           
 java.lang.String getFullElementName(java.lang.String fullGroupName, java.lang.String shortElementName)
          Get the fully qualified (unique) element name given the full group name and the short element name.
 java.lang.String getFullName(java.lang.Object metadataID)
          Get the fully qualified (unique) name of the metadata identifier specified.
 java.lang.Object getGroupID(java.lang.String groupName)
          Get the metadata-implementation identifier object for the given group name.
 java.lang.Object getGroupIDForElementID(java.lang.Object elementID)
          Get containg group ID given element ID
 java.lang.String getGroupName(java.lang.String fullElementName)
          Get the group name from a fully qualified element name.
 java.util.Collection getGroupsForPartialName(java.lang.String partialGroupName)
          Get a collection of group names that match the partially qualified group name.
 java.util.Collection getIndexesInGroup(java.lang.Object groupID)
          Get the indexes for the specified group
 java.lang.String getInsertPlan(java.lang.Object groupID)
          Get procedure defining the insert plan for this group.
 MappingNode getMappingNode(java.lang.Object groupID)
          Get the mapping node for the given groupID
 java.lang.Object getMaterialization(java.lang.Object groupID)
          Accquire the physical group ID (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.
 java.lang.Object getMaterializationStage(java.lang.Object groupID)
          Accquire the physical group ID that is used for the staging area for loading (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.
 java.lang.Object getMaximumValue(java.lang.Object elementID)
          Get the element's default value for an element symbol
 int getMaxSetSize(java.lang.Object modelID)
          Get the max set size for the specified model.
 java.lang.Object getMinimumValue(java.lang.Object elementID)
          Get the element's minimum value for an element symbol
 java.lang.String getModeledBaseType(java.lang.Object elementID)
          Get the design-time model base type of the element specified.
 java.lang.String getModeledPrimitiveType(java.lang.Object elementID)
          Get the design-time model primitive type of the element specified.
 java.lang.String getModeledType(java.lang.Object elementID)
          Get the design-time model type of the element specified.
 java.lang.Object getModelID(java.lang.Object groupOrElementID)
          Get the metadata-implementation identifier object for the model containing the specified group or element ID.
 java.lang.String getNameInSource(java.lang.Object metadataID)
          Get the name in source of the metadata identifier specified.
 java.lang.String getNativeType(java.lang.Object elementID)
          Get the native type of the element specified.
 int getNullValues(java.lang.Object elementID)
          Get the number of distinct values for this column.
 int getPosition(java.lang.Object elementID)
          Get the element's position in the group
 int getPrecision(java.lang.Object elementID)
          Get the element's precision
 java.lang.Object getPrimaryKeyIDForForeignKeyID(java.lang.Object foreignKeyID)
          Get the corresponding primary key ID for the specified foreign key ID
 int getRadix(java.lang.Object elementID)
          Get the element's radix
 int getScale(java.lang.Object elementID)
          Get the element's scale
 java.lang.String getShortElementName(java.lang.String fullElementName)
          Get the short (unique only to group) name of an element, given a fully qualified element name.
 StoredProcedureInfo getStoredProcedureInfoForProcedure(java.lang.String fullyQualifiedProcedureName)
          Get the the StoredProcedureInfo based on the fully qualified procedure name
 java.util.Collection getUniqueKeysInGroup(java.lang.Object groupID)
          Get the unique keys for the specified group (primary and unique keys)
 java.lang.String getUpdatePlan(java.lang.Object groupID)
          Get procedure defining the update plan for this group.
 java.lang.String[] getVDBResourcePaths()
          Gets the resource paths of all the resources in the VDB.
 java.lang.String getVirtualDatabaseName()
          Get the currently connected virtual database name.
 QueryNode getVirtualPlan(java.lang.Object groupID)
          Get virtual plan for a group symbol.
 java.util.List getXMLSchemas(java.lang.Object groupID)
          Get XML schemas for a document group.
 java.util.Collection getXMLTempGroups(java.lang.Object groupID)
          Return a list of all the temp groups used in this document.
 boolean groupSupports(java.lang.Object groupID, int groupConstant)
          Determine whether the specified group supports some feature.
 boolean hasMaterialization(java.lang.Object groupID)
          Determine whether given virtual group has an associated Materialization.
 boolean isProcedure(java.lang.Object groupID)
          Determine whether this is a procedure
 boolean isScalarGroup(java.lang.Object groupID)
           
 boolean isTemporaryTable(java.lang.Object groupID)
          Determine whether a group is a temporary table.
 boolean isVirtualGroup(java.lang.Object groupID)
          Determine whether a group is virtual or not.
 boolean isVirtualModel(java.lang.Object modelID)
          Determine whether a model is virtual or not.
 boolean isXMLGroup(java.lang.Object groupID)
          Determine whether a group is an XML virtual document.
 boolean modelSupports(java.lang.Object modelID, int modelConstant)
          Determine whether the specified model supports some feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actualMetadata

protected QueryMetadataInterface actualMetadata
Constructor Detail

BasicQueryMetadataWrapper

public BasicQueryMetadataWrapper(QueryMetadataInterface actualMetadata)
Method Detail

elementSupports

public boolean elementSupports(java.lang.Object elementID,
                               int elementConstant)
                        throws MetaMatrixComponentException,
                               QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether the specified element supports some feature.

Specified by:
elementSupports in interface QueryMetadataInterface
Parameters:
elementID - Element metadata ID
elementConstant - Constant from SupportConstants.Element
Returns:
True if element supports feature
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getAccessPatternsInGroup

public java.util.Collection getAccessPatternsInGroup(java.lang.Object groupID)
                                              throws MetaMatrixComponentException,
                                                     QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the access patterns for the specified group

Specified by:
getAccessPatternsInGroup in interface QueryMetadataInterface
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing an access pattern
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getBinaryVDBResource

public byte[] getBinaryVDBResource(java.lang.String resourcePath)
                            throws MetaMatrixComponentException,
                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Gets the contents of a VDB resource in binary form.

Specified by:
getBinaryVDBResource in interface QueryMetadataInterface
Parameters:
resourcePath - a path returned by getVDBResourcePaths()
Returns:
the binary contents of the resource in a byte[]
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request

getCardinality

public int getCardinality(java.lang.Object groupID)
                   throws MetaMatrixComponentException,
                          QueryMetadataException
Description copied from interface: QueryMetadataInterface
Return the cardinality for this group

Specified by:
getCardinality in interface QueryMetadataInterface
Parameters:
groupID - Metadata identifier specifying group
Returns:
cardinality for the given group. If unknown, return UNKNOWN_CARDINALITY.
Throws:
MetaMatrixComponentException
QueryMetadataException

getCharacterVDBResource

public java.lang.String getCharacterVDBResource(java.lang.String resourcePath)
                                         throws MetaMatrixComponentException,
                                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Gets the contents of a VDB resource as a String.

Specified by:
getCharacterVDBResource in interface QueryMetadataInterface
Parameters:
resourcePath - a path returned by getVDBResourcePaths()
Returns:
the contents of the resource as a String.
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request

getDefaultValue

public java.lang.Object getDefaultValue(java.lang.Object elementID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's default value for an element symbol

Specified by:
getDefaultValue in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The default value of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getDeletePlan

public java.lang.String getDeletePlan(java.lang.Object groupID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get procedure defining the delete plan for this group.

Specified by:
getDeletePlan in interface QueryMetadataInterface
Returns:
A string giving the procedure for inserts.
Throws:
MetaMatrixComponentException
QueryMetadataException

getDistinctValues

public int getDistinctValues(java.lang.Object elementID)
                      throws MetaMatrixComponentException,
                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the number of distinct values for this column. Negative values (typically -1) indicate that the NDV is unknown. Only applicable for physical columns.

Specified by:
getDistinctValues in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The number of distinct values of this element in the data source
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementID

public java.lang.Object getElementID(java.lang.String elementName)
                              throws MetaMatrixComponentException,
                                     QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the metadata-implementation identifier object for the given element name.

Specified by:
getElementID in interface QueryMetadataInterface
Parameters:
elementName - Fully qualified element name
Returns:
Metadata identifier for this element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementIDsInAccessPattern

public java.util.List getElementIDsInAccessPattern(java.lang.Object accessPattern)
                                            throws MetaMatrixComponentException,
                                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the elements in the access pattern

Specified by:
getElementIDsInAccessPattern in interface QueryMetadataInterface
Parameters:
accessPattern - access pattern identifier, as returned by QueryMetadataInterface.getAccessPatternsInGroup(java.lang.Object)
Returns:
List of Object, where each object is a metadata element identifier
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementIDsInGroupID

public java.util.List getElementIDsInGroupID(java.lang.Object groupID)
                                      throws MetaMatrixComponentException,
                                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get list of metadata element IDs for a group ID

Specified by:
getElementIDsInGroupID in interface QueryMetadataInterface
Parameters:
groupID - Group ID
Returns:
List of Object, where each object is a metadata elementID for element within group
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementIDsInIndex

public java.util.List getElementIDsInIndex(java.lang.Object index)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the elements in the index

Specified by:
getElementIDsInIndex in interface QueryMetadataInterface
Parameters:
index - Index identifier, as returned by QueryMetadataInterface.getIndexesInGroup(java.lang.Object)
Returns:
List of Object, where each object is a metadata element identifier
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementIDsInKey

public java.util.List getElementIDsInKey(java.lang.Object key)
                                  throws MetaMatrixComponentException,
                                         QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the elements in the key

Specified by:
getElementIDsInKey in interface QueryMetadataInterface
Parameters:
key - Key identifier, as returned by QueryMetadataInterface.getUniqueKeysInGroup(java.lang.Object)
Returns:
List of Object, where each object is a metadata element identifier
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementLength

public int getElementLength(java.lang.Object elementID)
                     throws MetaMatrixComponentException,
                            QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element length for a given element ID. These types are defined in DataTypeManager.DefaultDataTypes.

Specified by:
getElementLength in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The element length
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementType

public java.lang.String getElementType(java.lang.Object elementID)
                                throws MetaMatrixComponentException,
                                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element type name for an element symbol. These types are defined in DataTypeManager.DefaultDataTypes.

Specified by:
getElementType in interface QueryMetadataInterface
Returns:
The element data type
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getExtensionProperties

public java.util.Properties getExtensionProperties(java.lang.Object metadataID)
                                            throws MetaMatrixComponentException,
                                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get all extension properties defined on this metadata object

Specified by:
getExtensionProperties in interface QueryMetadataInterface
Parameters:
metadataID - Typically element, group, model, or procedure
Returns:
All extension properties for this object or null for none
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getForeignKeysInGroup

public java.util.Collection getForeignKeysInGroup(java.lang.Object groupID)
                                           throws MetaMatrixComponentException,
                                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the foreign keys for the specified group

Specified by:
getForeignKeysInGroup in interface QueryMetadataInterface
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing a key
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getFullElementName

public java.lang.String getFullElementName(java.lang.String fullGroupName,
                                           java.lang.String shortElementName)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the fully qualified (unique) element name given the full group name and the short element name.

Specified by:
getFullElementName in interface QueryMetadataInterface
Parameters:
fullGroupName - Fully qualified group name
shortElementName - Short element name
Returns:
Unique element name for the specified group and element name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getFullName

public java.lang.String getFullName(java.lang.Object metadataID)
                             throws MetaMatrixComponentException,
                                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the fully qualified (unique) name of the metadata identifier specified. This metadata identifier was previously returned by some other method.

Specified by:
getFullName in interface QueryMetadataInterface
Parameters:
metadataID - Metadata identifier
Returns:
Metadata identifier for this model
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getGroupID

public java.lang.Object getGroupID(java.lang.String groupName)
                            throws MetaMatrixComponentException,
                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the metadata-implementation identifier object for the given group name.

Specified by:
getGroupID in interface QueryMetadataInterface
Parameters:
groupName - Fully qualified group name
Returns:
Metadata identifier for this group
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getGroupIDForElementID

public java.lang.Object getGroupIDForElementID(java.lang.Object elementID)
                                        throws MetaMatrixComponentException,
                                               QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get containg group ID given element ID

Specified by:
getGroupIDForElementID in interface QueryMetadataInterface
Parameters:
elementID - Element ID
Returns:
Group ID containing elementID
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getGroupName

public java.lang.String getGroupName(java.lang.String fullElementName)
                              throws MetaMatrixComponentException,
                                     QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the group name from a fully qualified element name.

Specified by:
getGroupName in interface QueryMetadataInterface
Parameters:
fullElementName - Fully qualified element name
Returns:
Group name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getGroupsForPartialName

public java.util.Collection getGroupsForPartialName(java.lang.String partialGroupName)
                                             throws MetaMatrixComponentException,
                                                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get a collection of group names that match the partially qualified group name.

Specified by:
getGroupsForPartialName in interface QueryMetadataInterface
Parameters:
partialGroupName - Partially qualified group name
Returns:
A collection of groups whose names are matched by the partial name.
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getIndexesInGroup

public java.util.Collection getIndexesInGroup(java.lang.Object groupID)
                                       throws MetaMatrixComponentException,
                                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the indexes for the specified group

Specified by:
getIndexesInGroup in interface QueryMetadataInterface
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing an index
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getInsertPlan

public java.lang.String getInsertPlan(java.lang.Object groupID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get procedure defining the insert plan for this group.

Specified by:
getInsertPlan in interface QueryMetadataInterface
Returns:
A string giving the procedure for inserts.
Throws:
MetaMatrixComponentException
QueryMetadataException

getMappingNode

public MappingNode getMappingNode(java.lang.Object groupID)
                           throws MetaMatrixComponentException,
                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the mapping node for the given groupID

Specified by:
getMappingNode in interface QueryMetadataInterface
Parameters:
groupID - Metadata group ID
Returns:
A MappingNode defining the group
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getMaterialization

public java.lang.Object getMaterialization(java.lang.Object groupID)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Accquire the physical group ID (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.

Specified by:
getMaterialization in interface QueryMetadataInterface
Parameters:
groupID - the groupID of a virtual group that has a Materialization.
Returns:
The groupID of the physical group that is a Materialization of the given virtual group.
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request

getMaterializationStage

public java.lang.Object getMaterializationStage(java.lang.Object groupID)
                                         throws MetaMatrixComponentException,
                                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Accquire the physical group ID that is used for the staging area for loading (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.

Specified by:
getMaterializationStage in interface QueryMetadataInterface
Parameters:
groupID - the groupID of a virtual group that has a Materialization.
Returns:
The groupID of the physical group that is the staging table for loading the Materialization of the given virtual group.
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request

getMaximumValue

public java.lang.Object getMaximumValue(java.lang.Object elementID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's default value for an element symbol

Specified by:
getMaximumValue in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The maximum value of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getMaxSetSize

public int getMaxSetSize(java.lang.Object modelID)
                  throws MetaMatrixComponentException,
                         QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the max set size for the specified model.

Specified by:
getMaxSetSize in interface QueryMetadataInterface
Parameters:
modelID - Metadata identifier specifying model
Returns:
Maximum set size
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getMinimumValue

public java.lang.Object getMinimumValue(java.lang.Object elementID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's minimum value for an element symbol

Specified by:
getMinimumValue in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The minimum value of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getModeledBaseType

public java.lang.String getModeledBaseType(java.lang.Object elementID)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the design-time model base type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getModeledBaseType in interface QueryMetadataInterface
Parameters:
elementID - Element identifier
Returns:
Modeled base type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getModeledPrimitiveType

public java.lang.String getModeledPrimitiveType(java.lang.Object elementID)
                                         throws MetaMatrixComponentException,
                                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the design-time model primitive type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getModeledPrimitiveType in interface QueryMetadataInterface
Parameters:
elementID - Element identifier
Returns:
Modeled primitive type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getModeledType

public java.lang.String getModeledType(java.lang.Object elementID)
                                throws MetaMatrixComponentException,
                                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the design-time model type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getModeledType in interface QueryMetadataInterface
Parameters:
elementID - Element identifier
Returns:
Modeled type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getModelID

public java.lang.Object getModelID(java.lang.Object groupOrElementID)
                            throws MetaMatrixComponentException,
                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the metadata-implementation identifier object for the model containing the specified group or element ID.

Specified by:
getModelID in interface QueryMetadataInterface
Parameters:
groupOrElementID - Metadata group or element ID
Returns:
Metadata identifier for the model
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getNameInSource

public java.lang.String getNameInSource(java.lang.Object metadataID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the name in source of the metadata identifier specified. This metadata identifier was previously returned by some other method.

Specified by:
getNameInSource in interface QueryMetadataInterface
Parameters:
metadataID - Metadata identifier
Returns:
Name in source as a string.
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getNativeType

public java.lang.String getNativeType(java.lang.Object elementID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the native type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getNativeType in interface QueryMetadataInterface
Parameters:
elementID - Element identifier
Returns:
Native type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getNullValues

public int getNullValues(java.lang.Object elementID)
                  throws MetaMatrixComponentException,
                         QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the number of distinct values for this column. Negative values (typically -1) indicate that the NDV is unknown. Only applicable for physical columns.

Specified by:
getNullValues in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The number of distinct values of this element in the data source
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getPosition

public int getPosition(java.lang.Object elementID)
                throws MetaMatrixComponentException,
                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's position in the group

Specified by:
getPosition in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The position of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getPrecision

public int getPrecision(java.lang.Object elementID)
                 throws MetaMatrixComponentException,
                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's precision

Specified by:
getPrecision in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The precision of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getPrimaryKeyIDForForeignKeyID

public java.lang.Object getPrimaryKeyIDForForeignKeyID(java.lang.Object foreignKeyID)
                                                throws MetaMatrixComponentException,
                                                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the corresponding primary key ID for the specified foreign key ID

Specified by:
getPrimaryKeyIDForForeignKeyID in interface QueryMetadataInterface
Parameters:
foreignKeyID - Metadata identifier of a foreign key
Returns:
Metadata ID of the corresponding primary key
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getRadix

public int getRadix(java.lang.Object elementID)
             throws MetaMatrixComponentException,
                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's radix

Specified by:
getRadix in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The radix of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getFormat

public java.lang.String getFormat(java.lang.Object elementID)
                           throws MetaMatrixComponentException,
                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's format

Specified by:
getFormat in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The format of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getScale

public int getScale(java.lang.Object elementID)
             throws MetaMatrixComponentException,
                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's scale

Specified by:
getScale in interface QueryMetadataInterface
Parameters:
elementID - The element ID
Returns:
The scale of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getShortElementName

public java.lang.String getShortElementName(java.lang.String fullElementName)
                                     throws MetaMatrixComponentException,
                                            QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the short (unique only to group) name of an element, given a fully qualified element name.

Specified by:
getShortElementName in interface QueryMetadataInterface
Parameters:
fullElementName - Fully qualified element name
Returns:
Short (unique only to group) name of element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getStoredProcedureInfoForProcedure

public StoredProcedureInfo getStoredProcedureInfoForProcedure(java.lang.String fullyQualifiedProcedureName)
                                                       throws MetaMatrixComponentException,
                                                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the the StoredProcedureInfo based on the fully qualified procedure name

Specified by:
getStoredProcedureInfoForProcedure in interface QueryMetadataInterface
Parameters:
fullyQualifiedProcedureName - the fully qualified stored procedure name
Returns:
StoredProcedureInfo containing the runtime model id
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getUniqueKeysInGroup

public java.util.Collection getUniqueKeysInGroup(java.lang.Object groupID)
                                          throws MetaMatrixComponentException,
                                                 QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the unique keys for the specified group (primary and unique keys)

Specified by:
getUniqueKeysInGroup in interface QueryMetadataInterface
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing a unique key
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getUpdatePlan

public java.lang.String getUpdatePlan(java.lang.Object groupID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get procedure defining the update plan for this group.

Specified by:
getUpdatePlan in interface QueryMetadataInterface
Returns:
A string giving the procedure for inserts.
Throws:
MetaMatrixComponentException
QueryMetadataException

getVDBResourcePaths

public java.lang.String[] getVDBResourcePaths()
                                       throws MetaMatrixComponentException,
                                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Gets the resource paths of all the resources in the VDB.

Specified by:
getVDBResourcePaths in interface QueryMetadataInterface
Returns:
an array of resource paths of the resources in the VDB
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request

getVirtualDatabaseName

public java.lang.String getVirtualDatabaseName()
                                        throws MetaMatrixComponentException,
                                               QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the currently connected virtual database name. If the current metadata is not virtual-database specific, then null should be returned.

Specified by:
getVirtualDatabaseName in interface QueryMetadataInterface
Returns:
Name of current virtual database
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getVirtualPlan

public QueryNode getVirtualPlan(java.lang.Object groupID)
                         throws MetaMatrixComponentException,
                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get virtual plan for a group symbol.

Specified by:
getVirtualPlan in interface QueryMetadataInterface
Returns:
Root of tree of QueryNode objects
Throws:
MetaMatrixComponentException
QueryMetadataException

getXMLSchemas

public java.util.List getXMLSchemas(java.lang.Object groupID)
                             throws MetaMatrixComponentException,
                                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get XML schemas for a document group.

Specified by:
getXMLSchemas in interface QueryMetadataInterface
Parameters:
groupID - Document group ID
Returns:
List of String where each string is an XML schema for the document
Throws:
MetaMatrixComponentException
QueryMetadataException

getXMLTempGroups

public java.util.Collection getXMLTempGroups(java.lang.Object groupID)
                                      throws MetaMatrixComponentException,
                                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Return a list of all the temp groups used in this document.

Specified by:
getXMLTempGroups in interface QueryMetadataInterface
Parameters:
groupID - XML virtual document groupID
Returns:
List of all the temp groups used in this document.
Throws:
MetaMatrixComponentException
QueryMetadataException

groupSupports

public boolean groupSupports(java.lang.Object groupID,
                             int groupConstant)
                      throws MetaMatrixComponentException,
                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether the specified group supports some feature.

Specified by:
groupSupports in interface QueryMetadataInterface
Parameters:
groupID - Group metadata ID
groupConstant - Constant from SupportConstants.Group
Returns:
True if group supports feature
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

hasMaterialization

public boolean hasMaterialization(java.lang.Object groupID)
                           throws MetaMatrixComponentException,
                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether given virtual group has an associated Materialization. A Materialization is a cached version of the representation of a virtual group.

Specified by:
hasMaterialization in interface QueryMetadataInterface
Parameters:
groupID - the groupID of the virtual group in question.
Returns:
True if given virtual group has been marked as having a Materialization.
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

isProcedure

public boolean isProcedure(java.lang.Object groupID)
                    throws MetaMatrixComponentException,
                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether this is a procedure

Specified by:
isProcedure in interface QueryMetadataInterface
Parameters:
groupID - Group identifier
Returns:
True if it is an procedure; false otherwise
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

isTemporaryTable

public boolean isTemporaryTable(java.lang.Object groupID)
                         throws MetaMatrixComponentException,
                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether a group is a temporary table.

Specified by:
isTemporaryTable in interface QueryMetadataInterface
Parameters:
groupID - Group to check
Returns:
True if group is a temporary group
Throws:
MetaMatrixComponentException
QueryMetadataException

isVirtualGroup

public boolean isVirtualGroup(java.lang.Object groupID)
                       throws MetaMatrixComponentException,
                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether a group is virtual or not.

Specified by:
isVirtualGroup in interface QueryMetadataInterface
Returns:
True if virtual
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

isVirtualModel

public boolean isVirtualModel(java.lang.Object modelID)
                       throws MetaMatrixComponentException,
                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether a model is virtual or not.

Specified by:
isVirtualModel in interface QueryMetadataInterface
Returns:
True if virtual
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

isXMLGroup

public boolean isXMLGroup(java.lang.Object groupID)
                   throws MetaMatrixComponentException,
                          QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether a group is an XML virtual document.

Specified by:
isXMLGroup in interface QueryMetadataInterface
Parameters:
groupID - Group to check
Returns:
True if group is an XML virtual document
Throws:
MetaMatrixComponentException
QueryMetadataException

modelSupports

public boolean modelSupports(java.lang.Object modelID,
                             int modelConstant)
                      throws MetaMatrixComponentException,
                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether the specified model supports some feature.

Specified by:
modelSupports in interface QueryMetadataInterface
Parameters:
modelID - Metadata identifier specifying the model
modelConstant - Constant from SupportConstants.Model
Returns:
True if model supports feature
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

addToMetadataCache

public java.lang.Object addToMetadataCache(java.lang.Object metadataID,
                                           java.lang.String key,
                                           java.lang.Object value)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Specified by:
addToMetadataCache in interface QueryMetadataInterface
Throws:
MetaMatrixComponentException
QueryMetadataException

getFromMetadataCache

public java.lang.Object getFromMetadataCache(java.lang.Object metadataID,
                                             java.lang.String key)
                                      throws MetaMatrixComponentException,
                                             QueryMetadataException
Specified by:
getFromMetadataCache in interface QueryMetadataInterface
Throws:
MetaMatrixComponentException
QueryMetadataException

isScalarGroup

public boolean isScalarGroup(java.lang.Object groupID)
                      throws MetaMatrixComponentException,
                             QueryMetadataException
Specified by:
isScalarGroup in interface QueryMetadataInterface
Throws:
MetaMatrixComponentException
QueryMetadataException


Copyright © 2009. All Rights Reserved.