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 String
ALLOWED_LANGUAGES
static char
DELIMITER_CHAR
Delimiter character used when specifying fully qualified entity namesstatic String
DELIMITER_STRING
static Properties
EMPTY_PROPS
static String
NOT_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 Object
addToMetadataCache(Object metadataID, String key, Object value)
boolean
elementSupports(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.float
getCardinality(Object groupID)
Return the cardinality for this groupString
getCharacterVDBResource(String resourcePath)
Gets the contents of a VDB resource as a String.static Column
getColumn(String elementName, Table table, String shortElementName)
Class<?>
getDataTypeClass(String typeOrDomainName)
Get the runtime type class for the given type name, which may include domainsString
getDefaultValue(Object elementID)
Get the element's default value for an element symbolString
getDeletePlan(Object groupID)
Get procedure defining the delete plan for this group.TransformationMetadata
getDesignTimeMetadata()
Get the metadata without visibility and session tablesfloat
getDistinctValues(Object elementID)
Get the number of distinct values for this column.Column
getElementID(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 keyint
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 objectString
getExtensionProperty(Object metadataID, String key, boolean checkUnqualified)
Collection<ForeignKey>
getForeignKeysInGroup(Object groupID)
Get the foreign keys for the specified groupString
getFormat(Object elementID)
Get the element's formatObject
getFromMetadataCache(Object metadataID, String key)
String
getFullName(Object metadataID)
Get the fully qualified (unique) name of the metadata identifier specified.FunctionLibrary
getFunctionLibrary()
Table
getGroupID(String groupName)
Get the metadata-implementation identifier object for the given group name.Object
getGroupIDForElementID(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 groupString
getInsertPlan(Object groupID)
Get procedure defining the insert plan for this group.Object
getMaterialization(Object groupID)
Accquire the physical group ID (the Materialization) for the given virtual group ID, ornull
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, ornull
if the given virtual group has no Materialization.Object
getMaximumValue(Object elementID)
Get the element's default value for an element symbolint
getMaxSetSize(Object modelID)
Get the max set size for the specified model.CompositeMetadataStore
getMetadataStore()
Object
getMinimumValue(Object elementID)
Get the element's minimum value for an element symbolObject
getModelID(Object groupOrElementID)
Get the metadata-implementation identifier object for the model containing the specified group or element ID.Schema
getModelID(String modelName)
List<Schema>
getModelIDs()
String
getName(Object metadataID)
Get the name of the metadata identifier specified.String
getNameInSource(Object metadataID)
Get the name in source of the metadata identifier specified.String
getNativeType(Object elementID)
Get the native type of the element specified.float
getNullValues(Object elementID)
Get the number of distinct values for this column.Map<String,DataPolicyMetadata>
getPolicies()
int
getPosition(Object elementID)
Get the element's position in the groupint
getPrecision(Object elementID)
Get the element's precisionObject
getPrimaryKey(Object metadataID)
Object
getPrimaryKeyIDForForeignKeyID(Object foreignKeyID)
Get the corresponding primary key ID for the specified foreign key IDFunctionMethod
getPushdownFunction(Object modelID, String fullName)
int
getRadix(Object elementID)
Get the element's radixint
getScale(Object elementID)
Get the element's scaleScriptEngine
getScriptEngineDirect(String language)
StoredProcedureInfo
getStoredProcedureInfoForProcedure(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 collectionString
getUpdatePlan(Object groupID)
Get procedure defining the update plan for this group.VDBMetaData
getVdbMetaData()
BlobImpl
getVDBResourceAsBlob(String resourcePath)
ClobImpl
getVDBResourceAsClob(String resourcePath)
SQLXMLImpl
getVDBResourceAsSQLXML(String resourcePath)
String[]
getVDBResourcePaths()
Gets the resource paths of all the resources in the VDB.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
hasProcedure(String name)
Return true if a procedure exists with the given name (partial or fqn)boolean
isEnvAllowed()
boolean
isLongRanks()
boolean
isProcedure(Object groupID)
Determine whether this is a procedureboolean
isVariadic(Object metadataID)
boolean
isVirtualGroup(Object groupID)
Determine whether a group is virtual or not.boolean
isVirtualModel(Object modelID)
Determine whether a model is virtual or not.boolean
modelSupports(Object modelID, int modelConstant)
Determine whether the specified model supports some feature.void
setAllowENV(boolean b)
void
setHiddenResolvable(boolean hiddenResolvable)
void
setLongRanks(boolean longRanks)
void
setPolicies(Map<String,DataPolicyMetadata> policies)
void
setUseOutputNames(boolean useOutputNames)
void
setWidenComparisonToString(boolean widenComparisonToString)
boolean
useOutputName()
boolean
widenComparisonToString()
-
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:QueryMetadataInterface
Get the metadata-implementation identifier object for the given element name.- Specified by:
getElementID
in interfaceQueryMetadataInterface
- Overrides:
getElementID
in 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:QueryMetadataInterface
Get the metadata-implementation identifier object for the given group name.- Specified by:
getGroupID
in interfaceQueryMetadataInterface
- Overrides:
getGroupID
in 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:QueryMetadataInterface
Get a collection of group names that match the partially qualified group name.- Specified by:
getGroupsForPartialName
in interfaceQueryMetadataInterface
- Overrides:
getGroupsForPartialName
in 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:QueryMetadataInterface
Get the metadata-implementation identifier object for the model containing the specified group or element ID.- Specified by:
getModelID
in interfaceQueryMetadataInterface
- Overrides:
getModelID
in 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: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 interfaceQueryMetadataInterface
- Overrides:
getFullName
in 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:QueryMetadataInterface
Get the name of the metadata identifier specified. This metadata identifier was previously returned by some other method.- Specified by:
getName
in interfaceQueryMetadataInterface
- Overrides:
getName
in 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:QueryMetadataInterface
Get list of metadata element IDs for a group ID- Specified by:
getElementIDsInGroupID
in interfaceQueryMetadataInterface
- Overrides:
getElementIDsInGroupID
in 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:QueryMetadataInterface
Get containg group ID given element ID- Specified by:
getGroupIDForElementID
in interfaceQueryMetadataInterface
- Overrides:
getGroupIDForElementID
in 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:QueryMetadataInterface
Return true if a procedure exists with the given name (partial or fqn)- Specified by:
hasProcedure
in interfaceQueryMetadataInterface
- Overrides:
hasProcedure
in classBasicQueryMetadata
- Returns:
- Throws:
TeiidComponentException
-
getStoredProcedureInfoForProcedure
public StoredProcedureInfo getStoredProcedureInfoForProcedure(String name) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterface
Get the the StoredProcedureInfo based on the fully qualified procedure name- Specified by:
getStoredProcedureInfoForProcedure
in interfaceQueryMetadataInterface
- Overrides:
getStoredProcedureInfoForProcedure
in 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:QueryMetadataInterface
Get the element type name for an element symbol. These types are defined inDataTypeManager.DefaultDataTypes
.- Specified by:
getElementRuntimeTypeName
in interfaceQueryMetadataInterface
- Overrides:
getElementRuntimeTypeName
in 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:QueryMetadataInterface
Get the element's default value for an element symbol- Specified by:
getDefaultValue
in interfaceQueryMetadataInterface
- Overrides:
getDefaultValue
in 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:QueryMetadataInterface
Get the element's minimum value for an element symbol- Specified by:
getMinimumValue
in interfaceQueryMetadataInterface
- Overrides:
getMinimumValue
in 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:QueryMetadataInterface
Get the element's default value for an element symbol- Specified by:
getMaximumValue
in interfaceQueryMetadataInterface
- Overrides:
getMaximumValue
in 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:QueryMetadataInterface
Determine whether a group is virtual or not.- Specified by:
isVirtualGroup
in interfaceQueryMetadataInterface
- Overrides:
isVirtualGroup
in 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:QueryMetadataInterface
Determine whether this is a procedure- Specified by:
isProcedure
in interfaceQueryMetadataInterface
- Overrides:
isProcedure
in 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:QueryMetadataInterface
Determine whether a model is virtual or not.- Specified by:
isVirtualModel
in interfaceQueryMetadataInterface
- Overrides:
isVirtualModel
in 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:QueryMetadataInterface
Get virtual plan for a group symbol.- Specified by:
getVirtualPlan
in interfaceQueryMetadataInterface
- Overrides:
getVirtualPlan
in classBasicQueryMetadata
- Parameters:
groupID
- Group- Returns:
- Root of tree of QueryNode objects
- Throws:
TeiidComponentException
QueryMetadataException
-
getInsertPlan
public String getInsertPlan(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from class:BasicQueryMetadata
Get procedure defining the insert plan for this group.- Specified by:
getInsertPlan
in interfaceQueryMetadataInterface
- Overrides:
getInsertPlan
in classBasicQueryMetadata
- Parameters:
groupID
- Group- Returns:
- A string giving the procedure for inserts.
- Throws:
TeiidComponentException
QueryMetadataException
-
getUpdatePlan
public String getUpdatePlan(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from class:BasicQueryMetadata
Get procedure defining the update plan for this group.- Specified by:
getUpdatePlan
in interfaceQueryMetadataInterface
- Overrides:
getUpdatePlan
in classBasicQueryMetadata
- Parameters:
groupID
- Group- Returns:
- A string giving the procedure for inserts.
- Throws:
TeiidComponentException
QueryMetadataException
-
getDeletePlan
public String getDeletePlan(Object groupID) throws TeiidComponentException, QueryMetadataException
Description copied from class:BasicQueryMetadata
Get procedure defining the delete plan for this group.- Specified by:
getDeletePlan
in interfaceQueryMetadataInterface
- Overrides:
getDeletePlan
in classBasicQueryMetadata
- Parameters:
groupID
- Group- Returns:
- A string giving the procedure for inserts.
- Throws:
TeiidComponentException
QueryMetadataException
-
modelSupports
public boolean modelSupports(Object modelID, int modelConstant) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterface
Determine whether the specified model supports some feature.- Specified by:
modelSupports
in interfaceQueryMetadataInterface
- Overrides:
modelSupports
in 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:QueryMetadataInterface
Determine whether the specified group supports some feature.- Specified by:
groupSupports
in interfaceQueryMetadataInterface
- Overrides:
groupSupports
in 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:QueryMetadataInterface
Determine whether the specified element supports some feature.- Specified by:
elementSupports
in interfaceQueryMetadataInterface
- Overrides:
elementSupports
in 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:QueryMetadataInterface
Get the max set size for the specified model.- Specified by:
getMaxSetSize
in interfaceQueryMetadataInterface
- Overrides:
getMaxSetSize
in 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:QueryMetadataInterface
Get the indexes for the specified group- Specified by:
getIndexesInGroup
in interfaceQueryMetadataInterface
- Overrides:
getIndexesInGroup
in 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:QueryMetadataInterface
Get the unique keys for the specified group (primary and unique keys) The primary key if present will be first in the collection- Specified by:
getUniqueKeysInGroup
in interfaceQueryMetadataInterface
- Overrides:
getUniqueKeysInGroup
in 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:QueryMetadataInterface
Get the foreign keys for the specified group- Specified by:
getForeignKeysInGroup
in interfaceQueryMetadataInterface
- Overrides:
getForeignKeysInGroup
in 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:QueryMetadataInterface
Get the corresponding primary key ID for the specified foreign key ID- Specified by:
getPrimaryKeyIDForForeignKeyID
in interfaceQueryMetadataInterface
- Overrides:
getPrimaryKeyIDForForeignKeyID
in 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:QueryMetadataInterface
Get the access patterns for the specified group- Specified by:
getAccessPatternsInGroup
in interfaceQueryMetadataInterface
- Overrides:
getAccessPatternsInGroup
in 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:QueryMetadataInterface
Get the elements in the key- Specified by:
getElementIDsInKey
in interfaceQueryMetadataInterface
- Overrides:
getElementIDsInKey
in 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:QueryMetadataInterface
Get the elements in the access pattern- Specified by:
getElementIDsInAccessPattern
in interfaceQueryMetadataInterface
- Overrides:
getElementIDsInAccessPattern
in 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:QueryMetadataInterface
Determine whether given virtual group has an associated Materialization. A Materialization is a cached version of the representation of a virtual group.- Specified by:
hasMaterialization
in interfaceQueryMetadataInterface
- Overrides:
hasMaterialization
in 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:QueryMetadataInterface
Accquire the physical group ID (the Materialization) for the given virtual group ID, ornull
if the given virtual group has no Materialization.- Specified by:
getMaterialization
in interfaceQueryMetadataInterface
- Overrides:
getMaterialization
in 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:QueryMetadataInterface
Accquire the physical group ID that is used for the staging area for loading (the Materialization) for the given virtual group ID, ornull
if the given virtual group has no Materialization.- Specified by:
getMaterializationStage
in interfaceQueryMetadataInterface
- Overrides:
getMaterializationStage
in 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:QueryMetadataInterface
Get the currently connected virtual database name. If the current metadata is not virtual-database specific, then null should be returned.- Specified by:
getVirtualDatabaseName
in interfaceQueryMetadataInterface
- Overrides:
getVirtualDatabaseName
in 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:QueryMetadataInterface
Return the cardinality for this group- Specified by:
getCardinality
in interfaceQueryMetadataInterface
- Overrides:
getCardinality
in classBasicQueryMetadata
- Parameters:
groupID
- Metadata identifier specifying group- Returns:
- cardinality for the given group. If unknown, return UNKNOWN_CARDINALITY.
- Throws:
TeiidComponentException
QueryMetadataException
-
getNameInSource
public String getNameInSource(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 interfaceQueryMetadataInterface
- Overrides:
getNameInSource
in 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:QueryMetadataInterface
Get the element length for a given element ID. These types are defined inDataTypeManager.DefaultDataTypes
.- Specified by:
getElementLength
in interfaceQueryMetadataInterface
- Overrides:
getElementLength
in 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:QueryMetadataInterface
Get the element's position in the group- Specified by:
getPosition
in interfaceQueryMetadataInterface
- Overrides:
getPosition
in 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:QueryMetadataInterface
Get the element's precision- Specified by:
getPrecision
in interfaceQueryMetadataInterface
- Overrides:
getPrecision
in 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:QueryMetadataInterface
Get the element's radix- Specified by:
getRadix
in interfaceQueryMetadataInterface
- Overrides:
getRadix
in 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:QueryMetadataInterface
Get the element's format- Specified by:
getFormat
in interfaceQueryMetadataInterface
- Overrides:
getFormat
in 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:QueryMetadataInterface
Get the element's scale- Specified by:
getScale
in interfaceQueryMetadataInterface
- Overrides:
getScale
in 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: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 interfaceQueryMetadataInterface
- Overrides:
getDistinctValues
in 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: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 interfaceQueryMetadataInterface
- Overrides:
getNullValues
in 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:QueryMetadataInterface
Get the native type of the element specified. This element identifier was previously returned by some other method.- Specified by:
getNativeType
in interfaceQueryMetadataInterface
- Overrides:
getNativeType
in 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:QueryMetadataInterface
Get all extension properties defined on this metadata object- Specified by:
getExtensionProperties
in interfaceQueryMetadataInterface
- Overrides:
getExtensionProperties
in 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:
getExtensionProperty
in interfaceQueryMetadataInterface
- Overrides:
getExtensionProperty
in classBasicQueryMetadata
-
getBinaryVDBResource
public byte[] getBinaryVDBResource(String resourcePath) throws TeiidComponentException, QueryMetadataException
Description copied from interface:QueryMetadataInterface
Gets the contents of a VDB resource in binary form.- Specified by:
getBinaryVDBResource
in interfaceQueryMetadataInterface
- Overrides:
getBinaryVDBResource
in 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:QueryMetadataInterface
Gets the contents of a VDB resource as a String.- Specified by:
getCharacterVDBResource
in interfaceQueryMetadataInterface
- Overrides:
getCharacterVDBResource
in 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:QueryMetadataInterface
Gets the resource paths of all the resources in the VDB.- Specified by:
getVDBResourcePaths
in interfaceQueryMetadataInterface
- Overrides:
getVDBResourcePaths
in 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:
addToMetadataCache
in interfaceQueryMetadataInterface
- Overrides:
addToMetadataCache
in classBasicQueryMetadata
-
getFromMetadataCache
public Object getFromMetadataCache(Object metadataID, String key) throws TeiidComponentException, QueryMetadataException
- Specified by:
getFromMetadataCache
in interfaceQueryMetadataInterface
- Overrides:
getFromMetadataCache
in classBasicQueryMetadata
- Throws:
TeiidComponentException
QueryMetadataException
-
getFunctionLibrary
public FunctionLibrary getFunctionLibrary()
- Specified by:
getFunctionLibrary
in interfaceQueryMetadataInterface
- Overrides:
getFunctionLibrary
in classBasicQueryMetadata
-
getPrimaryKey
public Object getPrimaryKey(Object metadataID)
- Specified by:
getPrimaryKey
in interfaceQueryMetadataInterface
- Overrides:
getPrimaryKey
in classBasicQueryMetadata
-
getDesignTimeMetadata
public TransformationMetadata getDesignTimeMetadata()
Description copied from interface:QueryMetadataInterface
Get the metadata without visibility and session tables- Specified by:
getDesignTimeMetadata
in interfaceQueryMetadataInterface
- Overrides:
getDesignTimeMetadata
in classBasicQueryMetadata
- Returns:
-
getImportedModels
public Set<String> getImportedModels()
- Specified by:
getImportedModels
in interfaceQueryMetadataInterface
- Overrides:
getImportedModels
in classBasicQueryMetadata
-
getScriptEngineDirect
public ScriptEngine getScriptEngineDirect(String language) throws TeiidProcessingException
- Overrides:
getScriptEngineDirect
in classBasicQueryMetadata
- Returns:
- Throws:
TeiidProcessingException
-
isVariadic
public boolean isVariadic(Object metadataID)
- Specified by:
isVariadic
in interfaceQueryMetadataInterface
- Overrides:
isVariadic
in classBasicQueryMetadata
-
getModelID
public Schema getModelID(String modelName) throws TeiidComponentException, QueryMetadataException
- Specified by:
getModelID
in interfaceQueryMetadataInterface
- Overrides:
getModelID
in classBasicQueryMetadata
- Throws:
TeiidComponentException
QueryMetadataException
-
getModelIDs
public List<Schema> getModelIDs()
- Specified by:
getModelIDs
in interfaceQueryMetadataInterface
- Overrides:
getModelIDs
in classBasicQueryMetadata
-
setPolicies
public void setPolicies(Map<String,DataPolicyMetadata> policies)
-
getPolicies
public Map<String,DataPolicyMetadata> getPolicies()
-
useOutputName
public boolean useOutputName()
- Specified by:
useOutputName
in interfaceQueryMetadataInterface
- Overrides:
useOutputName
in classBasicQueryMetadata
-
setUseOutputNames
public void setUseOutputNames(boolean useOutputNames)
-
widenComparisonToString
public boolean widenComparisonToString()
- Specified by:
widenComparisonToString
in interfaceQueryMetadataInterface
- Overrides:
widenComparisonToString
in 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:QueryMetadataInterface
Get the runtime type class for the given type name, which may include domains- Specified by:
getDataTypeClass
in interfaceQueryMetadataInterface
- Overrides:
getDataTypeClass
in classBasicQueryMetadata
- Returns:
- Throws:
QueryMetadataException
-
isEnvAllowed
public boolean isEnvAllowed()
- Specified by:
isEnvAllowed
in interfaceQueryMetadataInterface
- Overrides:
isEnvAllowed
in classBasicQueryMetadata
-
setAllowENV
public void setAllowENV(boolean b)
-
isLongRanks
public boolean isLongRanks()
- Specified by:
isLongRanks
in interfaceQueryMetadataInterface
- Overrides:
isLongRanks
in classBasicQueryMetadata
-
setLongRanks
public void setLongRanks(boolean longRanks)
-
getPushdownFunction
public FunctionMethod getPushdownFunction(Object modelID, String fullName)
- Specified by:
getPushdownFunction
in interfaceQueryMetadataInterface
- Overrides:
getPushdownFunction
in classBasicQueryMetadata
-
-