ATLAS Offline Software
|
#include <UserDatabase.h>
Public Types | |
enum | OpenMode { CLOSED, READ, UPDATE } |
Current open mode enumeration. More... | |
Public Member Functions | |
UserDatabase (TechnologyDispatcher &technologyDispatcher, const DatabaseConnectionPolicy &policy, IFileCatalog &fileCatalog, ITransaction &transaction, DatabaseRegistry ®istry, const std::string &name, DatabaseSpecification::NameType nameType) | |
Constructor. More... | |
virtual | ~UserDatabase () |
Destructor. More... | |
DatabaseHandler & | databaseHandler () |
Returns the database handler. More... | |
virtual void | connectForRead () override |
Connects explicitly to the database for read operations. More... | |
virtual void | connectForRead (const DatabaseConnectionPolicy &policy) override |
virtual void | connectForWrite () override |
Connects explicitly to the database for write/update operations. More... | |
virtual void | connectForWrite (const DatabaseConnectionPolicy &policy) override |
virtual void | disconnect () override |
Disconnects from the database. More... | |
virtual IDatabase::OpenMode | openMode () const override |
Returns the opening mode. It can be used to check whether the database is connected. More... | |
virtual const std::string & | fid () override |
Returns the file identifier of this database. More... | |
virtual const std::string & | pfn () override |
Returns the physical file name of this database. More... | |
virtual bool | setTechnology (long technology) override |
Sets the technology identifier for this database. More... | |
virtual long | technology () const override |
Returns the technology identifier for this database. More... | |
virtual std::vector< std::string > | containers () override |
Returns the names of the containers in this database. More... | |
virtual IContainer * | containerHandle (const std::string &name) override |
Returns a pointer to a container object. The user acquires ownership of that object. More... | |
virtual const ITechnologySpecificAttributes & | technologySpecificAttributes () const override |
Returns the object holding the technology specific attributes. More... | |
virtual ITechnologySpecificAttributes & | technologySpecificAttributes () override |
template<class T > | |
T | attribute (const std::string &attributeName, const std::string &option="") |
Templated method to retrieve an attribute. More... | |
template<class T > | |
bool | setAttribute (const std::string &attributeName, const T &atttibuteValue, const std::string &option="") |
Templated method to set an attribute. More... | |
Protected Member Functions | |
virtual bool | attributeOfType (const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) override |
The actual method returning the attribute data given a name. More... | |
virtual bool | setAttributeOfType (const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option) override |
The actual method setting the attribute data given a name. More... | |
Private Member Functions | |
bool | checkInRegistry () |
Checks in the registry if the database handler already exists. More... | |
void | setTechnologyIdentifier (const std::string &sTechnology) |
Converts a technology string to the technology (long) identifier. More... | |
Private Attributes | |
TechnologyDispatcher & | m_technologyDispatcher |
Reference to the technology dispatcher. More... | |
const DatabaseConnectionPolicy & | m_policy |
Reference to the policy. More... | |
IFileCatalog & | m_catalog |
Reference to the file catalog. More... | |
ITransaction & | m_transaction |
Reference to the global transaction. More... | |
DatabaseRegistry & | m_registry |
Reference to the database registry. More... | |
std::string | m_name |
The database name. More... | |
DatabaseSpecification::NameType | m_nameType |
The database name spacification. More... | |
long | m_technology |
The technology identifier of the database. More... | |
bool | m_technologySet |
Checks if the technology identifier has been set. More... | |
DatabaseHandler * | m_databaseHandler |
The underlying database handler. More... | |
IDatabase::OpenMode | m_openMode |
Current open mode. More... | |
bool | m_alreadyConnected |
Flag indicating whether a connection has been already made once. More... | |
std::string | m_the_fid |
Other names used. More... | |
std::string | m_the_pfn |
UserDatabase is an implementation of the IDatabase interface.
Definition at line 31 of file UserDatabase.h.
|
inherited |
pool::PersistencySvc::UserDatabase::UserDatabase | ( | TechnologyDispatcher & | technologyDispatcher, |
const DatabaseConnectionPolicy & | policy, | ||
IFileCatalog & | fileCatalog, | ||
ITransaction & | transaction, | ||
DatabaseRegistry & | registry, | ||
const std::string & | name, | ||
DatabaseSpecification::NameType | nameType | ||
) |
Constructor.
|
virtual |
Destructor.
|
inlineinherited |
Templated method to retrieve an attribute.
Definition at line 37 of file ITechnologySpecificAttributes.h.
|
overrideprotectedvirtual |
The actual method returning the attribute data given a name.
Implements pool::ITechnologySpecificAttributes.
|
private |
Checks in the registry if the database handler already exists.
|
overridevirtual |
Connects explicitly to the database for read operations.
Implements pool::IDatabase.
|
overridevirtual |
Implements pool::IDatabase.
|
overridevirtual |
Connects explicitly to the database for write/update operations.
Implements pool::IDatabase.
|
overridevirtual |
Implements pool::IDatabase.
|
overridevirtual |
Returns a pointer to a container object. The user acquires ownership of that object.
Implements pool::IDatabase.
|
overridevirtual |
Returns the names of the containers in this database.
Implements pool::IDatabase.
DatabaseHandler& pool::PersistencySvc::UserDatabase::databaseHandler | ( | ) |
Returns the database handler.
|
overridevirtual |
Disconnects from the database.
Implements pool::IDatabase.
|
overridevirtual |
Returns the file identifier of this database.
Implements pool::IDatabase.
|
overridevirtual |
Returns the opening mode. It can be used to check whether the database is connected.
Implements pool::IDatabase.
|
overridevirtual |
Returns the physical file name of this database.
Implements pool::IDatabase.
|
inlineinherited |
Templated method to set an attribute.
Definition at line 53 of file ITechnologySpecificAttributes.h.
|
overrideprotectedvirtual |
The actual method setting the attribute data given a name.
Implements pool::ITechnologySpecificAttributes.
|
overridevirtual |
Sets the technology identifier for this database.
This can only be called for newly created databases before the connect method is called. Otherwise false is returned.
Implements pool::IDatabase.
|
private |
Converts a technology string to the technology (long) identifier.
|
overridevirtual |
Returns the technology identifier for this database.
Implements pool::IDatabase.
|
overridevirtual |
Returns the object holding the technology specific attributes.
Implements pool::IDatabase.
|
overridevirtual |
Implements pool::IDatabase.
|
private |
Flag indicating whether a connection has been already made once.
Definition at line 125 of file UserDatabase.h.
|
private |
Reference to the file catalog.
Definition at line 107 of file UserDatabase.h.
|
private |
The underlying database handler.
Definition at line 121 of file UserDatabase.h.
|
private |
The database name.
Definition at line 113 of file UserDatabase.h.
|
private |
The database name spacification.
Definition at line 115 of file UserDatabase.h.
|
private |
Current open mode.
Definition at line 123 of file UserDatabase.h.
|
private |
Reference to the policy.
Definition at line 105 of file UserDatabase.h.
|
private |
Reference to the database registry.
Definition at line 111 of file UserDatabase.h.
|
private |
The technology identifier of the database.
Definition at line 117 of file UserDatabase.h.
|
private |
Reference to the technology dispatcher.
Definition at line 103 of file UserDatabase.h.
|
private |
Checks if the technology identifier has been set.
Definition at line 119 of file UserDatabase.h.
|
private |
Other names used.
Definition at line 127 of file UserDatabase.h.
|
private |
Definition at line 128 of file UserDatabase.h.
|
private |
Reference to the global transaction.
Definition at line 109 of file UserDatabase.h.