Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseStaticMetaData Class Reference

List of all members.

Public Member Functions

 VirtualDatabaseStaticMetaData (VirtualDatabase database)
void gatherStaticMetadata (DatabaseBackend backend)
MetadataContainer getMetadataContainer ()

Detailed Description

Class gathering the static metadata related to the database. We collect information from the underlying driver and keep this object for further usage.

Author:
Nicolas Modrzyk

Emmanuel Cecchet

Version:
1.0

Definition at line 40 of file VirtualDatabaseStaticMetaData.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseStaticMetaData.VirtualDatabaseStaticMetaData VirtualDatabase  database  ) 
 

Reference the database for this metadata. Do not fetch any data at this time

Parameters:
database to link this metadata to

Definition at line 52 of file VirtualDatabaseStaticMetaData.java.

References org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase.getVirtualDatabaseName(), and org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase.logger.

00053   {
00054     this.vdbName = database.getVirtualDatabaseName();
00055     this.logger = Trace
00056         .getLogger("org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerThread."
00057             + vdbName + ".metadata");
00058   }


Member Function Documentation

void org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseStaticMetaData.gatherStaticMetadata DatabaseBackend  backend  ) 
 

Save the driver metadata of the backend if this is the first one to be collected. If not display a warning for each incompatible value.

Parameters:
backend the new backend to get metadata from

Definition at line 66 of file VirtualDatabaseStaticMetaData.java.

References org.objectweb.cjdbc.controller.backend.DatabaseBackend.getDatabaseStaticMetadata(), and org.objectweb.cjdbc.controller.backend.DatabaseBackend.getName().

00067   {
00068     MetadataContainer newContainer = backend.getDatabaseStaticMetadata();
00069     if (logger.isDebugEnabled())
00070       logger.debug("fetching static metadata for backend:" + backend.getName());
00071     if (metadataContainer == null)
00072       metadataContainer = newContainer;
00073     else
00074     {
00075       boolean isCompatible = metadataContainer.isCompatible(newContainer,
00076           logger);
00077       if (logger.isDebugEnabled())
00078         logger.debug("Backend static metadata is compatible with current ones:"
00079             + isCompatible);
00080     }
00081   }

MetadataContainer org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseStaticMetaData.getMetadataContainer  ) 
 

Returns the metadataContainer value.

Returns:
Returns the metadataContainer.

Definition at line 88 of file VirtualDatabaseStaticMetaData.java.

00089   {
00090     return metadataContainer;
00091   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:04:46 2005 for C-JDBC by  doxygen 1.3.9.1