#include <Database.h>
Public Member Functions | |
Configuration & | configuration () |
bool | connect (const std::string &connectionString, bool readOnly=false) |
const std::string & | connectionString () |
Container | containerHandle (const std::string &name) |
Container | containerHandle (int contId) |
std::set< std::string > | containers () |
bool | create () |
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) |
Database & | operator= (const Database &rhs) |
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 23 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 115 of file Database.cc.
References ora::throwException().
ora::Configuration & ora::Database::configuration | ( | ) |
Definition at line 87 of file Database.cc.
bool ora::Database::connect | ( | const std::string & | connectionString, |
bool | readOnly = false |
||
) |
Definition at line 91 of file Database.cc.
Referenced by python.Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), python.Vispa.Views.PropertyView.BooleanProperty::__init__(), python.Vispa.Gui.FindDialog.FindDialog::_addScript(), python.Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), python.Vispa.Main.Application.Application::_connectSignals(), python.Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), python.Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), python.Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), python.Vispa.Views.PropertyView.PropertyView::append(), python.Vispa.Views.PropertyView.PropertyView::appendAddRow(), python.Vispa.Main.Application.Application::createAction(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), python.Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), python.Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), python.Vispa.Views.PropertyView.BooleanProperty::setChecked(), python.Vispa.Main.SplitterTab.SplitterTab::setController(), python.Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), python.Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), python.Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), python.Vispa.Views.PropertyView.IntegerProperty::setValue(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), python.Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and python.Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().
const std::string & ora::Database::connectionString | ( | ) |
Definition at line 104 of file Database.cc.
ora::Container ora::Database::containerHandle | ( | const std::string & | name | ) |
Definition at line 236 of file Database.cc.
References cont, and ora::throwException().
Referenced by cond::IOVService::deleteAll(), cond::DbSession::getTypedObject(), cond::DbSession::storeObject(), and cond::DbSession::updateObject().
ora::Container ora::Database::containerHandle | ( | int | contId | ) |
Definition at line 246 of file Database.cc.
References cont, and ora::throwException().
std::set< std::string > ora::Database::containers | ( | ) |
bool ora::Database::create | ( | ) |
Definition at line 129 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 200 of file Database.cc.
References cont, ora::ClassUtils::lookupDictionary(), and ora::throwException().
|
private |
Definition at line 176 of file Database.cc.
References cont, ora::ClassUtils::lookupDictionary(), and ora::throwException().
|
private |
Definition at line 188 of file Database.cc.
References cont, ora::ClassUtils::lookupDictionary(), mergeVDriftHistosByStation::name, ora::nameFromClass(), and ora::throwException().
|
inline |
Definition at line 188 of file Database.h.
References createContainer().
|
inline |
Definition at line 194 of file Database.h.
void ora::Database::disconnect | ( | void | ) |
Definition at line 96 of file Database.cc.
Referenced by python.Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), python.Vispa.Views.PropertyView.BooleanProperty::setChecked(), python.Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), python.Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), python.Vispa.Views.PropertyView.IntegerProperty::setValue(), python.Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and python.Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().
bool ora::Database::drop | ( | ) |
Definition at line 138 of file Database.cc.
References edm::productstatus::dropped(), and python.multivaluedict::map().
bool ora::Database::dropContainer | ( | const std::string & | name | ) |
Definition at line 227 of file Database.cc.
void ora::Database::erase | ( | const OId & | oid | ) |
Definition at line 278 of file Database.cc.
References cont, ora::OId::containerId(), ora::Container::erase(), and ora::OId::itemId().
bool ora::Database::eraseAllNames | ( | ) |
Definition at line 303 of file Database.cc.
bool ora::Database::eraseObjectName | ( | const std::string & | name | ) |
Definition at line 298 of file Database.cc.
bool ora::Database::exists | ( | ) |
Definition at line 124 of file Database.cc.
Definition at line 200 of file Database.h.
References cont, ora::OId::containerId(), ora::Container::fetch(), and ora::OId::itemId().
|
inline |
Definition at line 232 of file Database.h.
ora::Object ora::Database::fetchItem | ( | const OId & | oid | ) |
Definition at line 258 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 319 of file Database.cc.
void ora::Database::flush | ( | ) |
Definition at line 284 of file Database.cc.
References python.multivaluedict::map().
Referenced by cond::DbSession::storeObject().
|
private |
Definition at line 213 of file Database.cc.
References ora::getContainerFromSession(), and ora::ClassUtils::lookupDictionary().
|
private |
Definition at line 220 of file Database.cc.
References ora::getContainerFromSession(), ora::ClassUtils::lookupDictionary(), and ora::nameFromClass().
bool ora::Database::getItemId | ( | const std::string & | name, |
ora::OId & | destination | ||
) |
Definition at line 308 of file Database.cc.
bool ora::Database::getNamesForObject | ( | const OId & | oid, |
std::vector< std::string > & | destination | ||
) |
Definition at line 324 of file Database.cc.
References ora::OId::containerId(), and ora::OId::itemId().
|
private |
Definition at line 313 of file Database.cc.
References ora::ClassUtils::lookupDictionary().
OId ora::Database::insert | ( | const std::string & | containerName, |
const T & | data | ||
) |
Referenced by cond::DbSession::storeObject().
|
inline |
Definition at line 207 of file Database.h.
References cont, ora::Container::id(), and ora::Container::insert().
Definition at line 216 of file Database.h.
References cont, ora::Container::id(), and ora::Container::insert().
Definition at line 263 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 100 of file Database.cc.
bool ora::Database::listObjectNames | ( | std::vector< std::string > & | destination | ) |
Definition at line 330 of file Database.cc.
|
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 153 of file Database.cc.
References ora::Configuration::automaticDatabaseCreation(), and ora::throwException().
Referenced by python.Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig().
ora::Database & ora::Database::operator= | ( | const Database & | rhs | ) |
void ora::Database::setObjectName | ( | const std::string & | name, |
const OId & | oid | ||
) |
Definition at line 293 of file Database.cc.
References ora::OId::containerId(), and ora::OId::itemId().
ora::SharedSession & ora::Database::storageAccessSession | ( | ) |
Definition at line 341 of file Database.cc.
ora::Transaction & ora::Database::transaction | ( | ) |
Definition at line 108 of file Database.cc.
References ora::throwException().
Definition at line 224 of file Database.h.
References cont, ora::OId::containerId(), runTheMatrix::data, ora::OId::itemId(), and ora::Container::update().
Referenced by python.seqvaluedict.seqdict::__setslice__(), python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.seqvaluedict.seqdict::extend(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
Definition at line 271 of file Database.cc.
References cont, ora::OId::containerId(), ora::OId::itemId(), and ora::Container::updateItem().
ora::DatabaseUtility ora::Database::utility | ( | ) |
Definition at line 335 of file Database.cc.
|
private |
Definition at line 180 of file Database.h.
Referenced by operator=().