com.metamatrix.query.metadata
Class TempMetadataStore

java.lang.Object
  extended by com.metamatrix.query.metadata.TempMetadataStore
All Implemented Interfaces:
java.io.Serializable

public class TempMetadataStore
extends java.lang.Object
implements java.io.Serializable

Store for temporary metadata discovering while resolving a query.

See Also:
Serialized Form

Constructor Summary
TempMetadataStore()
          Constructor for TempMetadataStore.
TempMetadataStore(java.util.Map data)
          Constructor for TempMetadataStore that takes a set of data to use.
 
Method Summary
 TempMetadataID addElementSymbolToTempGroup(java.lang.String tempGroup, SingleElementSymbol symbol)
          Add a element symbol to the already created temp group.
 void addElementToTempGroup(java.lang.String tempGroup, ElementSymbol symbol)
           
 TempMetadataID addTempGroup(java.lang.String tempGroup, java.util.List tempSymbols)
          Add a temp group and all it's elements
 TempMetadataID addTempGroup(java.lang.String tempGroup, java.util.List<? extends SingleElementSymbol> tempSymbols, boolean isVirtual, boolean isTempTable)
          Add a temp group and all it's elements
 TempMetadataID addTempGroup(java.lang.String tempGroup, java.util.List tempSymbols, boolean isVirtual)
          Add a temp group and all it's elements
 void addTempGroups(java.util.Map tempGroupMap)
          Add a bunch of temp groups all at once.
 java.util.Map getData()
          Get all temp group and element metadata
 java.util.List getTempElementElementIDs(java.lang.String tempGroup)
          Get temporary element ID based on group and element name parts
 TempMetadataID getTempElementID(java.lang.String tempElement)
          Get temporary element ID based on full element name
 TempMetadataID getTempGroupID(java.lang.String tempGroup)
          Get temporary group ID based on group name
 void removeTempGroup(java.lang.String tempGroup)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempMetadataStore

public TempMetadataStore()
Constructor for TempMetadataStore.


TempMetadataStore

public TempMetadataStore(java.util.Map 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

getData

public java.util.Map getData()
Get all temp group and element metadata

Parameters:
data - Map of upper case group name to group TempMetadataID object

addTempGroup

public TempMetadataID addTempGroup(java.lang.String tempGroup,
                                   java.util.List tempSymbols)
Add a temp group and all it's elements

Parameters:
tempGroup - Name of temp group
tempSymbols - List of ElementSymbol in position order

addTempGroup

public TempMetadataID addTempGroup(java.lang.String tempGroup,
                                   java.util.List tempSymbols,
                                   boolean isVirtual)
Add a temp group and all it's elements

Parameters:
tempGroup - Name of temp group
tempSymbols - List of ElementSymbol in position order
isVirtual - whether or not the group is a virtual group

addTempGroup

public TempMetadataID addTempGroup(java.lang.String tempGroup,
                                   java.util.List<? extends SingleElementSymbol> tempSymbols,
                                   boolean isVirtual,
                                   boolean isTempTable)
Add a temp group and all it's elements

Parameters:
tempGroup - Name of temp group
tempGroupDefinition - optional definition if the tempGroup param is the aliased name of a group
tempSymbols - List of ElementSymbol in position order
isVirtual - whether or not the group is a virtual group
isTempTable - whether or not the group is a temporary table

addElementSymbolToTempGroup

public TempMetadataID addElementSymbolToTempGroup(java.lang.String tempGroup,
                                                  SingleElementSymbol 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 name
symbol - - element to be added
Returns:
metadata id.

addTempGroups

public void addTempGroups(java.util.Map tempGroupMap)
Add a bunch of temp groups all at once. This map should contain temp group names (Strings) as keys and the TempMetadataID for the group as the value.

Parameters:
tempGroupMap - (tempGroupName (String) --> TempMetadataID)

getTempGroupID

public TempMetadataID getTempGroupID(java.lang.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(java.lang.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 java.util.List getTempElementElementIDs(java.lang.String tempGroup)
Get temporary element ID based on group and element name parts

Parameters:
tempGroup - Group name
tempElement - Short element name
Returns:
Metadata ID or null if not found

addElementToTempGroup

public void addElementToTempGroup(java.lang.String tempGroup,
                                  ElementSymbol symbol)

removeTempGroup

public void removeTempGroup(java.lang.String tempGroup)


Copyright © 2009. All Rights Reserved.