ATLAS Offline Software
Loading...
Searching...
No Matches
IDatabase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
29
35
36 class IDatabase {
37 public:
39 typedef enum { CLOSED,
42
44 virtual ~IDatabase() {};
45
47 virtual void connectForRead() = 0;
48
50 virtual void connectForWrite() = 0;
51
53 virtual void disconnect() = 0;
54
56 virtual OpenMode openMode() const = 0;
57
59 virtual const std::string& fid() = 0;
60
62 virtual const std::string& pfn() = 0;
63
68 virtual bool setTechnology( long technology ) = 0;
69
71 virtual long technology() const = 0;
72
74 virtual std::vector< std::string > containers() = 0;
75
77 virtual IContainer* containerHandle( const std::string& name ) = 0;
78
82 };
83
84}
85
86#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:36
virtual void connectForWrite()=0
Connects explicitly to the database for write/update operations.
virtual ITechnologySpecificAttributes & technologySpecificAttributes()=0
virtual ~IDatabase()
Empty destructor.
Definition IDatabase.h:44
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:39
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.
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
Framework include files.
Definition libname.h:15
NameType
Enumeration type specifying the database name field, wherever the latter is used in methods accessing...
Definition IDatabase.h:23
@ FID
Physical File Name.
Definition IDatabase.h:25
@ LFN
File IDentifier.
Definition IDatabase.h:26