#include <Cdb.hh>
Inheritance diagram for Cdb:

Public Member Functions | |
| virtual const char * | technologyName () const=0 |
| Return the technology name. | |
| virtual const char * | implementationName () const=0 |
| Return the implementation name. | |
| virtual void | initialize ()=0 |
| Initialize the API. | |
| virtual bool | isInitialized ()=0 |
| Check if the API is initialized. | |
| virtual CdbStatus | getDefaultDatabase (std::string &theDatabaseName)=0 |
| Get default database name. | |
| virtual CdbStatus | getDefaultView (std::string &theViewName, const char *theDatabaseName)=0 |
| Get default view name. | |
| virtual CdbStatus | setDefaultDatabase (const char *theDatabaseName)=0 |
| Set default database name. | |
| virtual CdbStatus | setDefaultView (const char *theViewName, const char *theDatabaseName)=0 |
| Set default view name. | |
| virtual CdbStatus | findDatabase (CdbDatabasePtr &thePtr, const char *theDatabaseName=0)=0 |
| Find the specified Database. | |
| virtual CdbStatus | databaseIterator (CdbDatabaseItr &theItr)=0 |
| Initialize an instance of an iterator for the known databases names. | |
| virtual CdbStatus | registerTranslator (CdbObjectTranslator *theTranslatorPtr) |
| Register a user defined "persistent-to-transient" translator. | |
| virtual CdbStatus | findTranslator (CdbCPtr< CdbObjectTranslator > &theTranslatorPtr, unsigned int theTransientTypeId, const std::string &thePersistentTypeName) const |
| Find a user defined "persistent-to-transient" translator. | |
Static Public Member Functions | |
| CdbPtr | instance (const char *theTechnologyName=0, const char *theImplementationName=0) |
| The API locator. | |
Protected Member Functions | |
| Cdb () | |
| The default constructor. | |
| virtual | ~Cdb () |
| The destructor. | |
| CdbStatus | set (CdbPtr &thePtr) |
| Add a new entry to the registry. | |
| CdbStatus | get (CdbPtr &thePtr, const char *theTechnologyName, const char *theImplementationName) |
| Find an entry matching specified keys in the registry. | |
| virtual CdbTransactionBase * | transaction (CdbTransaction::Mode theMode) const=0 |
| Get the transaction manager and start new transaction if needed. | |
Friends | |
| class | CdbCPtrBase< Cdb > |
| class | CdbTransaction |
This is an abstract class also providing a factory interface. Its main function is to locate the right instance of the Conditions/DB API.
The second group of functionality is location of persistent databases in the store.
Definition at line 25 of file Cdb.hh.
|
|
The default constructor. More details... |
|
|
The destructor. The destructor is protected to prevent clients from deleting objects which may be shared with others. |
|
|
Initialize an instance of an iterator for the known databases names. This method is supposed to be implemented by subclasses. The iterator will be set into a "valid" state upon successfull completion.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
||||||||||||
|
Find the specified Database. This method is supposed to be implemented by subclasses. This method initializes a smart pointer to a transient object of the CdbDatabase class representing the found database. It will initialize the smart pointer to point onto 0 and return the corresponding error status when specified object is not found or is not awailable for some other reason. The database is specified through its name. If the name is not specified then the default database will be found and open.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
||||||||||||||||
|
Find a user defined "persistent-to-transient" translator. The method will look for the translator matching the specified transient type identifier and the persistent type. The translator is supposed to be registered for the current technology/implementation of the CDB API using the Cdb::registerTranslator() method.
Definition at line 96 of file Cdb.cc. References CdbCPtr< P, CLOSE_POLICY >::isNull(), CdbStatus::NotFound, and CdbStatus::Success. |
|
||||||||||||||||
|
Find an entry matching specified keys in the registry. This _proxy_ method is meant to be used by subclasses to find themselves in the dictionary through the dictionary's protected interface.
Definition at line 31 of file Cdb.cc. Referenced by CdbRooRoCdb::databaseIterator(), CdbRooDb::databaseIterator(), CdbBdbWCdb::databaseIterator(), CdbBdbSCdb::databaseIterator(), CdbRooRoCdb::findDatabase(), CdbRooDb::findDatabase(), CdbBdbWCdb::findDatabase(), and CdbBdbSCdb::findDatabase(). |
|
|
Get default database name. This method is supposed to be implemented by subclasses.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
||||||||||||
|
Get default view name. This method is supposed to be implemented by subclasses. NOTE: 0 pointer is NOT allowed where the database name is expected.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
|
Return the implementation name. This method has to be implemented by subclasses. Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
|
Initialize the API. This method needs to be called at least once during the lifetime of the API's implementation to have it properly functioning. The main reason to do this initialization explicitly is to avoid "initialization upon construction", which is not welcome by certain clients of CDB API.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
||||||||||||
|
The API locator. Its only parameter is meant to specify which concrete instance is to be returned. If it's ommited then the default value will be used This default is a subject of the job's run-time configuration.
Definition at line 41 of file Cdb.cc. References CdbEnvironment::getDefaultImplementation(), CdbEnvironment::getDefaultTechnology(), and CdbStatus::Success. Referenced by CdbTransaction::CdbTransaction(), CdbDatabase::instance(), main(), and CdbPayloadUtils::registerTranslator(). |
|
|
Check if the API is initialized. This method can be used to check the current status of an API implementation.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
|
Register a user defined "persistent-to-transient" translator. A non-zero pointer is expected as a value of the method's parameter. Also, note that the method will take an ownership of the passed object.
|
|
|
Add a new entry to the registry. This _proxy_ method is meant to be used by subclasses to register themselves in the dictionary through the dictionary's protected interface.
Definition at line 25 of file Cdb.cc. Referenced by CdbBdbSCdb::CdbBdbSCdb(), CdbBdbWCdb::CdbBdbWCdb(), CdbRooDb::CdbRooDb(), and CdbRooRoCdb::CdbRooRoCdb(). |
|
|
Set default database name. NOTE: 0 pointers or empty strings ("") are NOT allowed as values of parameters. This method is supposed to be implemented by subclasses.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
||||||||||||
|
Set default view name. NOTE: 0 pointers or empty strings ("") are NOT allowed as values of parameters. This method is supposed to be implemented by subclasses.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
|
Return the technology name. This method has to be implemented by subclasses. Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
|
Get the transaction manager and start new transaction if needed. This method is used by the CdbTransaction class in implementing the technology-neutral transaction management. Calling this method and returning a non-zero object will ensure an existince of transaction of the specified more. The object's ownership is also returned along with the object. When the object gets destroyed then the transaction should return to its previous state (the one before calling this method). The method is supposed to be implemented by technology-specific implementations of the current class. Any errors during the method's execution should be reported in a form of the 0 pointer.
Implemented in CdbBdbWCdb, CdbBdbSCdb, CdbRooRoCdb, and CdbRooDb. |
|
|
|
|
|
|
1.3-rc3