Package org.teiid.query.metadata
Class TempMetadataID
- java.lang.Object
-
- org.teiid.query.metadata.TempMetadataID
-
- All Implemented Interfaces:
Serializable
,AbstractMetadataRecord.DataModifiable
,AbstractMetadataRecord.Modifiable
public class TempMetadataID extends Object implements Serializable, AbstractMetadataRecord.Modifiable, AbstractMetadataRecord.DataModifiable
This class represents a temporary metadata ID. A temporary metadata ID does not exist in a real metadata source. Rather, it is used temporarily in context of processing a single query. This metadata ID can be used to represent either a group or an element depending on the constructor used. TODO: we should be using the real metadata objects, but internal and designer legacy keep us on the temp framework- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TempMetadataID.TableData
static class
TempMetadataID.Type
-
Field Summary
-
Fields inherited from interface org.teiid.metadata.AbstractMetadataRecord.DataModifiable
DATA_TTL
-
-
Constructor Summary
Constructors Constructor Description TempMetadataID(String ID, Class<?> type)
Constructor for element form of metadata ID.TempMetadataID(String ID, Class<?> type, Object metadataID)
Constructor for element form of metadata ID with the underlying element.TempMetadataID(String ID, List<TempMetadataID> elements)
Constructor for group form of metadata ID.TempMetadataID(String ID, List<TempMetadataID> elements, TempMetadataID.Type type)
Constructor for group form of metadata ID.
-
Method Summary
-
-
-
Constructor Detail
-
TempMetadataID
public TempMetadataID(String ID, List<TempMetadataID> elements)
Constructor for group form of metadata ID.- Parameters:
ID
- Fully-qualified, upper-case name of IDelements
- List of TempMetadataID representing elements
-
TempMetadataID
public TempMetadataID(String ID, List<TempMetadataID> elements, TempMetadataID.Type type)
Constructor for group form of metadata ID.- Parameters:
ID
- Fully-qualified, upper-case name of IDelements
- List of TempMetadataID representing elementstype
- of group
-
TempMetadataID
public TempMetadataID(String ID, Class<?> type)
Constructor for element form of metadata ID.- Parameters:
ID
- Fully-qualified, upper-case name of IDtype
- Type of elements List of TempMetadataID representing elements
-
TempMetadataID
public TempMetadataID(String ID, Class<?> type, Object metadataID)
Constructor for element form of metadata ID with the underlying element.- Parameters:
ID
- Fully-qualified, upper-case name of IDtype
- Type of elements List of TempMetadataID representing elementsmetadataID
- the orginal metadataID
-
-
Method Detail
-
getLastDataModification
public long getLastDataModification()
- Specified by:
getLastDataModification
in interfaceAbstractMetadataRecord.DataModifiable
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceAbstractMetadataRecord.Modifiable
-
getID
public String getID()
Get ID value- Returns:
- ID value
-
getType
public Class<?> getType()
Get type - only valid for elements- Returns:
- Type for elements, null for groups
-
getElements
public List<TempMetadataID> getElements()
Get elements - only valid for groups- Returns:
- List of TempMetadataID for groups, null for elements
-
addElement
protected void addElement(TempMetadataID elem)
add a element to the temp table.- Parameters:
elem
-
-
isVirtual
public boolean isVirtual()
Check whether this group is virtual- Returns:
- True if virtual
-
isTempTable
public boolean isTempTable()
Whether it is a temporary table- Returns:
- Since:
- 5.5
-
toString
public String toString()
Return string representation of ID
-
equals
public boolean equals(Object obj)
Compare this temp metadata ID with another object.
-
hashCode
public int hashCode()
Return hash code
-
setOriginalMetadataID
public void setOriginalMetadataID(Object metadataId)
-
getOriginalMetadataID
public Object getOriginalMetadataID()
- Returns:
- Returns the originalMetadataID.
- Since:
- 4.3
-
getAccessPatterns
public Collection<TempMetadataID> getAccessPatterns()
-
setAccessPatterns
public void setAccessPatterns(Collection<TempMetadataID> accessPatterns)
-
getCardinality
public long getCardinality()
-
setCardinality
public void setCardinality(long cardinality)
-
setTempTable
public void setTempTable(boolean isTempTable)
-
isScalarGroup
public boolean isScalarGroup()
-
setMetadataType
public void setMetadataType(TempMetadataID.Type metadataType)
-
getMetadataType
public TempMetadataID.Type getMetadataType()
-
getPrimaryKey
public List<TempMetadataID> getPrimaryKey()
-
setPrimaryKey
public void setPrimaryKey(List<TempMetadataID> primaryKey)
-
getPosition
public int getPosition()
-
setPosition
public void setPosition(int position)
-
getQueryNode
public QueryNode getQueryNode()
-
setQueryNode
public void setQueryNode(QueryNode queryNode)
-
getCacheHint
public CacheHint getCacheHint()
-
setCacheHint
public void setCacheHint(CacheHint cacheHint)
-
getIndexes
public List<TempMetadataID> getIndexes()
-
getForeignKeys
public List<TempMetadataID> getForeignKeys()
-
addIndex
public void addIndex(Object originalMetadataId, List<TempMetadataID> index)
-
addForeignKey
public void addForeignKey(Object originalMetadataId, Object pk, List<TempMetadataID> cols)
-
getUniqueKeys
public List<List<TempMetadataID>> getUniqueKeys()
-
addUniqueKey
public void addUniqueKey(List<TempMetadataID> key)
-
getTableData
public TempMetadataID.TableData getTableData()
-
isAutoIncrement
public boolean isAutoIncrement()
-
setAutoIncrement
public void setAutoIncrement(boolean autoIncrement)
-
isNotNull
public boolean isNotNull()
-
setNotNull
public void setNotNull(boolean notNull)
-
setUpdatable
public void setUpdatable(boolean updatable)
-
isUpdatable
public boolean isUpdatable()
-
getName
public String getName()
-
-