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.
| Modifier and Type | Field and Description |
|---|---|
static TempMetadataID |
TEMP_MODEL |
actualMetadata, designTime, designTimeMetadataUNKNOWN_CARDINALITY| Constructor and Description |
|---|
TempMetadataAdapter(QueryMetadataInterface metadata,
TempMetadataStore tempStore) |
TempMetadataAdapter(QueryMetadataInterface metadata,
TempMetadataStore tempStore,
Map<Object,Object> materializationTables,
Map<Object,QueryNode> queryNodes) |
| Modifier and Type | Method and Description |
|---|---|
Object |
addToMetadataCache(Object metadataID,
String key,
Object value) |
protected QueryMetadataInterface |
createDesignTimeMetadata() |
boolean |
elementSupports(Object elementID,
int supportConstant)
Determine whether the specified element supports some feature.
|
Collection |
getAccessPatternsInGroup(Object groupID)
Get the access patterns for the specified group
|
static Object |
getActualMetadataId(Object id) |
float |
getCardinality(Object groupID)
Return the cardinality for this group
|
String |
getDefaultValue(Object elementID)
Get the element's default value for an element symbol
|
float |
getDistinctValues(Object elementID)
Get the number of distinct values for this column.
|
Object |
getElementID(String elementName)
Check metadata first, then check temp groups if not found
|
List |
getElementIDsInAccessPattern(Object accessPattern)
Get the elements in the access pattern
|
List |
getElementIDsInGroupID(Object groupID)
Get list of metadata element IDs for a group ID
|
List |
getElementIDsInIndex(Object index)
Get the elements in the index
|
List |
getElementIDsInKey(Object keyID)
Get the elements in the key
|
int |
getElementLength(Object elementID)
Get the element length for a given element ID.
|
String |
getElementRuntimeTypeName(Object elementID)
Get the element type name for an element symbol.
|
Properties |
getExtensionProperties(Object metadataID)
Get all extension properties defined on this metadata object
|
String |
getExtensionProperty(Object metadataID,
String key,
boolean checkUnqualified) |
Collection |
getForeignKeysInGroup(Object groupID)
Get the foreign keys for the specified group
|
Object |
getFromMetadataCache(Object metadataID,
String key) |
String |
getFullName(Object metadataID)
Get the fully qualified (unique) name of the metadata identifier specified.
|
Map<Expression,Integer> |
getFunctionBasedExpressions(Object metadataID) |
Object |
getGroupID(String groupName)
Check metadata first, then check temp groups if not found
|
Object |
getGroupIDForElementID(Object elementID)
Get containg group ID given element ID
|
Collection |
getGroupsForPartialName(String partialGroupName)
Get a collection of group names that match the partially qualified group name.
|
Collection |
getIndexesInGroup(Object groupID)
Get the indexes for the specified group
|
Object |
getMaterialization(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. |
Object |
getMaterializationStage(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. |
Object |
getMaximumValue(Object elementID)
Get the element's default value for an element symbol
|
QueryMetadataInterface |
getMetadata() |
TempMetadataStore |
getMetadataStore() |
Object |
getMinimumValue(Object elementID)
Get the element's minimum value for an element symbol
|
Object |
getModelID(Object groupOrElementID)
Get the metadata-implementation identifier object for the model containing the
specified group or element ID.
|
String |
getName(Object metadataID)
Get the name of the metadata identifier specified.
|
String |
getNativeType(Object elementID)
Get the native type name for the element.
|
float |
getNullValues(Object elementID)
Get the number of distinct values for this column.
|
int |
getPosition(Object elementID)
Get the element's position in the group
|
int |
getPrecision(Object elementID)
Get the element's precision
|
Object |
getPrimaryKey(Object metadataID) |
int |
getRadix(Object elementID)
Get the element's radix
|
int |
getScale(Object elementID)
Get the element's scale
|
QueryMetadataInterface |
getSessionMetadata() |
Collection |
getUniqueKeysInGroup(Object groupID)
Get the unique keys for the specified group (primary and unique keys)
The primary key if present will be first in the collection
|
String |
getVirtualDatabaseName()
Get the currently connected virtual database name.
|
QueryNode |
getVirtualPlan(Object groupID)
Get virtual plan for a group symbol.
|
boolean |
groupSupports(Object groupID,
int groupConstant)
Determine whether the specified group supports some feature.
|
boolean |
hasMaterialization(Object groupID)
Determine whether given virtual group has an associated Materialization.
|
boolean |
isMultiSource(Object modelId) |
boolean |
isMultiSourceElement(Object elementId) |
boolean |
isProcedure(Object elementID)
Determine whether this is a procedure
|
boolean |
isScalarGroup(Object groupID) |
boolean |
isSession() |
boolean |
isTemporaryTable(Object groupID)
Determine whether a group is a temporary table.
|
boolean |
isVirtualGroup(Object groupID)
Determine whether a group is virtual or not.
|
boolean |
isVirtualModel(Object modelID)
Determine whether a model is virtual or not.
|
void |
setSession(boolean session) |
findShortName, getBinaryVDBResource, getCharacterVDBResource, getDataTypeClass, getDeletePlan, getDesignTimeMetadata, getFormat, getFunctionLibrary, getImportedModels, getInsertPlan, getMaxSetSize, getModelID, getNameInSource, getPrimaryKeyIDForForeignKeyID, getScriptEngine, getStoredProcedureInfoForProcedure, getUpdatePlan, getVDBResourcePaths, hasProcedure, isEnvAllowed, isPseudo, isVariadic, modelSupports, useOutputName, widenComparisonToStringpublic static final TempMetadataID TEMP_MODEL
public TempMetadataAdapter(QueryMetadataInterface metadata, TempMetadataStore tempStore)
public TempMetadataAdapter(QueryMetadataInterface metadata, TempMetadataStore tempStore, Map<Object,Object> materializationTables, Map<Object,QueryNode> queryNodes)
public boolean isSession()
public void setSession(boolean session)
public QueryMetadataInterface getSessionMetadata()
getSessionMetadata in interface QueryMetadataInterfacegetSessionMetadata in class BasicQueryMetadataWrapperprotected QueryMetadataInterface createDesignTimeMetadata()
createDesignTimeMetadata in class BasicQueryMetadataWrapperpublic TempMetadataStore getMetadataStore()
public QueryMetadataInterface getMetadata()
public Object getElementID(String elementName) throws TeiidComponentException, QueryMetadataException
getElementID in interface QueryMetadataInterfacegetElementID in class BasicQueryMetadataWrapperelementName - Fully qualified element nameQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Object getGroupID(String groupName) throws TeiidComponentException, QueryMetadataException
getGroupID in interface QueryMetadataInterfacegetGroupID in class BasicQueryMetadataWrappergroupName - Fully qualified group nameQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Collection getGroupsForPartialName(String partialGroupName) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetGroupsForPartialName in interface QueryMetadataInterfacegetGroupsForPartialName in class BasicQueryMetadataWrapperpartialGroupName - Partially qualified group nameQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Object getModelID(Object groupOrElementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetModelID in interface QueryMetadataInterfacegetModelID in class BasicQueryMetadataWrappergroupOrElementID - Metadata group or element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic String getFullName(Object metadataID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetFullName in interface QueryMetadataInterfacegetFullName in class BasicQueryMetadataWrappermetadataID - Metadata identifierQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic String getName(Object metadataID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetName in interface QueryMetadataInterfacegetName in class BasicQueryMetadataWrappermetadataID - Metadata identifierQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic List getElementIDsInGroupID(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetElementIDsInGroupID in interface QueryMetadataInterfacegetElementIDsInGroupID in class BasicQueryMetadataWrappergroupID - Group IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Object getGroupIDForElementID(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetGroupIDForElementID in interface QueryMetadataInterfacegetGroupIDForElementID in class BasicQueryMetadataWrapperelementID - Element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic String getElementRuntimeTypeName(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfaceDataTypeManager.DefaultDataTypes.getElementRuntimeTypeName in interface QueryMetadataInterfacegetElementRuntimeTypeName in class BasicQueryMetadataWrapperQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic String getDefaultValue(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetDefaultValue in interface QueryMetadataInterfacegetDefaultValue in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Object getMaximumValue(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetMaximumValue in interface QueryMetadataInterfacegetMaximumValue in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Object getMinimumValue(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetMinimumValue in interface QueryMetadataInterfacegetMinimumValue in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic float getDistinctValues(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetDistinctValues in interface QueryMetadataInterfacegetDistinctValues in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getDistinctValues(java.lang.Object)public float getNullValues(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetNullValues in interface QueryMetadataInterfacegetNullValues in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getNullValues(java.lang.Object)public QueryNode getVirtualPlan(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetVirtualPlan in interface QueryMetadataInterfacegetVirtualPlan in class BasicQueryMetadataWrapperTeiidComponentExceptionQueryMetadataExceptionpublic boolean isVirtualGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfaceisVirtualGroup in interface QueryMetadataInterfaceisVirtualGroup in class BasicQueryMetadataWrapperQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic boolean hasMaterialization(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacehasMaterialization in interface QueryMetadataInterfacehasMaterialization in class BasicQueryMetadataWrappergroupID - the groupID of the virtual group in question.QueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.hasMaterialization(java.lang.Object)public Object getMaterialization(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacenull if the given virtual group has no Materialization.getMaterialization in interface QueryMetadataInterfacegetMaterialization in class BasicQueryMetadataWrappergroupID - the groupID of a virtual group that has a Materialization.TeiidComponentException - Unexpected internal system problem during requestQueryMetadataException - Metadata implementation detected a problem during the requestQueryMetadataInterface.getMaterialization(java.lang.Object)public Object getMaterializationStage(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacenull
if the given virtual group has no Materialization.getMaterializationStage in interface QueryMetadataInterfacegetMaterializationStage in class BasicQueryMetadataWrappergroupID - the groupID of a virtual group that has a Materialization.TeiidComponentException - Unexpected internal system problem during requestQueryMetadataException - Metadata implementation detected a problem during the requestQueryMetadataInterface.getMaterializationStage(java.lang.Object)public boolean isVirtualModel(Object modelID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfaceisVirtualModel in interface QueryMetadataInterfaceisVirtualModel in class BasicQueryMetadataWrapperQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic boolean elementSupports(Object elementID, int supportConstant) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfaceelementSupports in interface QueryMetadataInterfaceelementSupports in class BasicQueryMetadataWrapperelementID - Element metadata IDsupportConstant - Constant from SupportConstants.ElementQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Collection getIndexesInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetIndexesInGroup in interface QueryMetadataInterfacegetIndexesInGroup in class BasicQueryMetadataWrappergroupID - Metadata identifier specifying groupQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getIndexesInGroup(java.lang.Object)public Collection getUniqueKeysInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetUniqueKeysInGroup in interface QueryMetadataInterfacegetUniqueKeysInGroup in class BasicQueryMetadataWrappergroupID - Metadata identifier specifying groupQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic Collection getForeignKeysInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetForeignKeysInGroup in interface QueryMetadataInterfacegetForeignKeysInGroup in class BasicQueryMetadataWrappergroupID - Metadata identifier specifying groupQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic List getElementIDsInIndex(Object index) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetElementIDsInIndex in interface QueryMetadataInterfacegetElementIDsInIndex in class BasicQueryMetadataWrapperindex - Index identifier, as returned by QueryMetadataInterface.getIndexesInGroup(java.lang.Object)QueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getElementIDsInIndex(java.lang.Object)public List getElementIDsInKey(Object keyID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetElementIDsInKey in interface QueryMetadataInterfacegetElementIDsInKey in class BasicQueryMetadataWrapperkeyID - Key identifier, as returned by QueryMetadataInterface.getUniqueKeysInGroup(java.lang.Object)QueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic boolean groupSupports(Object groupID, int groupConstant) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegroupSupports in interface QueryMetadataInterfacegroupSupports in class BasicQueryMetadataWrappergroupID - Group metadata IDgroupConstant - Constant from SupportConstants.GroupQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic String getVirtualDatabaseName() throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetVirtualDatabaseName in interface QueryMetadataInterfacegetVirtualDatabaseName in class BasicQueryMetadataWrapperQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getVirtualDatabaseName()public Collection getAccessPatternsInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetAccessPatternsInGroup in interface QueryMetadataInterfacegetAccessPatternsInGroup in class BasicQueryMetadataWrappergroupID - Metadata identifier specifying groupQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getAccessPatternsInGroup(Object)public List getElementIDsInAccessPattern(Object accessPattern) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetElementIDsInAccessPattern in interface QueryMetadataInterfacegetElementIDsInAccessPattern in class BasicQueryMetadataWrapperaccessPattern - access pattern identifier, as returned by QueryMetadataInterface.getAccessPatternsInGroup(java.lang.Object)QueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getElementIDsInAccessPattern(Object)public float getCardinality(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetCardinality in interface QueryMetadataInterfacegetCardinality in class BasicQueryMetadataWrappergroupID - Metadata identifier specifying groupTeiidComponentExceptionQueryMetadataExceptionpublic Properties getExtensionProperties(Object metadataID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetExtensionProperties in interface QueryMetadataInterfacegetExtensionProperties in class BasicQueryMetadataWrappermetadataID - Typically element, group, model, or procedureQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic int getElementLength(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfaceDataTypeManager.DefaultDataTypes.getElementLength in interface QueryMetadataInterfacegetElementLength in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic int getPosition(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetPosition in interface QueryMetadataInterfacegetPosition in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic int getPrecision(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetPrecision in interface QueryMetadataInterfacegetPrecision in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic int getRadix(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetRadix in interface QueryMetadataInterfacegetRadix in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic int getScale(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfacegetScale in interface QueryMetadataInterfacegetScale in class BasicQueryMetadataWrapperelementID - The element IDQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic String getNativeType(Object elementID) throws TeiidComponentException, QueryMetadataException
getNativeType in interface QueryMetadataInterfacegetNativeType in class BasicQueryMetadataWrapperelementID - Element identifierQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestQueryMetadataInterface.getNativeType(java.lang.Object)public boolean isProcedure(Object elementID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfaceisProcedure in interface QueryMetadataInterfaceisProcedure in class BasicQueryMetadataWrapperelementID - Group identifierQueryMetadataException - Metadata implementation detected a problem during the requestTeiidComponentException - Unexpected internal system problem during requestpublic boolean isTemporaryTable(Object groupID) throws TeiidComponentException, QueryMetadataException
QueryMetadataInterfaceisTemporaryTable in interface QueryMetadataInterfaceisTemporaryTable in class BasicQueryMetadataWrappergroupID - Group to checkTeiidComponentExceptionQueryMetadataExceptionpublic Object addToMetadataCache(Object metadataID, String key, Object value) throws TeiidComponentException, QueryMetadataException
addToMetadataCache in interface QueryMetadataInterfaceaddToMetadataCache in class BasicQueryMetadataWrapperTeiidComponentExceptionQueryMetadataExceptionpublic Object getFromMetadataCache(Object metadataID, String key) throws TeiidComponentException, QueryMetadataException
getFromMetadataCache in interface QueryMetadataInterfacegetFromMetadataCache in class BasicQueryMetadataWrapperTeiidComponentExceptionQueryMetadataExceptionpublic boolean isScalarGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
isScalarGroup in interface QueryMetadataInterfaceisScalarGroup in class BasicQueryMetadataWrapperTeiidComponentExceptionQueryMetadataExceptionpublic Object getPrimaryKey(Object metadataID)
getPrimaryKey in interface QueryMetadataInterfacegetPrimaryKey in class BasicQueryMetadataWrapperpublic boolean isMultiSource(Object modelId) throws QueryMetadataException, TeiidComponentException
isMultiSource in interface QueryMetadataInterfaceisMultiSource in class BasicQueryMetadataWrapperQueryMetadataExceptionTeiidComponentExceptionpublic boolean isMultiSourceElement(Object elementId) throws QueryMetadataException, TeiidComponentException
isMultiSourceElement in interface QueryMetadataInterfaceisMultiSourceElement in class BasicQueryMetadataWrapperQueryMetadataExceptionTeiidComponentExceptionpublic Map<Expression,Integer> getFunctionBasedExpressions(Object metadataID)
getFunctionBasedExpressions in interface QueryMetadataInterfacegetFunctionBasedExpressions in class BasicQueryMetadataWrapperpublic String getExtensionProperty(Object metadataID, String key, boolean checkUnqualified)
getExtensionProperty in interface QueryMetadataInterfacegetExtensionProperty in class BasicQueryMetadataWrapperCopyright © 2018 JBoss by Red Hat. All rights reserved.