#include <Database.h>
Public Member Functions | |
Configuration & | configuration () |
bool | connect (const std::string &connectionString, bool readOnly=false) |
bool | connect (const std::string &connectionString, const std::string &asRole, bool readOnly=false) |
bool | connect (boost::shared_ptr< coral::ISessionProxy > &coralSession, const std::string &connectionString, const std::string &schemaName="") |
const std::string & | connectionString () |
Container | containerHandle (const std::string &name) |
Container | containerHandle (int contId) |
std::set< std::string > | containers () |
bool | create (std::string userSchemaVersion=std::string("")) |
template<typename T > | |
Container | createContainer (const std::string &name) |
template<typename T > | |
Container | createContainer () |
Container | createContainer (const std::string &className, std::string name="") |
template<typename T > | |
ora::Container | createContainer (const std::string &name) |
template<typename T > | |
ora::Container | createContainer () |
Database () | |
Database (const Database &rhs) | |
Database (boost::shared_ptr< ConnectionPool > &connectionPool) | |
void | disconnect () |
bool | drop () |
bool | dropContainer (const std::string &name) |
void | erase (const OId &oid) |
bool | eraseAllNames () |
bool | eraseObjectName (const std::string &name) |
bool | exists () |
template<typename T > | |
boost::shared_ptr< T > | fetch (const OId &oid) |
template<typename T > | |
boost::shared_ptr< T > | fetchByName (const std::string &name) |
Object | fetchItem (const OId &oid) |
Object | fetchItemByName (const std::string &name) |
void | flush () |
bool | getItemId (const std::string &name, OId &destination) |
bool | getNamesForObject (const OId &oid, std::vector< std::string > &destination) |
template<typename T > | |
OId | insert (const std::string &containerName, const T &data) |
template<typename T > | |
OId | insert (const T &data) |
template<typename T > | |
ora::OId | insert (const std::string &containerName, const T &data) |
template<typename T > | |
ora::OId | insert (const T &data) |
OId | insertItem (const std::string &containerName, const Object &data) |
bool | isConnected () |
bool | listObjectNames (std::vector< std::string > &destination) |
bool | lockContainer (const std::string &name) |
Database & | operator= (const Database &rhs) |
ora::Version | schemaVersion (bool userSchema=false) |
void | setAccessPermission (const std::string &principal, bool forWrite) |
void | setObjectName (const std::string &name, const OId &oid) |
SharedSession & | storageAccessSession () |
Transaction & | transaction () |
template<typename T > | |
void | update (const OId &oid, const T &data) |
void | updateItem (const OId &oid, const Object &data) |
DatabaseUtility | utility () |
virtual | ~Database () |
Static Public Member Functions | |
static std::string | nameForContainer (const std::type_info &typeInfo) |
static std::string | nameForContainer (const std::string &className) |
Private Member Functions | |
void | checkTransaction () |
Container | createContainer (const std::string &name, const std::type_info &typeInfo) |
Container | createContainer (const std::type_info &typeInfo) |
Container | getContainer (const std::string &name, const std::type_info &typeInfo) |
Container | getContainer (const std::type_info &typeInfo) |
boost::shared_ptr< void > | getTypedObjectByName (const std::string &name, const std::type_info &typeInfo) |
void | open (bool writingAccess=false) |
Private Attributes | |
boost::shared_ptr< DatabaseImpl > | m_impl |
Definition at line 28 of file Database.h.
ora::Database::Database | ( | ) |
Definition at line 66 of file Database.cc.
Referenced by ProducePlots.ProducePlots::plotAllAndLast40Runs(), PopulateDB.PopulateDB::run(), and DiscoverProcessedRuns.DiscoverProcessedRuns::runsList().
ora::Database::Database | ( | const Database & | rhs | ) |
Definition at line 70 of file Database.cc.
Referenced by ProducePlots.ProducePlots::plotAllAndLast40Runs(), PopulateDB.PopulateDB::run(), and DiscoverProcessedRuns.DiscoverProcessedRuns::runsList().
ora::Database::Database | ( | boost::shared_ptr< ConnectionPool > & | connectionPool | ) |
Definition at line 74 of file Database.cc.
Referenced by ProducePlots.ProducePlots::plotAllAndLast40Runs(), PopulateDB.PopulateDB::run(), and DiscoverProcessedRuns.DiscoverProcessedRuns::runsList().
|
virtual |
Definition at line 78 of file Database.cc.
|
private |
Definition at line 124 of file Database.cc.
ora::Configuration & ora::Database::configuration | ( | ) |
Definition at line 86 of file Database.cc.
bool ora::Database::connect | ( | const std::string & | connectionString, |
bool | readOnly = false |
||
) |
Definition at line 90 of file Database.cc.
Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), and Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu().
bool ora::Database::connect | ( | const std::string & | connectionString, |
const std::string & | asRole, | ||
bool | readOnly = false |
||
) |
Definition at line 95 of file Database.cc.
Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), and Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu().
bool ora::Database::connect | ( | boost::shared_ptr< coral::ISessionProxy > & | coralSession, |
const std::string & | connectionString, | ||
const std::string & | schemaName = "" |
||
) |
Definition at line 101 of file Database.cc.
Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), and Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu().
const std::string & ora::Database::connectionString | ( | ) |
Definition at line 113 of file Database.cc.
ora::Container ora::Database::containerHandle | ( | const std::string & | name | ) |
Definition at line 275 of file Database.cc.
ora::Container ora::Database::containerHandle | ( | int | contId | ) |
Definition at line 285 of file Database.cc.
std::set< std::string > ora::Database::containers | ( | ) |
Definition at line 194 of file Database.cc.
bool ora::Database::create | ( | std::string | userSchemaVersion = std::string("") | ) |
Definition at line 138 of file Database.cc.
Container ora::Database::createContainer | ( | const std::string & | name | ) |
Container ora::Database::createContainer | ( | ) |
Referenced by createContainer().
ora::Container ora::Database::createContainer | ( | const std::string & | className, |
std::string | name = "" |
||
) |
Definition at line 229 of file Database.cc.
|
private |
Definition at line 205 of file Database.cc.
|
private |
Definition at line 217 of file Database.cc.
|
inline |
Definition at line 208 of file Database.h.
References createContainer().
|
inline |
Definition at line 214 of file Database.h.
void ora::Database::disconnect | ( | void | ) |
Definition at line 105 of file Database.cc.
Referenced by Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu().
bool ora::Database::drop | ( | ) |
Definition at line 147 of file Database.cc.
bool ora::Database::dropContainer | ( | const std::string & | name | ) |
Definition at line 256 of file Database.cc.
void ora::Database::erase | ( | const OId & | oid | ) |
Definition at line 317 of file Database.cc.
bool ora::Database::eraseAllNames | ( | ) |
Definition at line 342 of file Database.cc.
bool ora::Database::eraseObjectName | ( | const std::string & | name | ) |
Definition at line 337 of file Database.cc.
bool ora::Database::exists | ( | ) |
Definition at line 133 of file Database.cc.
Definition at line 220 of file Database.h.
References generateEDF::cont, ora::OId::containerId(), ora::Container::fetch(), and ora::OId::itemId().
|
inline |
Definition at line 252 of file Database.h.
ora::Object ora::Database::fetchItem | ( | const OId & | oid | ) |
Definition at line 297 of file Database.cc.
ora::Object ora::Database::fetchItemByName | ( | const std::string & | name | ) |
Definition at line 358 of file Database.cc.
void ora::Database::flush | ( | ) |
Definition at line 323 of file Database.cc.
|
private |
Definition at line 242 of file Database.cc.
|
private |
Definition at line 249 of file Database.cc.
bool ora::Database::getItemId | ( | const std::string & | name, |
ora::OId & | destination | ||
) |
Definition at line 347 of file Database.cc.
bool ora::Database::getNamesForObject | ( | const OId & | oid, |
std::vector< std::string > & | destination | ||
) |
Definition at line 363 of file Database.cc.
|
private |
Definition at line 352 of file Database.cc.
OId ora::Database::insert | ( | const std::string & | containerName, |
const T & | data | ||
) |
|
inline |
Definition at line 227 of file Database.h.
References generateEDF::cont, ora::Container::id(), and ora::Container::insert().
Definition at line 236 of file Database.h.
References generateEDF::cont, ora::Container::id(), and ora::Container::insert().
Definition at line 302 of file Database.cc.
bool ora::Database::isConnected | ( | ) |
Definition at line 109 of file Database.cc.
bool ora::Database::listObjectNames | ( | std::vector< std::string > & | destination | ) |
Definition at line 372 of file Database.cc.
bool ora::Database::lockContainer | ( | const std::string & | name | ) |
Definition at line 265 of file Database.cc.
|
static |
Definition at line 57 of file Database.cc.
|
static |
Definition at line 62 of file Database.cc.
|
private |
Definition at line 174 of file Database.cc.
ora::Database & ora::Database::operator= | ( | const Database & | rhs | ) |
Definition at line 81 of file Database.cc.
ora::Version ora::Database::schemaVersion | ( | bool | userSchema = false | ) |
Definition at line 186 of file Database.cc.
void ora::Database::setAccessPermission | ( | const std::string & | principal, |
bool | forWrite | ||
) |
Definition at line 162 of file Database.cc.
void ora::Database::setObjectName | ( | const std::string & | name, |
const OId & | oid | ||
) |
Definition at line 332 of file Database.cc.
ora::SharedSession & ora::Database::storageAccessSession | ( | ) |
Definition at line 386 of file Database.cc.
ora::Transaction & ora::Database::transaction | ( | ) |
Definition at line 117 of file Database.cc.
Definition at line 244 of file Database.h.
References generateEDF::cont, ora::OId::containerId(), data, ora::OId::itemId(), and ora::Container::update().
Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().
Definition at line 310 of file Database.cc.
ora::DatabaseUtility ora::Database::utility | ( | ) |
Definition at line 380 of file Database.cc.
|
private |
Definition at line 200 of file Database.h.