com.metamatrix.query.metadata
Class TempMetadataAdapter

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

public class TempMetadataAdapter
extends BasicQueryMetadataWrapper

This is an adapter class, it contains another instance of QueryMetadataInterface as well as a TempMetadataStore. It defers to either one of these when appropriate.

When a metadataID Object is requested for a group or element name, this will first check the QueryMetadataInterface. If an ID wasn't found there, it will then check the TempMetadataStore.

For methods that take a metadataID arg, this class may check whether it is a TempMetadataID or not and react accordingly.


Field Summary
 
Fields inherited from class com.metamatrix.query.metadata.BasicQueryMetadataWrapper
actualMetadata
 
Fields inherited from interface com.metamatrix.query.metadata.QueryMetadataInterface
UNKNOWN_CARDINALITY
 
Constructor Summary
TempMetadataAdapter(QueryMetadataInterface metadata, TempMetadataStore tempStore)
           
TempMetadataAdapter(QueryMetadataInterface metadata, TempMetadataStore tempStore, java.util.Map materializationTables, java.util.Map queryNodes)
           
 
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 supportConstant)
          Determine whether the specified element supports some feature.
 java.util.Collection getAccessPatternsInGroup(java.lang.Object groupID)
          Get the access patterns for the specified group
 int getCardinality(java.lang.Object groupID)
          Return the cardinality for this group
 java.lang.Object getDefaultValue(java.lang.Object elementID)
          Get the element's default value for an element symbol
 int getDistinctValues(java.lang.Object elementID)
          Get the number of distinct values for this column.
 java.lang.Object getElementID(java.lang.String elementName)
          Check metadata first, then check temp groups if not found
 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 keyID)
          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.Object getFromMetadataCache(java.lang.Object metadataID, java.lang.String key)
           
 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)
          Check metadata first, then check temp groups if not found
 java.lang.Object getGroupIDForElementID(java.lang.Object elementID)
          Get containg group ID given element ID
 java.util.Collection getIndexesInGroup(java.lang.Object groupID)
          Get the indexes for the specified 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
 QueryMetadataInterface getMetadata()
           
 TempMetadataStore getMetadataStore()
           
 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 getNativeType(java.lang.Object elementID)
          Get the native type name for the element.
 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
 int getRadix(java.lang.Object elementID)
          Get the element's radix
 int getScale(java.lang.Object elementID)
          Get the element's scale
 java.util.Collection getUniqueKeysInGroup(java.lang.Object groupID)
          Get the unique keys for the specified group (primary and unique keys)
 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 elementID)
          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.
 
Methods inherited from class com.metamatrix.query.metadata.BasicQueryMetadataWrapper
getBinaryVDBResource, getCharacterVDBResource, getDeletePlan, getFormat, getFullElementName, getGroupName, getGroupsForPartialName, getInsertPlan, getMaxSetSize, getNameInSource, getPrimaryKeyIDForForeignKeyID, getShortElementName, getStoredProcedureInfoForProcedure, getUpdatePlan, getVDBResourcePaths, modelSupports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempMetadataAdapter

public TempMetadataAdapter(QueryMetadataInterface metadata,
                           TempMetadataStore tempStore)

TempMetadataAdapter

public TempMetadataAdapter(QueryMetadataInterface metadata,
                           TempMetadataStore tempStore,
                           java.util.Map materializationTables,
                           java.util.Map queryNodes)
Method Detail

getMetadataStore

public TempMetadataStore getMetadataStore()

getMetadata

public QueryMetadataInterface getMetadata()

getElementID

public java.lang.Object getElementID(java.lang.String elementName)
                              throws MetaMatrixComponentException,
                                     QueryMetadataException
Check metadata first, then check temp groups if not found

Specified by:
getElementID in interface QueryMetadataInterface
Overrides:
getElementID in class BasicQueryMetadataWrapper
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

getGroupID

public java.lang.Object getGroupID(java.lang.String groupName)
                            throws MetaMatrixComponentException,
                                   QueryMetadataException
Check metadata first, then check temp groups if not found

Specified by:
getGroupID in interface QueryMetadataInterface
Overrides:
getGroupID in class BasicQueryMetadataWrapper
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

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
Overrides:
getModelID in class BasicQueryMetadataWrapper
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

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
Overrides:
getFullName in class BasicQueryMetadataWrapper
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

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
Overrides:
getElementIDsInGroupID in class BasicQueryMetadataWrapper
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

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
Overrides:
getGroupIDForElementID in class BasicQueryMetadataWrapper
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

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
Overrides:
getElementType in class BasicQueryMetadataWrapper
Returns:
The element data type
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during 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
Overrides:
getDefaultValue in class BasicQueryMetadataWrapper
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

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
Overrides:
getMaximumValue in class BasicQueryMetadataWrapper
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

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
Overrides:
getMinimumValue in class BasicQueryMetadataWrapper
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

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
Overrides:
getDistinctValues in class BasicQueryMetadataWrapper
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
See Also:
QueryMetadataInterface.getDistinctValues(java.lang.Object)

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
Overrides:
getNullValues in class BasicQueryMetadataWrapper
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
See Also:
QueryMetadataInterface.getNullValues(java.lang.Object)

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
Overrides:
getVirtualPlan in class BasicQueryMetadataWrapper
Returns:
Root of tree of QueryNode objects
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
Overrides:
isVirtualGroup in class BasicQueryMetadataWrapper
Returns:
True if virtual
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
Overrides:
hasMaterialization in class BasicQueryMetadataWrapper
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
Since:
4.2
See Also:
QueryMetadataInterface.hasMaterialization(java.lang.Object)

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
Overrides:
getMaterialization in class BasicQueryMetadataWrapper
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
Since:
4.2
See Also:
QueryMetadataInterface.getMaterialization(java.lang.Object)

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
Overrides:
getMaterializationStage in class BasicQueryMetadataWrapper
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
Since:
4.2
See Also:
QueryMetadataInterface.getMaterializationStage(java.lang.Object)

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
Overrides:
isVirtualModel in class BasicQueryMetadataWrapper
Returns:
True if virtual
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

elementSupports

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

Specified by:
elementSupports in interface QueryMetadataInterface
Overrides:
elementSupports in class BasicQueryMetadataWrapper
Parameters:
elementID - Element metadata ID
supportConstant - 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

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
Overrides:
getIndexesInGroup in class BasicQueryMetadataWrapper
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
See Also:
QueryMetadataInterface.getIndexesInGroup(java.lang.Object)

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
Overrides:
getUniqueKeysInGroup in class BasicQueryMetadataWrapper
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

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
Overrides:
getForeignKeysInGroup in class BasicQueryMetadataWrapper
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

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
Overrides:
getElementIDsInIndex in class BasicQueryMetadataWrapper
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
See Also:
QueryMetadataInterface.getElementIDsInIndex(java.lang.Object)

getElementIDsInKey

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

Specified by:
getElementIDsInKey in interface QueryMetadataInterface
Overrides:
getElementIDsInKey in class BasicQueryMetadataWrapper
Parameters:
keyID - 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

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
Overrides:
groupSupports in class BasicQueryMetadataWrapper
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

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
Overrides:
getMappingNode in class BasicQueryMetadataWrapper
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

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
Overrides:
isXMLGroup in class BasicQueryMetadataWrapper
Parameters:
groupID - Group to check
Returns:
True if group is an XML virtual document
Throws:
MetaMatrixComponentException
QueryMetadataException

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
Overrides:
getVirtualDatabaseName in class BasicQueryMetadataWrapper
Returns:
Name of current virtual database
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getVirtualDatabaseName()

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
Overrides:
getAccessPatternsInGroup in class BasicQueryMetadataWrapper
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
See Also:
QueryMetadataInterface.getAccessPatternsInGroup(Object)

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
Overrides:
getElementIDsInAccessPattern in class BasicQueryMetadataWrapper
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
See Also:
QueryMetadataInterface.getElementIDsInAccessPattern(Object)

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
Overrides:
getXMLTempGroups in class BasicQueryMetadataWrapper
Parameters:
groupID - XML virtual document groupID
Returns:
List of all the temp groups used in this document.
Throws:
MetaMatrixComponentException
QueryMetadataException

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
Overrides:
getCardinality in class BasicQueryMetadataWrapper
Parameters:
groupID - Metadata identifier specifying group
Returns:
cardinality for the given group. If unknown, return UNKNOWN_CARDINALITY.
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
Overrides:
getXMLSchemas in class BasicQueryMetadataWrapper
Parameters:
groupID - Document group ID
Returns:
List of String where each string is an XML schema for the document
Throws:
MetaMatrixComponentException
QueryMetadataException

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
Overrides:
getExtensionProperties in class BasicQueryMetadataWrapper
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

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
Overrides:
getElementLength in class BasicQueryMetadataWrapper
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

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
Overrides:
getPosition in class BasicQueryMetadataWrapper
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
Overrides:
getPrecision in class BasicQueryMetadataWrapper
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

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
Overrides:
getRadix in class BasicQueryMetadataWrapper
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

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
Overrides:
getScale in class BasicQueryMetadataWrapper
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

getNativeType

public java.lang.String getNativeType(java.lang.Object elementID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Get the native type name for the element.

Specified by:
getNativeType in interface QueryMetadataInterface
Overrides:
getNativeType in class BasicQueryMetadataWrapper
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
Since:
4.2
See Also:
QueryMetadataInterface.getNativeType(java.lang.Object)

isProcedure

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

Specified by:
isProcedure in interface QueryMetadataInterface
Overrides:
isProcedure in class BasicQueryMetadataWrapper
Parameters:
elementID - 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

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
Overrides:
getModeledType in class BasicQueryMetadataWrapper
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
Since:
5.0
See Also:
QueryMetadataInterface.getModeledType(java.lang.Object)

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
Overrides:
getModeledBaseType in class BasicQueryMetadataWrapper
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
Since:
5.0
See Also:
QueryMetadataInterface.getModeledBaseType(java.lang.Object)

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
Overrides:
getModeledPrimitiveType in class BasicQueryMetadataWrapper
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
Since:
5.0
See Also:
QueryMetadataInterface.getModeledPrimitiveType(java.lang.Object)

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
Overrides:
isTemporaryTable in class BasicQueryMetadataWrapper
Parameters:
groupID - Group to check
Returns:
True if group is a temporary group
Throws:
MetaMatrixComponentException
QueryMetadataException

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
Overrides:
addToMetadataCache in class BasicQueryMetadataWrapper
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
Overrides:
getFromMetadataCache in class BasicQueryMetadataWrapper
Throws:
MetaMatrixComponentException
QueryMetadataException

isScalarGroup

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


Copyright © 2009. All Rights Reserved.