|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.metadata.runtime.model.MetadataCache
public class MetadataCache
Constructor Summary | |
---|---|
MetadataCache()
pass true for loadMetadata if the information for the groups and elements are to be loaded. |
Method Summary | |
---|---|
protected void |
buildGroupObjects(java.util.Iterator it)
Bould groups to be displayed in the metadata tree. |
java.util.Collection |
getAllModels()
Returns a Collection of Model s that represents all the models |
java.util.List |
getColumns(GroupID groupID)
Returns all the columns for a group in the VDB |
java.util.Collection |
getDisplayableModels()
This returns those models that should be made visible to the console and therefore, only the models from the database are considered for display |
java.util.List |
getElementsInGroup(GroupID groupID)
Returns an ordered List of type Element that are contained within the specified key id. |
java.util.List |
getGroups(ModelID modelID)
Returns all the groups in the VDB |
java.util.Collection |
getGroupsInModel(ModelID modelID)
|
Model |
getModel(ModelID modelID)
return the specified model |
java.util.Map |
getModelMap()
|
java.util.Collection |
getModelsForVisibility(boolean isVisible)
Returns a Collection of type Model that represents all the
models that are either visible or not visible |
protected com.metamatrix.connector.metadata.internal.ObjectQueryProcessor |
getObjectQueryProcessor()
|
java.util.List |
getProcedures(ModelID modelID)
Returns all the procedures in the VDB |
java.util.Collection |
getProceduresInModel(ModelID modelID)
/** Returns a Collection of type Procedure for the specified model id. |
VirtualDatabase |
getVirtualDatabase()
Returns the VirtualDatabase based on the virtual database id. |
VirtualDatabaseID |
getVirtualDatabaseID()
Returns the VirtualDatabaseID . |
void |
init(java.lang.String vdbName,
java.lang.String vdbVersion,
java.lang.String vdbFileName,
byte[] vdbcontents)
Call to initialize the adapter by providing a specific VDB defintion content to use when querying the metadata *** NOTE: This is used for UnitTest only |
void |
init(VirtualDatabase vdb,
java.util.Collection modelList,
boolean loadMetadata,
byte[] vdbcontents,
java.util.Map systemModels)
Call to initialize the adapter by providing a specific VDB defintion content to use when querying the metadata |
void |
initSystemVDB(java.lang.String vdbName,
java.lang.String vdbVersion,
byte[] systemvdb)
used for loading the SystemVDB models. |
boolean |
isModelDetailsLoaded()
Returns true if the metadata for the groups and elements have
been loaded. |
boolean |
isVisible(java.lang.String resourcePath)
Returns the visibility for a resource path that exist this vdb |
void |
loadModelDetails()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetadataCache()
loadMetadata
- Method Detail |
---|
public boolean isModelDetailsLoaded()
true
if the metadata for the groups and elements have
been loaded. The loading of the details are only used when the metadata tree
is beind displayed. So to cut down on the overhead when it's never been asked
for, the details are not loaded when only the models are needed by
query processing.
isModelDetailsLoaded
in interface MetadataSourceAPI
VirtualDatabaseException
public void initSystemVDB(java.lang.String vdbName, java.lang.String vdbVersion, byte[] systemvdb) throws VirtualDatabaseException
vdbName
- vdbVersion
- systemvdb
-
VirtualDatabaseException
public void init(java.lang.String vdbName, java.lang.String vdbVersion, java.lang.String vdbFileName, byte[] vdbcontents) throws java.lang.Exception
vdbName
- vdbVersion
- vdbFileName
- vdbcontents
-
java.lang.Exception
public void init(VirtualDatabase vdb, java.util.Collection modelList, boolean loadMetadata, byte[] vdbcontents, java.util.Map systemModels) throws VirtualDatabaseException
vdb
- contains vdb specific information in the databasemodelList
- is a collection of Models from the database, providing properties
not currently stored in the vdbcontents.vdbcontents
- is the vdb to queriedsystemModels
- are the system models preload incase metadata is not usedsystemvdb
- is the system vdb byte array
java.lang.Exception
VirtualDatabaseException
public void loadModelDetails() throws VirtualDatabaseException
VirtualDatabaseException
protected com.metamatrix.connector.metadata.internal.ObjectQueryProcessor getObjectQueryProcessor() throws VirtualDatabaseException
VirtualDatabaseException
public VirtualDatabase getVirtualDatabase() throws VirtualDatabaseException
MetadataSourceAPI
VirtualDatabase
based on the virtual database id.
getVirtualDatabase
in interface MetadataSourceAPI
VirtualDatabaseException
- if an error occurs while trying to read the data.public VirtualDatabaseID getVirtualDatabaseID() throws VirtualDatabaseDoesNotExistException, VirtualDatabaseException
MetadataSourceAPI
VirtualDatabaseID
. This method does validate the existance of the virtual database by reading from the persistance storage before creating the id.
getVirtualDatabaseID
in interface MetadataSourceAPI
VirtualDatabaseDoesNotExistException
- exception if the virtual database does not exist
VirtualDatabaseException
- if an error occurs while trying to read the data.public java.util.Collection getAllModels() throws VirtualDatabaseException
MetadataSourceAPI
Collection
of Model
s that represents all the models
getAllModels
in interface MetadataSourceAPI
VirtualDatabaseException
- an error occurs while trying to read the data.public java.util.Collection getDisplayableModels() throws VirtualDatabaseException
getDisplayableModels
in interface MetadataSourceAPI
VirtualDatabaseException
- an error occurs while trying to read the data.MetadataSourceAPI.getDisplayableModels()
public boolean isVisible(java.lang.String resourcePath)
MetadataSourceAPI
isVisible
in interface MetadataSourceAPI
true
if the resource is visible.public java.util.Map getModelMap() throws VirtualDatabaseException
VirtualDatabaseException
public Model getModel(ModelID modelID) throws VirtualDatabaseException
MetadataSourceAPI
getModel
in interface MetadataSourceAPI
modelID
- is the unique id for the model
VirtualDatabaseException
- an error occurs while trying to read the data.MetadataSourceAPI.getModel(com.metamatrix.metadata.runtime.api.ModelID)
public java.util.Collection getModelsForVisibility(boolean isVisible) throws VirtualDatabaseException
MetadataSourceAPI
Collection
of type Model
that represents all the
models that are either visible or not visible
getModelsForVisibility
in interface MetadataSourceAPI
VirtualDatabaseException
- an error occurs while trying to read the data.MetadataSourceAPI.getModelsForVisibility(boolean)
public java.util.Collection getGroupsInModel(ModelID modelID) throws VirtualDatabaseException
getGroupsInModel
in interface MetadataSourceAPI
VirtualDatabaseException
public java.util.List getGroups(ModelID modelID) throws VirtualDatabaseException
java.lang.Exception
VirtualDatabaseException
public java.util.List getElementsInGroup(GroupID groupID) throws VirtualDatabaseException
MetadataSourceAPI
List
of type Element
that are contained within the specified key id.
getElementsInGroup
in interface MetadataSourceAPI
groupID
- is the group from which the elements are contained
VirtualDatabaseException
public java.util.List getColumns(GroupID groupID) throws VirtualDatabaseException
java.lang.Exception
VirtualDatabaseException
public java.util.Collection getProceduresInModel(ModelID modelID) throws VirtualDatabaseException
MetadataSourceAPI
Collection
of type Procedure
for the specified model id.
getProceduresInModel
in interface MetadataSourceAPI
VirtualDatabaseException
- an error occurs while trying to read the data.public java.util.List getProcedures(ModelID modelID) throws VirtualDatabaseException
java.lang.Exception
VirtualDatabaseException
protected void buildGroupObjects(java.util.Iterator it)
objectList
- List of Lists of Objects: List of objects to add to the cache.
Each element in objectList represents a row containing data about one group.
See GROUP_COLUMNS
regarding the order and meaning of the column in the row..
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |