|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 Models 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 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 MetadataSourceAPIVirtualDatabaseException
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 ObjectQueryProcessor getObjectQueryProcessor()
throws VirtualDatabaseException
VirtualDatabaseException
public VirtualDatabase getVirtualDatabase()
throws VirtualDatabaseException
MetadataSourceAPIVirtualDatabase based on the virtual database id.
getVirtualDatabase in interface MetadataSourceAPIVirtualDatabaseException - if an error occurs while trying to read the data.
public VirtualDatabaseID getVirtualDatabaseID()
throws VirtualDatabaseDoesNotExistException,
VirtualDatabaseException
MetadataSourceAPIVirtualDatabaseID. This method does validate the existance of the virtual database by reading from the persistance storage before creating the id.
getVirtualDatabaseID in interface MetadataSourceAPIVirtualDatabaseDoesNotExistException - 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
MetadataSourceAPICollection of Models that represents all the models
getAllModels in interface MetadataSourceAPIVirtualDatabaseException - an error occurs while trying to read the data.
public java.util.Collection getDisplayableModels()
throws VirtualDatabaseException
getDisplayableModels in interface MetadataSourceAPIVirtualDatabaseException - an error occurs while trying to read the data.MetadataSourceAPI.getDisplayableModels()public boolean isVisible(java.lang.String resourcePath)
MetadataSourceAPI
isVisible in interface MetadataSourceAPItrue if the resource is visible.
public java.util.Map getModelMap()
throws VirtualDatabaseException
VirtualDatabaseException
public Model getModel(ModelID modelID)
throws VirtualDatabaseException
MetadataSourceAPI
getModel in interface MetadataSourceAPImodelID - 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
MetadataSourceAPICollection of type Model that represents all the
models that are either visible or not visible
getModelsForVisibility in interface MetadataSourceAPIVirtualDatabaseException - an error occurs while trying to read the data.MetadataSourceAPI.getModelsForVisibility(boolean)
public java.util.Collection getGroupsInModel(ModelID modelID)
throws VirtualDatabaseException
getGroupsInModel in interface MetadataSourceAPIVirtualDatabaseException
public java.util.List getGroups(ModelID modelID)
throws VirtualDatabaseException
java.lang.Exception
VirtualDatabaseException
public java.util.List getElementsInGroup(GroupID groupID)
throws VirtualDatabaseException
MetadataSourceAPIList of type Element that are contained within the specified key id.
getElementsInGroup in interface MetadataSourceAPIgroupID - 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
MetadataSourceAPICollection of type Procedure for the specified model id.
getProceduresInModel in interface MetadataSourceAPIVirtualDatabaseException - an error occurs while trying to read the data.
public java.util.List getProcedures(ModelID modelID)
throws VirtualDatabaseException
java.lang.Exception
VirtualDatabaseExceptionprotected 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 | |||||||||