ATLAS Offline Software
ISession.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INCLUDE_PERSISTENCYSVC_ISESSION_H
6 #define INCLUDE_PERSISTENCYSVC_ISESSION_H
7 
8 #include <string>
9 #include <vector>
11 
12 namespace pool {
13 
14  // forward declarations
15  class DatabaseConnectionPolicy;
16  class ITransaction;
17  class IDatabase;
18  class ITechnologySpecificAttributes;
19  class IFileCatalog;
20 
31  class ISession {
32  protected:
33  public:
35  virtual ~ISession() {}
36 
38  virtual void setDefaultConnectionPolicy( const DatabaseConnectionPolicy& policy ) = 0;
39 
42 
46  virtual bool disconnectAll() = 0;
47 
49  virtual ITransaction& transaction() = 0;
50  virtual const ITransaction& transaction() const = 0;
51 
53  virtual std::vector< std::string > connectedDatabases() const = 0;
54 
56  virtual IDatabase* databaseHandle( const std::string& dbName,
57  DatabaseSpecification::NameType dbNameType ) = 0;
58 
60  virtual IFileCatalog& fileCatalog() = 0;
61 
63  virtual const ITechnologySpecificAttributes& technologySpecificAttributes( long technology ) const = 0;
65  };
66 
67 }
68 
69 #endif
pool::ISession::~ISession
virtual ~ISession()
Default destructor.
Definition: ISession.h:35
pool
pool namespace
Definition: libname.h:15
pool::ISession::disconnectAll
virtual bool disconnectAll()=0
Explicitly disconnects all the databases.
pool::DatabaseSpecification::NameType
NameType
Enumeration type specifying the database name field, wherever the latter is used in methods accessing...
Definition: DatabaseSpecification.h:14
pool::ISession::transaction
virtual ITransaction & transaction()=0
Returns the transaction object.
pool::ISession
Definition: ISession.h:31
pool::IFileCatalog
Definition: IFileCatalog.h:23
PixelModuleFeMask_create_db.dbName
string dbName
Definition: PixelModuleFeMask_create_db.py:21
pool::ISession::technologySpecificAttributes
virtual const ITechnologySpecificAttributes & technologySpecificAttributes(long technology) const =0
Returns the object holding the technology specific attributes for a given technology domain.
pool::ITransaction
Definition: ITransaction.h:21
pool::ISession::fileCatalog
virtual IFileCatalog & fileCatalog()=0
Returns the file catalog in use.
pool::ITechnologySpecificAttributes
Definition: ITechnologySpecificAttributes.h:22
pool::IDatabase
Definition: IDatabase.h:25
pool::ISession::transaction
virtual const ITransaction & transaction() const =0
pool::ISession::databaseHandle
virtual IDatabase * databaseHandle(const std::string &dbName, DatabaseSpecification::NameType dbNameType)=0
Returns a pointer to a database object. The user acquires ownership of that object.
pool::ISession::setDefaultConnectionPolicy
virtual void setDefaultConnectionPolicy(const DatabaseConnectionPolicy &policy)=0
Sets the default policy when databases are opened/connected.
DatabaseSpecification.h
pool::DatabaseConnectionPolicy
Definition: DatabaseConnectionPolicy.h:19
pool::ISession::defaultConnectionPolicy
virtual const DatabaseConnectionPolicy & defaultConnectionPolicy() const =0
Retrieves the default connection policy.
pool::ISession::connectedDatabases
virtual std::vector< std::string > connectedDatabases() const =0
Returns a vector with the file identifiers of the presently open databases.
pool::ISession::technologySpecificAttributes
virtual ITechnologySpecificAttributes & technologySpecificAttributes(long technology)=0