ATLAS Offline Software
Loading...
Searching...
No Matches
IDatabase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INCLUDE_PERSISTENCYSVC_IDATABASE_H
6#define INCLUDE_PERSISTENCYSVC_IDATABASE_H
7
8// includes
9#include <string>
10#include <vector>
11
12namespace pool {
13
14 // forward declarations
16 class IContainer;
18
24
25 class IDatabase {
26 public:
28 typedef enum { CLOSED,
31
33 virtual ~IDatabase() {};
34
36 virtual void connectForRead() = 0;
37 virtual void connectForRead( const DatabaseConnectionPolicy& policy ) = 0;
38
40 virtual void connectForWrite() = 0;
41 virtual void connectForWrite( const DatabaseConnectionPolicy& policy ) = 0;
42
44 virtual void disconnect() = 0;
45
47 virtual OpenMode openMode() const = 0;
48
50 virtual const std::string& fid() = 0;
51
53 virtual const std::string& pfn() = 0;
54
59 virtual bool setTechnology( long technology ) = 0;
60
62 virtual long technology() const = 0;
63
65 virtual std::vector< std::string > containers() = 0;
66
68 virtual IContainer* containerHandle( const std::string& name ) = 0;
69
73 };
74
75}
76
77#endif
DatabaseConnectionPolicy is a class holding information on the policy to be followed whenever a datab...
IContainer is the base class for container objects.
Definition IContainer.h:23
IDatabase is the base class for database objects.
Definition IDatabase.h:25
virtual void connectForWrite()=0
Connects explicitly to the database for write/update operations.
virtual ITechnologySpecificAttributes & technologySpecificAttributes()=0
virtual ~IDatabase()
Empty destructor.
Definition IDatabase.h:33
virtual void connectForRead(const DatabaseConnectionPolicy &policy)=0
virtual void disconnect()=0
Disconnects from the database.
virtual OpenMode openMode() const =0
Returns the opening mode. It can be used to check whether the database is connected.
virtual bool setTechnology(long technology)=0
Sets the technology identifier for this database.
virtual const std::string & pfn()=0
Returns the physical file name of this database.
virtual std::vector< std::string > containers()=0
Returns the names of the containers in this database.
virtual const std::string & fid()=0
Returns the file identifier of this database.
OpenMode
Current open mode enumeration.
Definition IDatabase.h:28
virtual void connectForRead()=0
Connects explicitly to the database for read operations.
virtual const ITechnologySpecificAttributes & technologySpecificAttributes() const =0
Returns the object holding the technology specific attributes.
virtual IContainer * containerHandle(const std::string &name)=0
Returns a pointer to a container object. The user acquires ownership of that object.
virtual long technology() const =0
Returns the technology identifier for this database.
virtual void connectForWrite(const DatabaseConnectionPolicy &policy)=0
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
pool namespace
Definition libname.h:15