Package org.teiid.query.metadata
Class TempMetadataStore
- java.lang.Object
-
- org.teiid.query.metadata.TempMetadataStore
-
- All Implemented Interfaces:
Serializable
public class TempMetadataStore extends Object implements Serializable
Store for temporary metadata discovering while resolving a query.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TempMetadataStore()Constructor for TempMetadataStore.TempMetadataStore(NavigableMap<String,TempMetadataID> data)Constructor for TempMetadataStore that takes a set of data to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TempMetadataIDaddElementSymbolToTempGroup(String tempGroup, Expression symbol)Add a element symbol to the already created temp group.voidaddElementToTempGroup(String tempGroup, ElementSymbol symbol)TempMetadataIDaddTempGroup(String tempGroup, List tempSymbols)Add a temp group and all it's elementsTempMetadataIDaddTempGroup(String tempGroup, List<? extends Expression> tempSymbols, boolean isVirtual, boolean isTempTable)Add a temp group and all it's elementsTempMetadataIDaddTempGroup(String tempGroup, List tempSymbols, boolean isVirtual)Add a temp group and all it's elementsTempMetadataStoreclone()NavigableMap<String,TempMetadataID>getData()Get all temp group and element metadataList<TempMetadataID>getTempElementElementIDs(String tempGroup)Get temporary element ID based on group and element name partsTempMetadataIDgetTempElementID(String tempElement)Get temporary element ID based on full element nameTempMetadataIDgetTempGroupID(String tempGroup)Get temporary group ID based on group nameTempMetadataIDremoveTempGroup(String tempGroup)
-
-
-
Constructor Detail
-
TempMetadataStore
public TempMetadataStore()
Constructor for TempMetadataStore.
-
TempMetadataStore
public TempMetadataStore(NavigableMap<String,TempMetadataID> data)
Constructor for TempMetadataStore that takes a set of data to use. If the parameter is null, a new empty Map will beused instead.- Parameters:
data- Map of upper case group name to group TempMetadataID object
-
-
Method Detail
-
clone
public TempMetadataStore clone()
-
getData
public NavigableMap<String,TempMetadataID> getData()
Get all temp group and element metadata
-
addTempGroup
public TempMetadataID addTempGroup(String tempGroup, List tempSymbols)
Add a temp group and all it's elements- Parameters:
tempGroup- Name of temp grouptempSymbols- List of ElementSymbol in position order
-
addTempGroup
public TempMetadataID addTempGroup(String tempGroup, List tempSymbols, boolean isVirtual)
Add a temp group and all it's elements- Parameters:
tempGroup- Name of temp grouptempSymbols- List of ElementSymbol in position orderisVirtual- whether or not the group is a virtual group
-
addTempGroup
public TempMetadataID addTempGroup(String tempGroup, List<? extends Expression> tempSymbols, boolean isVirtual, boolean isTempTable)
Add a temp group and all it's elements- Parameters:
tempGroup- Name of temp grouptempSymbols- List of ElementSymbol in position orderisVirtual- whether or not the group is a virtual groupisTempTable- whether or not the group is a temporary table
-
addElementSymbolToTempGroup
public TempMetadataID addElementSymbolToTempGroup(String tempGroup, Expression symbol)
Add a element symbol to the already created temp group. If added successfully then it will return the metadata id for the added element. otherwise it will return null.- Parameters:
tempGroup- - temp group namesymbol- - element to be added- Returns:
- metadata id.
-
getTempGroupID
public TempMetadataID getTempGroupID(String tempGroup)
Get temporary group ID based on group name- Parameters:
tempGroup- Group name- Returns:
- Metadata ID or null if not found
-
getTempElementID
public TempMetadataID getTempElementID(String tempElement)
Get temporary element ID based on full element name- Parameters:
tempElement- Element name- Returns:
- Metadata ID or null if not found
-
getTempElementElementIDs
public List<TempMetadataID> getTempElementElementIDs(String tempGroup)
Get temporary element ID based on group and element name parts- Parameters:
tempGroup- Group name- Returns:
- Metadata ID or null if not found
-
addElementToTempGroup
public void addElementToTempGroup(String tempGroup, ElementSymbol symbol)
-
removeTempGroup
public TempMetadataID removeTempGroup(String tempGroup)
-
-