ATLAS Offline Software
Public Types | Public Member Functions | List of all members
pool::IDatabase Class Referenceabstract

#include <PersistencySvc/IDatabase.h>

Inheritance diagram for pool::IDatabase:
Collaboration diagram for pool::IDatabase:

Public Types

enum  OpenMode { CLOSED, READ, UPDATE }
 Current open mode enumeration. More...
 

Public Member Functions

virtual ~IDatabase ()
 Empty destructor. More...
 
virtual void connectForRead ()=0
 Connects explicitly to the database for read operations. More...
 
virtual void connectForRead (const DatabaseConnectionPolicy &policy)=0
 
virtual void connectForWrite ()=0
 Connects explicitly to the database for write/update operations. More...
 
virtual void connectForWrite (const DatabaseConnectionPolicy &policy)=0
 
virtual void disconnect ()=0
 Disconnects from the database. More...
 
virtual OpenMode openMode () const =0
 Returns the opening mode. It can be used to check whether the database is connected. More...
 
virtual const std::string & fid ()=0
 Returns the file identifier of this database. More...
 
virtual const std::string & pfn ()=0
 Returns the physical file name of this database. More...
 
virtual bool setTechnology (long technology)=0
 Sets the technology identifier for this database. More...
 
virtual long technology () const =0
 Returns the technology identifier for this database. More...
 
virtual std::vector< std::string > containers ()=0
 Returns the names of the containers in this database. More...
 
virtual IContainercontainerHandle (const std::string &name)=0
 Returns a pointer to a container object. The user acquires ownership of that object. More...
 
virtual const ITechnologySpecificAttributestechnologySpecificAttributes () const =0
 Returns the object holding the technology specific attributes. More...
 
virtual ITechnologySpecificAttributestechnologySpecificAttributes ()=0
 

Detailed Description

IDatabase is the base class for database objects

Definition at line 25 of file IDatabase.h.

Member Enumeration Documentation

◆ OpenMode

Current open mode enumeration.

Enumerator
CLOSED 
READ 
UPDATE 

Definition at line 28 of file IDatabase.h.

28  { CLOSED,
29  READ,
30  UPDATE } OpenMode;

Constructor & Destructor Documentation

◆ ~IDatabase()

virtual pool::IDatabase::~IDatabase ( )
inlinevirtual

Empty destructor.

Definition at line 33 of file IDatabase.h.

33 {};

Member Function Documentation

◆ connectForRead() [1/2]

virtual void pool::IDatabase::connectForRead ( )
pure virtual

Connects explicitly to the database for read operations.

Implemented in pool::PersistencySvc::UserDatabase.

◆ connectForRead() [2/2]

virtual void pool::IDatabase::connectForRead ( const DatabaseConnectionPolicy policy)
pure virtual

◆ connectForWrite() [1/2]

virtual void pool::IDatabase::connectForWrite ( )
pure virtual

Connects explicitly to the database for write/update operations.

Implemented in pool::PersistencySvc::UserDatabase.

◆ connectForWrite() [2/2]

virtual void pool::IDatabase::connectForWrite ( const DatabaseConnectionPolicy policy)
pure virtual

◆ containerHandle()

virtual IContainer* pool::IDatabase::containerHandle ( const std::string &  name)
pure virtual

Returns a pointer to a container object. The user acquires ownership of that object.

Implemented in pool::PersistencySvc::UserDatabase.

◆ containers()

virtual std::vector< std::string > pool::IDatabase::containers ( )
pure virtual

Returns the names of the containers in this database.

Implemented in pool::PersistencySvc::UserDatabase.

◆ disconnect()

virtual void pool::IDatabase::disconnect ( )
pure virtual

Disconnects from the database.

Implemented in pool::PersistencySvc::UserDatabase.

◆ fid()

virtual const std::string& pool::IDatabase::fid ( )
pure virtual

Returns the file identifier of this database.

Implemented in pool::PersistencySvc::UserDatabase.

◆ openMode()

virtual OpenMode pool::IDatabase::openMode ( ) const
pure virtual

Returns the opening mode. It can be used to check whether the database is connected.

Implemented in pool::PersistencySvc::UserDatabase.

◆ pfn()

virtual const std::string& pool::IDatabase::pfn ( )
pure virtual

Returns the physical file name of this database.

Implemented in pool::PersistencySvc::UserDatabase.

◆ setTechnology()

virtual bool pool::IDatabase::setTechnology ( long  technology)
pure virtual

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.

Implemented in pool::PersistencySvc::UserDatabase.

◆ technology()

virtual long pool::IDatabase::technology ( ) const
pure virtual

Returns the technology identifier for this database.

Implemented in pool::PersistencySvc::UserDatabase.

◆ technologySpecificAttributes() [1/2]

virtual const ITechnologySpecificAttributes& pool::IDatabase::technologySpecificAttributes ( ) const
pure virtual

Returns the object holding the technology specific attributes.

Implemented in pool::PersistencySvc::UserDatabase.

◆ technologySpecificAttributes() [2/2]

virtual ITechnologySpecificAttributes& pool::IDatabase::technologySpecificAttributes ( )
pure virtual

The documentation for this class was generated from the following file:
pool::IDatabase::OpenMode
OpenMode
Current open mode enumeration.
Definition: IDatabase.h:28
pool::IDatabase::CLOSED
@ CLOSED
Definition: IDatabase.h:28
pool::IDatabase::READ
@ READ
Definition: IDatabase.h:29
pool::IDatabase::UPDATE
@ UPDATE
Definition: IDatabase.h:30