![]() |
ATLAS Offline Software
|
#include <PersistencySvc/DatabaseConnectionPolicy.h>
Public Types | |
| enum | Mode { RAISE_ERROR, CREATE, OVERWRITE, UPDATE, READ } |
| Opening modes for a database. More... | |
Public Member Functions | |
| DatabaseConnectionPolicy () | |
| Default constructor. Initializes the data members with their default values. More... | |
| ~DatabaseConnectionPolicy () | |
| Destructor. More... | |
| DatabaseConnectionPolicy (const DatabaseConnectionPolicy &rhs) | |
| Copy constructor. More... | |
| DatabaseConnectionPolicy & | operator= (const DatabaseConnectionPolicy &rhs) |
| Assignment operator. More... | |
| Mode | writeModeForExisting () const |
| Retrieves the opening mode when an existing database is opened for writing. More... | |
| bool | setWriteModeForExisting (Mode mode) |
| Sets the opening mode when an existing database is opened for writing. More... | |
| Mode | writeModeForNonExisting () const |
| Retrieves the opening mode when a non existing database is opened for writing. More... | |
| bool | setWriteModeForNonExisting (Mode mode) |
| Sets the opening mode when a non existing database is opened for writing Acceptable values are RAISE_ERROR (default), CREATE and UPDATE. More... | |
| Mode | readMode () const |
| Retrieves the opening mode of a database in an update transaction, when opened for reading. More... | |
| bool | setReadMode (Mode mode) |
| Sets the opening mode of a database in an update transaction, when opened for reading. More... | |
Private Attributes | |
| Mode | m_writeModeForExisting |
| The opening mode when an existing database is opened for writing. Default is UPDATE. More... | |
| Mode | m_writeModeForNonExisting |
| The opening mode when a non existing database is opened for writing. Default is RAISE_ERROR. More... | |
| Mode | m_readMode |
| The opening mode of a database in an update transaction, when opened for reading. Default is READ. More... | |
DatabaseConnectionPolicy is a class holding information on the policy to be followed whenever a database is opened under different situations in terms of transaction context and database existence.
Definition at line 19 of file DatabaseConnectionPolicy.h.
Opening modes for a database.
| Enumerator | |
|---|---|
| RAISE_ERROR | |
| CREATE | |
| OVERWRITE | |
| UPDATE | |
| READ | |
Definition at line 22 of file DatabaseConnectionPolicy.h.
| pool::DatabaseConnectionPolicy::DatabaseConnectionPolicy | ( | ) |
Default constructor. Initializes the data members with their default values.
|
inline |
| pool::DatabaseConnectionPolicy::DatabaseConnectionPolicy | ( | const DatabaseConnectionPolicy & | rhs | ) |
Copy constructor.
| DatabaseConnectionPolicy& pool::DatabaseConnectionPolicy::operator= | ( | const DatabaseConnectionPolicy & | rhs | ) |
Assignment operator.
| Mode pool::DatabaseConnectionPolicy::readMode | ( | ) | const |
Retrieves the opening mode of a database in an update transaction, when opened for reading.
| bool pool::DatabaseConnectionPolicy::setReadMode | ( | Mode | mode | ) |
Sets the opening mode of a database in an update transaction, when opened for reading.
Acceptable values are READ (default) and UPDATE. Returns false if any other value is passed, true otherwise.
| bool pool::DatabaseConnectionPolicy::setWriteModeForExisting | ( | Mode | mode | ) |
Sets the opening mode when an existing database is opened for writing.
Acceptable values are UPDATE (default), OVERWRITE and RAISE_ERROR. Returns false if any other value is passed, true otherwise.
| bool pool::DatabaseConnectionPolicy::setWriteModeForNonExisting | ( | Mode | mode | ) |
Sets the opening mode when a non existing database is opened for writing Acceptable values are RAISE_ERROR (default), CREATE and UPDATE.
Returns false if any other value is passed, true otherwise.
| Mode pool::DatabaseConnectionPolicy::writeModeForExisting | ( | ) | const |
Retrieves the opening mode when an existing database is opened for writing.
| Mode pool::DatabaseConnectionPolicy::writeModeForNonExisting | ( | ) | const |
Retrieves the opening mode when a non existing database is opened for writing.
|
private |
The opening mode of a database in an update transaction, when opened for reading. Default is READ.
Definition at line 75 of file DatabaseConnectionPolicy.h.
|
private |
The opening mode when an existing database is opened for writing. Default is UPDATE.
Definition at line 69 of file DatabaseConnectionPolicy.h.
|
private |
The opening mode when a non existing database is opened for writing. Default is RAISE_ERROR.
Definition at line 72 of file DatabaseConnectionPolicy.h.
1.8.18