org.teiid.dqp.internal.process.multisource
Class MultiSourceMetadataWrapper

java.lang.Object
  extended by org.teiid.query.metadata.BasicQueryMetadataWrapper
      extended by org.teiid.dqp.internal.process.multisource.MultiSourceMetadataWrapper
All Implemented Interfaces:
QueryMetadataInterface

public class MultiSourceMetadataWrapper
extends BasicQueryMetadataWrapper

This classs is a proxy to QueryMetadataInterface. It knows VDBService and VNB name.


Field Summary
 
Fields inherited from class org.teiid.query.metadata.BasicQueryMetadataWrapper
actualMetadata
 
Fields inherited from interface org.teiid.query.metadata.QueryMetadataInterface
UNKNOWN_CARDINALITY
 
Constructor Summary
MultiSourceMetadataWrapper(QueryMetadataInterface actualMetadata, java.util.Set<java.lang.String> multiSourceModels)
           
 
Method Summary
 boolean elementSupports(java.lang.Object elementID, int elementConstant)
          Determine whether the specified element supports some feature.
 java.lang.Object getDefaultValue(java.lang.Object elementID)
          Get the element's default value for an element symbol
 QueryMetadataInterface getDesignTimeMetadata()
          Get the metadata without visibility and session tables
 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 getElementIDsInGroupID(java.lang.Object groupID)
          Get list of metadata element IDs for a group ID
 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.lang.String getFullName(java.lang.Object metadataID)
          Get the fully qualified (unique) name of the metadata identifier specified.
 java.lang.Object getGroupIDForElementID(java.lang.Object elementID)
          Get containg group ID given element ID
static java.lang.String getGroupName(java.lang.String fullElementName)
           
 java.lang.Object getMaximumValue(java.lang.Object elementID)
          Get the element's default value for an element symbol
 java.lang.Object getMinimumValue(java.lang.Object elementID)
          Get the element's minimum value for an element symbol
 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 getName(java.lang.Object metadataID)
          Get the name of the metadata identifier specified.
 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
 int getRadix(java.lang.Object elementID)
          Get the element's radix
 int getScale(java.lang.Object elementID)
          Get the element's scale
 boolean isMultiSource(java.lang.Object modelId)
           
 boolean isMultiSourceElement(java.lang.Object elementId)
           
 
Methods inherited from class org.teiid.query.metadata.BasicQueryMetadataWrapper
addToMetadataCache, getAccessPatternsInGroup, getBinaryVDBResource, getCardinality, getCharacterVDBResource, getDeletePlan, getElementIDsInAccessPattern, getElementIDsInIndex, getElementIDsInKey, getForeignKeysInGroup, getFormat, getFromMetadataCache, getFunctionLibrary, getGroupID, getGroupsForPartialName, getIndexesInGroup, getInsertPlan, getMappingNode, getMaterialization, getMaterializationStage, getMaxSetSize, getModeledBaseType, getModeledPrimitiveType, getModeledType, getPrimaryKey, getPrimaryKeyIDForForeignKeyID, getSessionMetadata, getStoredProcedureInfoForProcedure, getUniqueKeysInGroup, getUpdatePlan, getVDBResourcePaths, getVirtualDatabaseName, getVirtualPlan, getXMLSchemas, getXMLTempGroups, groupSupports, hasMaterialization, hasProcedure, isProcedure, isScalarGroup, isTemporaryTable, isVirtualGroup, isVirtualModel, isXMLGroup, modelSupports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiSourceMetadataWrapper

public MultiSourceMetadataWrapper(QueryMetadataInterface actualMetadata,
                                  java.util.Set<java.lang.String> multiSourceModels)
Method Detail

getGroupName

public static java.lang.String getGroupName(java.lang.String fullElementName)

getElementID

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

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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementID(java.lang.String)

getModelID

public java.lang.Object getModelID(java.lang.Object groupOrElementID)
                            throws TeiidComponentException,
                                   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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getModelID(java.lang.Object)

getFullName

public java.lang.String getFullName(java.lang.Object metadataID)
                             throws TeiidComponentException,
                                    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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getFullName(java.lang.Object)

getName

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

Specified by:
getName in interface QueryMetadataInterface
Overrides:
getName in class BasicQueryMetadataWrapper
Parameters:
metadataID - Metadata identifier
Returns:
Metadata identifier for this model
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
TeiidComponentException - Unexpected internal system problem during request

getElementIDsInGroupID

public java.util.List getElementIDsInGroupID(java.lang.Object groupID)
                                      throws TeiidComponentException,
                                             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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementIDsInGroupID(java.lang.Object)

getGroupIDForElementID

public java.lang.Object getGroupIDForElementID(java.lang.Object elementID)
                                        throws TeiidComponentException,
                                               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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getGroupIDForElementID(java.lang.Object)

getElementType

public java.lang.String getElementType(java.lang.Object elementID)
                                throws TeiidComponentException,
                                       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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementType(java.lang.Object)

getDefaultValue

public java.lang.Object getDefaultValue(java.lang.Object elementID)
                                 throws TeiidComponentException,
                                        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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getDefaultValue(java.lang.Object)

getMinimumValue

public java.lang.Object getMinimumValue(java.lang.Object elementID)
                                 throws TeiidComponentException,
                                        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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getMinimumValue(java.lang.Object)

getMaximumValue

public java.lang.Object getMaximumValue(java.lang.Object elementID)
                                 throws TeiidComponentException,
                                        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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getMaximumValue(java.lang.Object)

getDistinctValues

public int getDistinctValues(java.lang.Object elementID)
                      throws TeiidComponentException,
                             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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getDistinctValues(java.lang.Object)

getNullValues

public int getNullValues(java.lang.Object elementID)
                  throws TeiidComponentException,
                         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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getNullValues(java.lang.Object)

getPosition

public int getPosition(java.lang.Object elementID)
                throws TeiidComponentException,
                       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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getPosition(java.lang.Object)

getPrecision

public int getPrecision(java.lang.Object elementID)
                 throws TeiidComponentException,
                        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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getPrecision(java.lang.Object)

getScale

public int getScale(java.lang.Object elementID)
             throws TeiidComponentException,
                    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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getScale(java.lang.Object)

getRadix

public int getRadix(java.lang.Object elementID)
             throws TeiidComponentException,
                    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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getRadix(java.lang.Object)

elementSupports

public boolean elementSupports(java.lang.Object elementID,
                               int elementConstant)
                        throws TeiidComponentException,
                               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
elementConstant - Constant from SupportConstants.Element
Returns:
True if element supports feature
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.elementSupports(java.lang.Object, int)

getExtensionProperties

public java.util.Properties getExtensionProperties(java.lang.Object metadataID)
                                            throws TeiidComponentException,
                                                   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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getExtensionProperties(java.lang.Object)

getNameInSource

public java.lang.String getNameInSource(java.lang.Object metadataID)
                                 throws TeiidComponentException,
                                        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
Overrides:
getNameInSource in class BasicQueryMetadataWrapper
Parameters:
metadataID - Metadata identifier
Returns:
Name in source as a string.
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getNameInSource(java.lang.Object)

getElementLength

public int getElementLength(java.lang.Object elementID)
                     throws TeiidComponentException,
                            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
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementLength(java.lang.Object)

getNativeType

public java.lang.String getNativeType(java.lang.Object elementID)
                               throws TeiidComponentException,
                                      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
Overrides:
getNativeType in class BasicQueryMetadataWrapper
Parameters:
elementID - Element identifier
Returns:
Native type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
TeiidComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getNativeType(java.lang.Object)

isMultiSource

public boolean isMultiSource(java.lang.Object modelId)
                      throws QueryMetadataException,
                             TeiidComponentException
Specified by:
isMultiSource in interface QueryMetadataInterface
Overrides:
isMultiSource in class BasicQueryMetadataWrapper
Throws:
QueryMetadataException
TeiidComponentException

isMultiSourceElement

public boolean isMultiSourceElement(java.lang.Object elementId)
                             throws QueryMetadataException,
                                    TeiidComponentException
Specified by:
isMultiSourceElement in interface QueryMetadataInterface
Overrides:
isMultiSourceElement in class BasicQueryMetadataWrapper
Throws:
QueryMetadataException
TeiidComponentException

getDesignTimeMetadata

public QueryMetadataInterface getDesignTimeMetadata()
Description copied from interface: QueryMetadataInterface
Get the metadata without visibility and session tables

Specified by:
getDesignTimeMetadata in interface QueryMetadataInterface
Overrides:
getDesignTimeMetadata in class BasicQueryMetadataWrapper
Returns:


Copyright © 2011. All Rights Reserved.