Package org.teiid.query.metadata
Class TransformationMetadata
- java.lang.Object
-
- org.teiid.query.metadata.BasicQueryMetadata
-
- org.teiid.query.metadata.TransformationMetadata
-
- All Implemented Interfaces:
Serializable,QueryMetadataInterface
public class TransformationMetadata extends BasicQueryMetadata implements Serializable
Teiid's implementation of the QueryMetadataInterface that reads columns, groups, models etc. from the metadata object model.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringALLOWED_LANGUAGESstatic charDELIMITER_CHARDelimiter character used when specifying fully qualified entity namesstatic StringDELIMITER_STRINGstatic PropertiesEMPTY_PROPSstatic StringNOT_EXISTS_MESSAGE-
Fields inherited from interface org.teiid.query.metadata.QueryMetadataInterface
UNKNOWN_CARDINALITY
-
-
Constructor Summary
Constructors Constructor Description TransformationMetadata(VDBMetaData vdbMetadata, CompositeMetadataStore store, Map<String,VDBResources.Resource> vdbEntries, FunctionTree systemFunctions, Collection<FunctionTree> functionTrees)TransformationMetadata constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectaddToMetadataCache(Object metadataID, String key, Object value)booleanelementSupports(Object elementID, int elementConstant)Determine whether the specified element supports some feature.Collection<KeyRecord>getAccessPatternsInGroup(Object groupID)Get the access patterns for the specified groupbyte[]getBinaryVDBResource(String resourcePath)Gets the contents of a VDB resource in binary form.floatgetCardinality(Object groupID)Return the cardinality for this groupStringgetCharacterVDBResource(String resourcePath)Gets the contents of a VDB resource as a String.static ColumngetColumn(String elementName, Table table, String shortElementName)Class<?>getDataTypeClass(String typeOrDomainName)Get the runtime type class for the given type name, which may include domainsStringgetDefaultValue(Object elementID)Get the element's default value for an element symbolStringgetDeletePlan(Object groupID)Get procedure defining the delete plan for this group.TransformationMetadatagetDesignTimeMetadata()Get the metadata without visibility and session tablesfloatgetDistinctValues(Object elementID)Get the number of distinct values for this column.ColumngetElementID(String elementName)Get the metadata-implementation identifier object for the given element name.List<Column>getElementIDsInAccessPattern(Object accessPattern)Get the elements in the access patternList<Column>getElementIDsInGroupID(Object groupID)Get list of metadata element IDs for a group IDList<Column>getElementIDsInIndex(Object index)List<Column>getElementIDsInKey(Object key)Get the elements in the keyintgetElementLength(Object elementID)Get the element length for a given element ID.StringgetElementRuntimeTypeName(Object elementID)Get the element type name for an element symbol.PropertiesgetExtensionProperties(Object metadataID)Get all extension properties defined on this metadata objectStringgetExtensionProperty(Object metadataID, String key, boolean checkUnqualified)Collection<ForeignKey>getForeignKeysInGroup(Object groupID)Get the foreign keys for the specified groupStringgetFormat(Object elementID)Get the element's formatObjectgetFromMetadataCache(Object metadataID, String key)StringgetFullName(Object metadataID)Get the fully qualified (unique) name of the metadata identifier specified.FunctionLibrarygetFunctionLibrary()TablegetGroupID(String groupName)Get the metadata-implementation identifier object for the given group name.ObjectgetGroupIDForElementID(Object elementID)Get containg group ID given element IDCollection<String>getGroupsForPartialName(String partialGroupName)Get a collection of group names that match the partially qualified group name.Set<String>getImportedModels()Collection<KeyRecord>getIndexesInGroup(Object groupID)Get the indexes for the specified groupStringgetInsertPlan(Object groupID)Get procedure defining the insert plan for this group.ObjectgetMaterialization(Object groupID)Accquire the physical group ID (the Materialization) for the given virtual group ID, ornullif the given virtual group has no Materialization.ObjectgetMaterializationStage(Object groupID)Accquire the physical group ID that is used for the staging area for loading (the Materialization) for the given virtual group ID, ornullif the given virtual group has no Materialization.ObjectgetMaximumValue(Object elementID)Get the element's default value for an element symbolintgetMaxSetSize(Object modelID)Get the max set size for the specified model.CompositeMetadataStoregetMetadataStore()ObjectgetMinimumValue(Object elementID)Get the element's minimum value for an element symbolObjectgetModelID(Object groupOrElementID)Get the metadata-implementation identifier object for the model containing the specified group or element ID.SchemagetModelID(String modelName)List<Schema>getModelIDs()StringgetName(Object metadataID)Get the name of the metadata identifier specified.StringgetNameInSource(Object metadataID)Get the name in source of the metadata identifier specified.StringgetNativeType(Object elementID)Get the native type of the element specified.floatgetNullValues(Object elementID)Get the number of distinct values for this column.Map<String,DataPolicyMetadata>getPolicies()intgetPosition(Object elementID)Get the element's position in the groupintgetPrecision(Object elementID)Get the element's precisionObjectgetPrimaryKey(Object metadataID)ObjectgetPrimaryKeyIDForForeignKeyID(Object foreignKeyID)Get the corresponding primary key ID for the specified foreign key IDFunctionMethodgetPushdownFunction(Object modelID, String fullName)intgetRadix(Object elementID)Get the element's radixintgetScale(Object elementID)Get the element's scaleScriptEnginegetScriptEngineDirect(String language)StoredProcedureInfogetStoredProcedureInfoForProcedure(String name)Get the the StoredProcedureInfo based on the fully qualified procedure nameCollection<KeyRecord>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 collectionStringgetUpdatePlan(Object groupID)Get procedure defining the update plan for this group.VDBMetaDatagetVdbMetaData()BlobImplgetVDBResourceAsBlob(String resourcePath)ClobImplgetVDBResourceAsClob(String resourcePath)SQLXMLImplgetVDBResourceAsSQLXML(String resourcePath)String[]getVDBResourcePaths()Gets the resource paths of all the resources in the VDB.StringgetVirtualDatabaseName()Get the currently connected virtual database name.QueryNodegetVirtualPlan(Object groupID)Get virtual plan for a group symbol.booleangroupSupports(Object groupID, int groupConstant)Determine whether the specified group supports some feature.booleanhasMaterialization(Object groupID)Determine whether given virtual group has an associated Materialization.booleanhasProcedure(String name)Return true if a procedure exists with the given name (partial or fqn)booleanisEnvAllowed()booleanisLongRanks()booleanisProcedure(Object groupID)Determine whether this is a procedurebooleanisVariadic(Object metadataID)booleanisVirtualGroup(Object groupID)Determine whether a group is virtual or not.booleanisVirtualModel(Object modelID)Determine whether a model is virtual or not.booleanmodelSupports(Object modelID, int modelConstant)Determine whether the specified model supports some feature.voidsetAllowENV(boolean b)voidsetHiddenResolvable(boolean hiddenResolvable)voidsetLongRanks(boolean longRanks)voidsetPolicies(Map<String,DataPolicyMetadata> policies)voidsetUseOutputNames(boolean useOutputNames)voidsetWidenComparisonToString(boolean widenComparisonToString)booleanuseOutputName()booleanwidenComparisonToString()-
Methods inherited from class org.teiid.query.metadata.BasicQueryMetadata
findShortName, getFunctionBasedExpressions, getScriptEngine, getSessionMetadata, getXMLSchemas, isMultiSource, isMultiSourceElement, isPseudo, isScalarGroup, isTemporaryTable
-
-
-
-
Field Detail
-
ALLOWED_LANGUAGES
public static final String ALLOWED_LANGUAGES
- See Also:
- Constant Field Values
-
DELIMITER_CHAR
public static final char DELIMITER_CHAR
Delimiter character used when specifying fully qualified entity names- See Also:
- Constant Field Values
-
DELIMITER_STRING
public static final String DELIMITER_STRING
-
NOT_EXISTS_MESSAGE
public static String NOT_EXISTS_MESSAGE
-
EMPTY_PROPS
public static Properties EMPTY_PROPS
-
-
Constructor Detail
-
TransformationMetadata
public TransformationMetadata(VDBMetaData vdbMetadata, CompositeMetadataStore store, Map<String,VDBResources.Resource> vdbEntries, FunctionTree systemFunctions, Collection<FunctionTree> functionTrees)
TransformationMetadata constructor
-
-
Method Detail
-
getElementID
public Column getElementID(String elementName) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the metadata-implementation identifier object for the given element name.- Specified by:
getElementIDin interfaceQueryMetadataInterface- Overrides:
getElementIDin classBasicQueryMetadata- Parameters:
elementName- Fully qualified element name- Returns:
- Metadata identifier for this element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getElementID(String)
-
getColumn
public static Column getColumn(String elementName, Table table, String shortElementName) throws QueryMetadataException
- Throws:
QueryMetadataException
-
getGroupID
public Table getGroupID(String groupName) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the metadata-implementation identifier object for the given group name.- Specified by:
getGroupIDin interfaceQueryMetadataInterface- Overrides:
getGroupIDin classBasicQueryMetadata- Parameters:
groupName- Fully qualified group name- Returns:
- Metadata identifier for this group
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getGroupID(String)
-
getGroupsForPartialName
public Collection<String> getGroupsForPartialName(String partialGroupName) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet a collection of group names that match the partially qualified group name.- Specified by:
getGroupsForPartialNamein interfaceQueryMetadataInterface- Overrides:
getGroupsForPartialNamein classBasicQueryMetadata- Parameters:
partialGroupName- Partially qualified group name- Returns:
- A collection of groups whose names are matched by the partial name.
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getGroupID(String)
-
getModelID
public Object getModelID(Object groupOrElementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the metadata-implementation identifier object for the model containing the specified group or element ID.- Specified by:
getModelIDin interfaceQueryMetadataInterface- Overrides:
getModelIDin classBasicQueryMetadata- Parameters:
groupOrElementID- Metadata group or element ID- Returns:
- Metadata identifier for the model
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getModelID(Object)
-
getFullName
public String getFullName(Object metadataID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the fully qualified (unique) name of the metadata identifier specified. This metadata identifier was previously returned by some other method.- Specified by:
getFullNamein interfaceQueryMetadataInterface- Overrides:
getFullNamein classBasicQueryMetadata- Parameters:
metadataID- Metadata identifier- Returns:
- Metadata identifier for this model
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getFullName(Object)
-
getName
public String getName(Object metadataID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the name of the metadata identifier specified. This metadata identifier was previously returned by some other method.- Specified by:
getNamein interfaceQueryMetadataInterface- Overrides:
getNamein classBasicQueryMetadata- Parameters:
metadataID- Metadata identifier- Returns:
- Metadata identifier for this model
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getElementIDsInGroupID
public List<Column> getElementIDsInGroupID(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet list of metadata element IDs for a group ID- Specified by:
getElementIDsInGroupIDin interfaceQueryMetadataInterface- Overrides:
getElementIDsInGroupIDin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getElementIDsInGroupID(Object)
-
getGroupIDForElementID
public Object getGroupIDForElementID(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet containg group ID given element ID- Specified by:
getGroupIDForElementIDin interfaceQueryMetadataInterface- Overrides:
getGroupIDForElementIDin classBasicQueryMetadata- Parameters:
elementID- Element ID- Returns:
- Group ID containing elementID
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getGroupIDForElementID(Object)
-
hasProcedure
public boolean hasProcedure(String name) throws TeiidComponentException
Description copied from interface:QueryMetadataInterfaceReturn true if a procedure exists with the given name (partial or fqn)- Specified by:
hasProcedurein interfaceQueryMetadataInterface- Overrides:
hasProcedurein classBasicQueryMetadata- Returns:
- Throws:
TeiidComponentException
-
getStoredProcedureInfoForProcedure
public StoredProcedureInfo getStoredProcedureInfoForProcedure(String name) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the the StoredProcedureInfo based on the fully qualified procedure name- Specified by:
getStoredProcedureInfoForProcedurein interfaceQueryMetadataInterface- Overrides:
getStoredProcedureInfoForProcedurein classBasicQueryMetadata- Parameters:
name- the fully qualified stored procedure name- Returns:
- StoredProcedureInfo containing the runtime model id
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getStoredProcedureInfoForProcedure(String)
-
getElementRuntimeTypeName
public String getElementRuntimeTypeName(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element type name for an element symbol. These types are defined inDataTypeManager.DefaultDataTypes.- Specified by:
getElementRuntimeTypeNamein interfaceQueryMetadataInterface- Overrides:
getElementRuntimeTypeNamein classBasicQueryMetadata- Parameters:
elementID- The element symbol- Returns:
- The element data type
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getDefaultValue
public String getDefaultValue(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's default value for an element symbol- Specified by:
getDefaultValuein interfaceQueryMetadataInterface- Overrides:
getDefaultValuein classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The default value of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getMinimumValue
public Object getMinimumValue(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's minimum value for an element symbol- Specified by:
getMinimumValuein interfaceQueryMetadataInterface- Overrides:
getMinimumValuein classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The minimum value of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getMaximumValue
public Object getMaximumValue(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's default value for an element symbol- Specified by:
getMaximumValuein interfaceQueryMetadataInterface- Overrides:
getMaximumValuein classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The maximum value of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
isVirtualGroup
public boolean isVirtualGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceDetermine whether a group is virtual or not.- Specified by:
isVirtualGroupin interfaceQueryMetadataInterface- Overrides:
isVirtualGroupin classBasicQueryMetadata- Parameters:
groupID- Group symbol- Returns:
- True if virtual
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.isVirtualGroup(Object)
-
isProcedure
public boolean isProcedure(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceDetermine whether this is a procedure- Specified by:
isProcedurein interfaceQueryMetadataInterface- Overrides:
isProcedurein classBasicQueryMetadata- Parameters:
groupID- Group identifier- Returns:
- True if it is an procedure; false otherwise
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
isVirtualModel
public boolean isVirtualModel(Object modelID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceDetermine whether a model is virtual or not.- Specified by:
isVirtualModelin interfaceQueryMetadataInterface- Overrides:
isVirtualModelin classBasicQueryMetadata- Parameters:
modelID- model symbol- Returns:
- True if virtual
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.isVirtualModel(Object)
-
getVirtualPlan
public QueryNode getVirtualPlan(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet virtual plan for a group symbol.- Specified by:
getVirtualPlanin interfaceQueryMetadataInterface- Overrides:
getVirtualPlanin classBasicQueryMetadata- Parameters:
groupID- Group- Returns:
- Root of tree of QueryNode objects
- Throws:
TeiidComponentExceptionQueryMetadataException
-
getInsertPlan
public String getInsertPlan(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from class:BasicQueryMetadataGet procedure defining the insert plan for this group.- Specified by:
getInsertPlanin interfaceQueryMetadataInterface- Overrides:
getInsertPlanin classBasicQueryMetadata- Parameters:
groupID- Group- Returns:
- A string giving the procedure for inserts.
- Throws:
TeiidComponentExceptionQueryMetadataException
-
getUpdatePlan
public String getUpdatePlan(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from class:BasicQueryMetadataGet procedure defining the update plan for this group.- Specified by:
getUpdatePlanin interfaceQueryMetadataInterface- Overrides:
getUpdatePlanin classBasicQueryMetadata- Parameters:
groupID- Group- Returns:
- A string giving the procedure for inserts.
- Throws:
TeiidComponentExceptionQueryMetadataException
-
getDeletePlan
public String getDeletePlan(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from class:BasicQueryMetadataGet procedure defining the delete plan for this group.- Specified by:
getDeletePlanin interfaceQueryMetadataInterface- Overrides:
getDeletePlanin classBasicQueryMetadata- Parameters:
groupID- Group- Returns:
- A string giving the procedure for inserts.
- Throws:
TeiidComponentExceptionQueryMetadataException
-
modelSupports
public boolean modelSupports(Object modelID, int modelConstant) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceDetermine whether the specified model supports some feature.- Specified by:
modelSupportsin interfaceQueryMetadataInterface- Overrides:
modelSupportsin classBasicQueryMetadata- Parameters:
modelID- Metadata identifier specifying the modelmodelConstant- Constant fromSupportConstants.Model- Returns:
- True if model supports feature
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.modelSupports(Object, int)
-
groupSupports
public boolean groupSupports(Object groupID, int groupConstant) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceDetermine whether the specified group supports some feature.- Specified by:
groupSupportsin interfaceQueryMetadataInterface- Overrides:
groupSupportsin classBasicQueryMetadata- Parameters:
groupID- Group metadata IDgroupConstant- Constant fromSupportConstants.Group- Returns:
- True if group supports feature
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.groupSupports(Object, int)
-
elementSupports
public boolean elementSupports(Object elementID, int elementConstant) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceDetermine whether the specified element supports some feature.- Specified by:
elementSupportsin interfaceQueryMetadataInterface- Overrides:
elementSupportsin classBasicQueryMetadata- Parameters:
elementID- Element metadata IDelementConstant- Constant fromSupportConstants.Element- Returns:
- True if element supports feature
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.elementSupports(Object, int)
-
getMaxSetSize
public int getMaxSetSize(Object modelID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the max set size for the specified model.- Specified by:
getMaxSetSizein interfaceQueryMetadataInterface- Overrides:
getMaxSetSizein classBasicQueryMetadata- Parameters:
modelID- Metadata identifier specifying model- Returns:
- Maximum set size
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getMaxSetSize(Object)
-
getIndexesInGroup
public Collection<KeyRecord> getIndexesInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the indexes for the specified group- Specified by:
getIndexesInGroupin interfaceQueryMetadataInterface- Overrides:
getIndexesInGroupin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getIndexesInGroup(java.lang.Object)
-
getUniqueKeysInGroup
public Collection<KeyRecord> getUniqueKeysInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the unique keys for the specified group (primary and unique keys) The primary key if present will be first in the collection- Specified by:
getUniqueKeysInGroupin interfaceQueryMetadataInterface- Overrides:
getUniqueKeysInGroupin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getUniqueKeysInGroup(Object)
-
getForeignKeysInGroup
public Collection<ForeignKey> getForeignKeysInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the foreign keys for the specified group- Specified by:
getForeignKeysInGroupin interfaceQueryMetadataInterface- Overrides:
getForeignKeysInGroupin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getForeignKeysInGroup(Object)
-
getPrimaryKeyIDForForeignKeyID
public Object getPrimaryKeyIDForForeignKeyID(Object foreignKeyID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the corresponding primary key ID for the specified foreign key ID- Specified by:
getPrimaryKeyIDForForeignKeyIDin interfaceQueryMetadataInterface- Overrides:
getPrimaryKeyIDForForeignKeyIDin classBasicQueryMetadata- Parameters:
foreignKeyID- Metadata identifier of a foreign key- Returns:
- Metadata ID of the corresponding primary key
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getPrimaryKeyIDForForeignKeyID(Object)
-
getAccessPatternsInGroup
public Collection<KeyRecord> getAccessPatternsInGroup(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the access patterns for the specified group- Specified by:
getAccessPatternsInGroupin interfaceQueryMetadataInterface- Overrides:
getAccessPatternsInGroupin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getAccessPatternsInGroup(Object)
-
getElementIDsInIndex
public List<Column> getElementIDsInIndex(Object index) throws TeiidComponentException, QueryMetadataException
-
getElementIDsInKey
public List<Column> getElementIDsInKey(Object key) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the elements in the key- Specified by:
getElementIDsInKeyin interfaceQueryMetadataInterface- Overrides:
getElementIDsInKeyin classBasicQueryMetadata- Parameters:
key- Key identifier, as returned byQueryMetadataInterface.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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getElementIDsInKey(Object)
-
getElementIDsInAccessPattern
public List<Column> getElementIDsInAccessPattern(Object accessPattern) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the elements in the access pattern- Specified by:
getElementIDsInAccessPatternin interfaceQueryMetadataInterface- Overrides:
getElementIDsInAccessPatternin classBasicQueryMetadata- Parameters:
accessPattern- access pattern identifier, as returned byQueryMetadataInterface.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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getElementIDsInAccessPattern(Object)
-
hasMaterialization
public boolean hasMaterialization(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceDetermine whether given virtual group has an associated Materialization. A Materialization is a cached version of the representation of a virtual group.- Specified by:
hasMaterializationin interfaceQueryMetadataInterface- Overrides:
hasMaterializationin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- Since:
- 4.2
- See Also:
QueryMetadataInterface.hasMaterialization(java.lang.Object)
-
getMaterialization
public Object getMaterialization(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceAccquire the physical group ID (the Materialization) for the given virtual group ID, ornullif the given virtual group has no Materialization.- Specified by:
getMaterializationin interfaceQueryMetadataInterface- Overrides:
getMaterializationin classBasicQueryMetadata- 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:
TeiidComponentException- Unexpected internal system problem during requestQueryMetadataException- Metadata implementation detected a problem during the request- Since:
- 4.2
- See Also:
QueryMetadataInterface.getMaterialization(java.lang.Object)
-
getMaterializationStage
public Object getMaterializationStage(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceAccquire the physical group ID that is used for the staging area for loading (the Materialization) for the given virtual group ID, ornullif the given virtual group has no Materialization.- Specified by:
getMaterializationStagein interfaceQueryMetadataInterface- Overrides:
getMaterializationStagein classBasicQueryMetadata- 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:
TeiidComponentException- Unexpected internal system problem during requestQueryMetadataException- Metadata implementation detected a problem during the request- Since:
- 4.2
- See Also:
QueryMetadataInterface.getMaterializationStage(java.lang.Object)
-
getVirtualDatabaseName
public String getVirtualDatabaseName() throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the currently connected virtual database name. If the current metadata is not virtual-database specific, then null should be returned.- Specified by:
getVirtualDatabaseNamein interfaceQueryMetadataInterface- Overrides:
getVirtualDatabaseNamein classBasicQueryMetadata- Returns:
- Name of current virtual database
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getVirtualDatabaseName()
-
getVdbMetaData
public VDBMetaData getVdbMetaData()
-
getCardinality
public float getCardinality(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceReturn the cardinality for this group- Specified by:
getCardinalityin interfaceQueryMetadataInterface- Overrides:
getCardinalityin classBasicQueryMetadata- Parameters:
groupID- Metadata identifier specifying group- Returns:
- cardinality for the given group. If unknown, return UNKNOWN_CARDINALITY.
- Throws:
TeiidComponentExceptionQueryMetadataException
-
getNameInSource
public String getNameInSource(Object metadataID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the name in source of the metadata identifier specified. This metadata identifier was previously returned by some other method.- Specified by:
getNameInSourcein interfaceQueryMetadataInterface- Overrides:
getNameInSourcein classBasicQueryMetadata- Parameters:
metadataID- Metadata identifier- Returns:
- Name in source as a string.
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getElementLength
public int getElementLength(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element length for a given element ID. These types are defined inDataTypeManager.DefaultDataTypes.- Specified by:
getElementLengthin interfaceQueryMetadataInterface- Overrides:
getElementLengthin classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The element length
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getPosition
public int getPosition(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's position in the group- Specified by:
getPositionin interfaceQueryMetadataInterface- Overrides:
getPositionin classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The position of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getPrecision
public int getPrecision(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's precision- Specified by:
getPrecisionin interfaceQueryMetadataInterface- Overrides:
getPrecisionin classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The precision of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getRadix
public int getRadix(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's radix- Specified by:
getRadixin interfaceQueryMetadataInterface- Overrides:
getRadixin classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The radix of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getFormat
public String getFormat(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's format- Specified by:
getFormatin interfaceQueryMetadataInterface- Overrides:
getFormatin classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The format of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getScale
public int getScale(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the element's scale- Specified by:
getScalein interfaceQueryMetadataInterface- Overrides:
getScalein classBasicQueryMetadata- Parameters:
elementID- The element ID- Returns:
- The scale of the element
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getDistinctValues
public float getDistinctValues(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet 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:
getDistinctValuesin interfaceQueryMetadataInterface- Overrides:
getDistinctValuesin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getDistinctValues(java.lang.Object)
-
getNullValues
public float getNullValues(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet 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:
getNullValuesin interfaceQueryMetadataInterface- Overrides:
getNullValuesin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request- See Also:
QueryMetadataInterface.getNullValues(java.lang.Object)
-
getNativeType
public String getNativeType(Object elementID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the native type of the element specified. This element identifier was previously returned by some other method.- Specified by:
getNativeTypein interfaceQueryMetadataInterface- Overrides:
getNativeTypein classBasicQueryMetadata- Parameters:
elementID- Element identifier- Returns:
- Native type name
- Throws:
QueryMetadataException- Metadata implementation detected a problem during the requestTeiidComponentException- Unexpected internal system problem during request
-
getExtensionProperties
public Properties getExtensionProperties(Object metadataID) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet all extension properties defined on this metadata object- Specified by:
getExtensionPropertiesin interfaceQueryMetadataInterface- Overrides:
getExtensionPropertiesin classBasicQueryMetadata- 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 requestTeiidComponentException- Unexpected internal system problem during request
-
getExtensionProperty
public String getExtensionProperty(Object metadataID, String key, boolean checkUnqualified)
- Specified by:
getExtensionPropertyin interfaceQueryMetadataInterface- Overrides:
getExtensionPropertyin classBasicQueryMetadata
-
getBinaryVDBResource
public byte[] getBinaryVDBResource(String resourcePath) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGets the contents of a VDB resource in binary form.- Specified by:
getBinaryVDBResourcein interfaceQueryMetadataInterface- Overrides:
getBinaryVDBResourcein classBasicQueryMetadata- Parameters:
resourcePath- a path returned by getVDBResourcePaths()- Returns:
- the binary contents of the resource in a byte[]
- Throws:
TeiidComponentException- Unexpected internal system problem during requestQueryMetadataException- Metadata implementation detected a problem during the request- Since:
- 4.3
- See Also:
BasicQueryMetadata.getBinaryVDBResource(java.lang.String)
-
getVDBResourceAsSQLXML
public SQLXMLImpl getVDBResourceAsSQLXML(String resourcePath)
-
getCharacterVDBResource
public String getCharacterVDBResource(String resourcePath) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGets the contents of a VDB resource as a String.- Specified by:
getCharacterVDBResourcein interfaceQueryMetadataInterface- Overrides:
getCharacterVDBResourcein classBasicQueryMetadata- Parameters:
resourcePath- a path returned by getVDBResourcePaths()- Returns:
- the contents of the resource as a String.
- Throws:
TeiidComponentException- Unexpected internal system problem during requestQueryMetadataException- Metadata implementation detected a problem during the request- Since:
- 4.3
- See Also:
BasicQueryMetadata.getCharacterVDBResource(java.lang.String)
-
getMetadataStore
public CompositeMetadataStore getMetadataStore()
-
getVDBResourcePaths
public String[] getVDBResourcePaths() throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGets the resource paths of all the resources in the VDB.- Specified by:
getVDBResourcePathsin interfaceQueryMetadataInterface- Overrides:
getVDBResourcePathsin classBasicQueryMetadata- Returns:
- an array of resource paths of the resources in the VDB
- Throws:
TeiidComponentException- Unexpected internal system problem during requestQueryMetadataException- Metadata implementation detected a problem during the request- Since:
- 4.3
- See Also:
BasicQueryMetadata.getVDBResourcePaths()
-
addToMetadataCache
public Object addToMetadataCache(Object metadataID, String key, Object value)
- Specified by:
addToMetadataCachein interfaceQueryMetadataInterface- Overrides:
addToMetadataCachein classBasicQueryMetadata
-
getFromMetadataCache
public Object getFromMetadataCache(Object metadataID, String key) throws TeiidComponentException, QueryMetadataException
- Specified by:
getFromMetadataCachein interfaceQueryMetadataInterface- Overrides:
getFromMetadataCachein classBasicQueryMetadata- Throws:
TeiidComponentExceptionQueryMetadataException
-
getFunctionLibrary
public FunctionLibrary getFunctionLibrary()
- Specified by:
getFunctionLibraryin interfaceQueryMetadataInterface- Overrides:
getFunctionLibraryin classBasicQueryMetadata
-
getPrimaryKey
public Object getPrimaryKey(Object metadataID)
- Specified by:
getPrimaryKeyin interfaceQueryMetadataInterface- Overrides:
getPrimaryKeyin classBasicQueryMetadata
-
getDesignTimeMetadata
public TransformationMetadata getDesignTimeMetadata()
Description copied from interface:QueryMetadataInterfaceGet the metadata without visibility and session tables- Specified by:
getDesignTimeMetadatain interfaceQueryMetadataInterface- Overrides:
getDesignTimeMetadatain classBasicQueryMetadata- Returns:
-
getImportedModels
public Set<String> getImportedModels()
- Specified by:
getImportedModelsin interfaceQueryMetadataInterface- Overrides:
getImportedModelsin classBasicQueryMetadata
-
getScriptEngineDirect
public ScriptEngine getScriptEngineDirect(String language) throws TeiidProcessingException
- Overrides:
getScriptEngineDirectin classBasicQueryMetadata- Returns:
- Throws:
TeiidProcessingException
-
isVariadic
public boolean isVariadic(Object metadataID)
- Specified by:
isVariadicin interfaceQueryMetadataInterface- Overrides:
isVariadicin classBasicQueryMetadata
-
getModelID
public Schema getModelID(String modelName) throws TeiidComponentException, QueryMetadataException
- Specified by:
getModelIDin interfaceQueryMetadataInterface- Overrides:
getModelIDin classBasicQueryMetadata- Throws:
TeiidComponentExceptionQueryMetadataException
-
getModelIDs
public List<Schema> getModelIDs()
- Specified by:
getModelIDsin interfaceQueryMetadataInterface- Overrides:
getModelIDsin classBasicQueryMetadata
-
setPolicies
public void setPolicies(Map<String,DataPolicyMetadata> policies)
-
getPolicies
public Map<String,DataPolicyMetadata> getPolicies()
-
useOutputName
public boolean useOutputName()
- Specified by:
useOutputNamein interfaceQueryMetadataInterface- Overrides:
useOutputNamein classBasicQueryMetadata
-
setUseOutputNames
public void setUseOutputNames(boolean useOutputNames)
-
widenComparisonToString
public boolean widenComparisonToString()
- Specified by:
widenComparisonToStringin interfaceQueryMetadataInterface- Overrides:
widenComparisonToStringin classBasicQueryMetadata
-
setWidenComparisonToString
public void setWidenComparisonToString(boolean widenComparisonToString)
-
setHiddenResolvable
public void setHiddenResolvable(boolean hiddenResolvable)
-
getDataTypeClass
public Class<?> getDataTypeClass(String typeOrDomainName) throws QueryMetadataException
Description copied from interface:QueryMetadataInterfaceGet the runtime type class for the given type name, which may include domains- Specified by:
getDataTypeClassin interfaceQueryMetadataInterface- Overrides:
getDataTypeClassin classBasicQueryMetadata- Returns:
- Throws:
QueryMetadataException
-
isEnvAllowed
public boolean isEnvAllowed()
- Specified by:
isEnvAllowedin interfaceQueryMetadataInterface- Overrides:
isEnvAllowedin classBasicQueryMetadata
-
setAllowENV
public void setAllowENV(boolean b)
-
isLongRanks
public boolean isLongRanks()
- Specified by:
isLongRanksin interfaceQueryMetadataInterface- Overrides:
isLongRanksin classBasicQueryMetadata
-
setLongRanks
public void setLongRanks(boolean longRanks)
-
getPushdownFunction
public FunctionMethod getPushdownFunction(Object modelID, String fullName)
- Specified by:
getPushdownFunctionin interfaceQueryMetadataInterface- Overrides:
getPushdownFunctionin classBasicQueryMetadata
-
-