#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.
References ora::throwException().
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.Views.PropertyView.BooleanProperty::__init__(), Vispa.Gui.FindDialog.FindDialog::_addScript(), Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), Vispa.Main.Application.Application::_connectSignals(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Views.PropertyView.PropertyView::append(), Vispa.Views.PropertyView.PropertyView::appendAddRow(), Vispa.Main.Application.Application::createAction(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), Vispa.Views.PropertyView.BooleanProperty::setChecked(), Vispa.Main.SplitterTab.SplitterTab::setController(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), Vispa.Views.PropertyView.IntegerProperty::setValue(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::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.Views.PropertyView.BooleanProperty::__init__(), Vispa.Gui.FindDialog.FindDialog::_addScript(), Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), Vispa.Main.Application.Application::_connectSignals(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Views.PropertyView.PropertyView::append(), Vispa.Views.PropertyView.PropertyView::appendAddRow(), Vispa.Main.Application.Application::createAction(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), Vispa.Views.PropertyView.BooleanProperty::setChecked(), Vispa.Main.SplitterTab.SplitterTab::setController(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), Vispa.Views.PropertyView.IntegerProperty::setValue(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::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.Views.PropertyView.BooleanProperty::__init__(), Vispa.Gui.FindDialog.FindDialog::_addScript(), Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), Vispa.Main.Application.Application::_connectSignals(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Views.PropertyView.PropertyView::append(), Vispa.Views.PropertyView.PropertyView::appendAddRow(), Vispa.Main.Application.Application::createAction(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), Vispa.Views.PropertyView.BooleanProperty::setChecked(), Vispa.Main.SplitterTab.SplitterTab::setController(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), Vispa.Views.PropertyView.IntegerProperty::setValue(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().
const std::string & ora::Database::connectionString | ( | ) |
Definition at line 113 of file Database.cc.
Referenced by cond::IOVSchemaUtility::createIOVContainer(), cond::IOVSchemaUtility::createPayloadContainer(), cond::IOVSchemaUtility::dropAll(), cond::IOVSchemaUtility::dropIOVContainer(), and cond::IOVSchemaUtility::dropPayloadContainer().
ora::Container ora::Database::containerHandle | ( | const std::string & | name | ) |
Definition at line 275 of file Database.cc.
References cont, and ora::throwException().
Referenced by cond::DbSession::importObject().
ora::Container ora::Database::containerHandle | ( | int | contId | ) |
Definition at line 285 of file Database.cc.
References cont, and ora::throwException().
std::set< std::string > ora::Database::containers | ( | ) |
Definition at line 194 of file Database.cc.
References python.multivaluedict::map().
Referenced by cond::IOVSchemaUtility::createIOVContainer(), cond::IOVSchemaUtility::createPayloadContainer(), cond::IOVSchemaUtility::dropIOVContainer(), cond::IOVSchemaUtility::dropPayloadContainer(), and cond::IOVSchemaUtility::existsIOVContainer().
bool ora::Database::create | ( | std::string | userSchemaVersion = std::string("") | ) |
Definition at line 138 of file Database.cc.
Referenced by cond::IOVSchemaUtility::createIOVContainer().
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.
References cont, ora::ClassUtils::lookupDictionary(), and ora::throwException().
|
private |
Definition at line 205 of file Database.cc.
References cont, ora::ClassUtils::lookupDictionary(), and ora::throwException().
|
private |
Definition at line 217 of file Database.cc.
References cont, ora::ClassUtils::lookupDictionary(), mergeVDriftHistosByStation::name, ora::nameFromClass(), AlCaHLTBitMon_QueryRunRegistry::string, and ora::throwException().
|
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.Views.LineDecayView.LineDecayView::createLineDecayContainer(), Vispa.Views.PropertyView.BooleanProperty::setChecked(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), Vispa.Views.PropertyView.IntegerProperty::setValue(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().
bool ora::Database::drop | ( | ) |
Definition at line 147 of file Database.cc.
References python.multivaluedict::map().
Referenced by cond::IOVSchemaUtility::dropAll().
bool ora::Database::dropContainer | ( | const std::string & | name | ) |
Definition at line 256 of file Database.cc.
Referenced by cond::IOVSchemaUtility::dropIOVContainer(), and cond::IOVSchemaUtility::dropPayloadContainer().
void ora::Database::erase | ( | const OId & | oid | ) |
Definition at line 317 of file Database.cc.
References cont, ora::OId::containerId(), ora::Container::erase(), and ora::OId::itemId().
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.
Referenced by cond::IOVSchemaUtility::createIOVContainer(), cond::persistency::OraIOVSchema::exists(), and cond::IOVSchemaUtility::existsIOVContainer().
Definition at line 220 of file Database.h.
References cont, ora::OId::containerId(), ora::Container::fetch(), and ora::OId::itemId().
Referenced by cond::DbSession::getTypedObject().
|
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.
References cont, ora::OId::containerId(), ora::Container::fetchItem(), and ora::OId::itemId().
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.
References python.multivaluedict::map().
Referenced by cond::DbSession::storeObject(), and cond::DbSession::updateObject().
|
private |
Definition at line 242 of file Database.cc.
References ora::getContainerFromSession(), and ora::ClassUtils::lookupDictionary().
|
private |
Definition at line 249 of file Database.cc.
References ora::getContainerFromSession(), ora::ClassUtils::lookupDictionary(), ora::nameFromClass(), and AlCaHLTBitMon_QueryRunRegistry::string.
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.
References ora::OId::containerId(), ora::OId::itemId(), and ora::throwException().
|
private |
Definition at line 352 of file Database.cc.
References ora::ClassUtils::lookupDictionary().
OId ora::Database::insert | ( | const std::string & | containerName, |
const T & | data | ||
) |
Referenced by BeautifulSoup.PageElement::_invert(), and cond::DbSession::storeObject().
Referenced by BeautifulSoup.PageElement::_invert().
|
inline |
Definition at line 227 of file Database.h.
References cont, ora::Container::id(), and ora::Container::insert().
Referenced by BeautifulSoup.PageElement::_invert().
Definition at line 236 of file Database.h.
References cont, ora::Container::id(), and ora::Container::insert().
Referenced by BeautifulSoup.PageElement::_invert().
Definition at line 302 of file Database.cc.
References cont, ora::getContainerFromSession(), ora::Container::id(), ora::Container::insertItem(), and ora::Object::type().
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.
References ora::throwException().
bool ora::Database::lockContainer | ( | const std::string & | name | ) |
Definition at line 265 of file Database.cc.
References cont, ora::DatabaseContainer::lock(), and ora::throwException().
Referenced by cond::ExportIOVUtilities::execute().
|
static |
Definition at line 57 of file Database.cc.
References ora::ClassUtils::lookupDictionary(), and ora::nameFromClass().
|
static |
Definition at line 62 of file Database.cc.
References className().
|
private |
Definition at line 174 of file Database.cc.
References ora::Configuration::automaticDatabaseCreation(), and ora::throwException().
Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig().
ora::Database & ora::Database::operator= | ( | const Database & | rhs | ) |
ora::Version ora::Database::schemaVersion | ( | bool | userSchema = false | ) |
Definition at line 186 of file Database.cc.
References ora::Version::fromString(), and ora::throwException().
void ora::Database::setAccessPermission | ( | const std::string & | principal, |
bool | forWrite | ||
) |
void ora::Database::setObjectName | ( | const std::string & | name, |
const OId & | oid | ||
) |
Definition at line 332 of file Database.cc.
References ora::OId::containerId(), and ora::OId::itemId().
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.
References ora::throwException().
Definition at line 244 of file Database.h.
References cont, ora::OId::containerId(), data, ora::OId::itemId(), and ora::Container::update().
Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), python.seqvaluedict.seqdict::__setslice__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.seqvaluedict.seqdict::extend(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), Vispa.Gui.PortConnection.PointToPointConnection::updateConnection(), and cond::DbSession::updateObject().
Definition at line 310 of file Database.cc.
References cont, ora::OId::containerId(), ora::OId::itemId(), and ora::Container::updateItem().
ora::DatabaseUtility ora::Database::utility | ( | ) |
Definition at line 380 of file Database.cc.
|
private |
Definition at line 200 of file Database.h.
Referenced by operator=().