#include <DatabaseSession.h>
Public Member Functions | |
Handle< ora::DatabaseContainer > | addContainer (const std::string &containerName, const std::string &className) |
void | commitTransaction () |
Configuration & | configuration () |
bool | connect (const std::string &connectionString, bool readOnly) |
bool | connect (const std::string &connectionString, const std::string &asRole, bool readOnly) |
bool | connect (boost::shared_ptr< coral::ISessionProxy > &coralSession, const std::string &connectionString, const std::string &schemaName) |
boost::shared_ptr < ConnectionPool > & | connectionPool () |
const std::string & | connectionString () |
Handle< DatabaseContainer > | containerHandle (const std::string &name) |
Handle< DatabaseContainer > | containerHandle (int contId) |
NamedSequence & | containerIdSequence () |
const std::map< int, Handle < DatabaseContainer > > & | containers () |
ContainerUpdateTable & | containerUpdateTable () |
void | create (const std::string &userSchemaVersion=std::string("")) |
Handle< DatabaseContainer > | createContainer (const std::string &containerName, const edm::TypeWithDict &type) |
DatabaseSession () | |
DatabaseSession (boost::shared_ptr< ConnectionPool > &connectionPool) | |
void | disconnect () |
void | drop () |
void | dropContainer (const std::string &name) |
bool | eraseAllNames () |
bool | eraseObjectName (const std::string &name) |
bool | exists () |
Object | fetchObjectByName (const std::string &name) |
boost::shared_ptr< void > | fetchTypedObjectByName (const std::string &name, const edm::TypeWithDict &asType) |
bool | getItemId (const std::string &name, OId &destination) |
bool | getNamesForContainer (int containerId, std::vector< std::string > &destination) |
bool | getNamesForObject (int containerId, int itemId, std::vector< std::string > &destination) |
bool | isConnected () |
bool | isTransactionActive (bool checkIfReadOnly=false) |
bool | listObjectNames (std::vector< std::string > &destination) |
MappingDatabase & | mappingDatabase () |
void | open () |
void | rollbackTransaction () |
IDatabaseSchema & | schema () |
std::string | schemaVersion (bool userSchema) |
void | setAccessPermission (const std::string &principal, bool forWrite) |
void | setObjectName (const std::string &name, int containerId, int itemId) |
void | startTransaction (bool readOnly) |
SharedSession & | storageAccessSession () |
bool | testDropPermission () |
Handle< DatabaseUtilitySession > | utility () |
virtual | ~DatabaseSession () |
Private Member Functions | |
void | clearTransaction () |
Private Attributes | |
Configuration | m_configuration |
boost::shared_ptr< ConnectionPool > | m_connectionPool |
std::string | m_connectionString |
ContainerUpdateTable | m_containerUpdateTable |
std::auto_ptr< NamedSequence > | m_contIdSequence |
SharedSession | m_dbSession |
std::auto_ptr< MappingDatabase > | m_mappingDb |
SessionMonitoringData * | m_monitoring |
bool | m_ownedTransaction = true |
std::auto_ptr< IDatabaseSchema > | m_schema |
std::string | m_schemaName |
std::auto_ptr< TransactionCache > | m_transactionCache |
Definition at line 45 of file DatabaseSession.h.
ora::DatabaseSession::DatabaseSession | ( | ) |
Definition at line 45 of file DatabaseSession.cc.
References m_connectionPool.
|
explicit |
Definition at line 61 of file DatabaseSession.cc.
|
virtual |
Definition at line 75 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::addContainer | ( | const std::string & | containerName, |
const std::string & | className | ||
) |
Definition at line 256 of file DatabaseSession.cc.
|
private |
Definition at line 119 of file DatabaseSession.cc.
void ora::DatabaseSession::commitTransaction | ( | ) |
Definition at line 160 of file DatabaseSession.cc.
ora::Configuration & ora::DatabaseSession::configuration | ( | ) |
bool ora::DatabaseSession::connect | ( | const std::string & | connectionString, |
bool | readOnly | ||
) |
Definition at line 79 of file DatabaseSession.cc.
References ora::Monitoring::get(), ora::Monitoring::isEnabled(), and ora::Monitoring::startSession().
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(), ora::DatabaseUtilitySession::importContainer(), ora::DatabaseUtilitySession::importContainerSchema(), 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::DatabaseSession::connect | ( | const std::string & | connectionString, |
const std::string & | asRole, | ||
bool | readOnly | ||
) |
Definition at line 91 of file DatabaseSession.cc.
References ora::Monitoring::get(), ora::Monitoring::isEnabled(), and ora::Monitoring::startSession().
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::DatabaseSession::connect | ( | boost::shared_ptr< coral::ISessionProxy > & | coralSession, |
const std::string & | connectionString, | ||
const std::string & | schemaName | ||
) |
Definition at line 104 of file DatabaseSession.cc.
References ora::Monitoring::get(), ora::Monitoring::isEnabled(), and ora::Monitoring::startSession().
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().
boost::shared_ptr< ora::ConnectionPool > & ora::DatabaseSession::connectionPool | ( | ) |
Definition at line 390 of file DatabaseSession.cc.
const std::string & ora::DatabaseSession::connectionString | ( | ) |
Definition at line 141 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::containerHandle | ( | const std::string & | name | ) |
Definition at line 283 of file DatabaseSession.cc.
Referenced by ora::getContainerFromSession(), and ora::DatabaseUtilitySession::importContainerSchema().
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::containerHandle | ( | int | contId | ) |
Definition at line 287 of file DatabaseSession.cc.
ora::NamedSequence & ora::DatabaseSession::containerIdSequence | ( | ) |
Definition at line 374 of file DatabaseSession.cc.
const std::map< int, ora::Handle< ora::DatabaseContainer > > & ora::DatabaseSession::containers | ( | ) |
Definition at line 291 of file DatabaseSession.cc.
ora::ContainerUpdateTable & ora::DatabaseSession::containerUpdateTable | ( | ) |
Definition at line 394 of file DatabaseSession.cc.
void ora::DatabaseSession::create | ( | const std::string & | userSchemaVersion = std::string("") | ) |
Definition at line 200 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::createContainer | ( | const std::string & | containerName, |
const edm::TypeWithDict & | type | ||
) |
Definition at line 267 of file DatabaseSession.cc.
References ora::DatabaseContainer::create().
Referenced by ora::getContainerFromSession().
void ora::DatabaseSession::disconnect | ( | void | ) |
Definition at line 127 of file DatabaseSession.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().
void ora::DatabaseSession::drop | ( | ) |
Definition at line 207 of file DatabaseSession.cc.
References ora::throwException().
void ora::DatabaseSession::dropContainer | ( | const std::string & | name | ) |
Definition at line 277 of file DatabaseSession.cc.
References generateEDF::cont, ora::DatabaseContainer::drop(), ora::DatabaseContainer::id(), and mergeVDriftHistosByStation::name.
bool ora::DatabaseSession::eraseAllNames | ( | ) |
Definition at line 305 of file DatabaseSession.cc.
bool ora::DatabaseSession::eraseObjectName | ( | const std::string & | name | ) |
Definition at line 301 of file DatabaseSession.cc.
bool ora::DatabaseSession::exists | ( | ) |
Definition at line 193 of file DatabaseSession.cc.
ora::Object ora::DatabaseSession::fetchObjectByName | ( | const std::string & | name | ) |
Definition at line 309 of file DatabaseSession.cc.
References generateEDF::cont, ora::DatabaseContainer::fetchItem(), run_regression::ret, and ora::DatabaseContainer::type().
boost::shared_ptr< void > ora::DatabaseSession::fetchTypedObjectByName | ( | const std::string & | name, |
const edm::TypeWithDict & | asType | ||
) |
Definition at line 328 of file DatabaseSession.cc.
References generateEDF::cont, ora::DatabaseContainer::fetchItemAsType(), run_regression::ret, and ora::DatabaseContainer::type().
bool ora::DatabaseSession::getItemId | ( | const std::string & | name, |
ora::OId & | destination | ||
) |
Definition at line 319 of file DatabaseSession.cc.
bool ora::DatabaseSession::getNamesForContainer | ( | int | containerId, |
std::vector< std::string > & | destination | ||
) |
Definition at line 346 of file DatabaseSession.cc.
bool ora::DatabaseSession::getNamesForObject | ( | int | containerId, |
int | itemId, | ||
std::vector< std::string > & | destination | ||
) |
Definition at line 351 of file DatabaseSession.cc.
bool ora::DatabaseSession::isConnected | ( | ) |
Definition at line 137 of file DatabaseSession.cc.
bool ora::DatabaseSession::isTransactionActive | ( | bool | checkIfReadOnly = false | ) |
bool ora::DatabaseSession::listObjectNames | ( | std::vector< std::string > & | destination | ) |
Definition at line 357 of file DatabaseSession.cc.
ora::MappingDatabase & ora::DatabaseSession::mappingDatabase | ( | ) |
Definition at line 378 of file DatabaseSession.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
void ora::DatabaseSession::open | ( | ) |
Definition at line 228 of file DatabaseSession.cc.
Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig(), and ora::DatabaseUtilitySession::importContainerSchema().
void ora::DatabaseSession::rollbackTransaction | ( | ) |
Definition at line 171 of file DatabaseSession.cc.
ora::IDatabaseSchema & ora::DatabaseSession::schema | ( | ) |
Definition at line 370 of file DatabaseSession.cc.
std::string ora::DatabaseSession::schemaVersion | ( | bool | userSchema | ) |
Definition at line 244 of file DatabaseSession.cc.
References AlCaHLTBitMon_QueryRunRegistry::string, ora::IMainTable::userSchemaVersionParameterName(), relval_steps::version, and ora::IMainTable::versionParameterName().
void ora::DatabaseSession::setAccessPermission | ( | const std::string & | principal, |
bool | forWrite | ||
) |
Definition at line 216 of file DatabaseSession.cc.
void ora::DatabaseSession::setObjectName | ( | const std::string & | name, |
int | containerId, | ||
int | itemId | ||
) |
Definition at line 295 of file DatabaseSession.cc.
void ora::DatabaseSession::startTransaction | ( | bool | readOnly | ) |
Definition at line 145 of file DatabaseSession.cc.
References ora::IDatabaseSchema::createSchemaHandle(), and ora::MappingRules::sequenceNameForContainerId().
ora::SharedSession & ora::DatabaseSession::storageAccessSession | ( | ) |
Definition at line 386 of file DatabaseSession.cc.
bool ora::DatabaseSession::testDropPermission | ( | ) |
Definition at line 221 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseUtilitySession > ora::DatabaseSession::utility | ( | ) |
Definition at line 362 of file DatabaseSession.cc.
|
private |
Definition at line 147 of file DatabaseSession.h.
|
private |
Definition at line 137 of file DatabaseSession.h.
Referenced by DatabaseSession().
|
private |
Definition at line 140 of file DatabaseSession.h.
|
private |
Definition at line 146 of file DatabaseSession.h.
|
private |
Definition at line 143 of file DatabaseSession.h.
|
private |
Definition at line 138 of file DatabaseSession.h.
|
private |
Definition at line 144 of file DatabaseSession.h.
|
private |
Definition at line 148 of file DatabaseSession.h.
|
private |
Definition at line 139 of file DatabaseSession.h.
|
private |
Definition at line 142 of file DatabaseSession.h.
|
private |
Definition at line 141 of file DatabaseSession.h.
|
private |
Definition at line 145 of file DatabaseSession.h.