#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) |
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 Reflex::Type &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 Reflex::Type &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 |
std::auto_ptr< IDatabaseSchema > | m_schema |
std::auto_ptr< TransactionCache > | m_transactionCache |
Definition at line 42 of file DatabaseSession.h.
ora::DatabaseSession::DatabaseSession | ( | ) |
Definition at line 45 of file DatabaseSession.cc.
References m_connectionPool.
|
explicit |
Definition at line 60 of file DatabaseSession.cc.
|
virtual |
Definition at line 73 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::addContainer | ( | const std::string & | containerName, |
const std::string & | className | ||
) |
Definition at line 237 of file DatabaseSession.cc.
|
private |
Definition at line 102 of file DatabaseSession.cc.
void ora::DatabaseSession::commitTransaction | ( | ) |
Definition at line 141 of file DatabaseSession.cc.
ora::Configuration & ora::DatabaseSession::configuration | ( | ) |
bool ora::DatabaseSession::connect | ( | const std::string & | connectionString, |
bool | readOnly | ||
) |
Definition at line 77 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 89 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 371 of file DatabaseSession.cc.
const std::string & ora::DatabaseSession::connectionString | ( | ) |
Definition at line 124 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::containerHandle | ( | const std::string & | name | ) |
Definition at line 264 of file DatabaseSession.cc.
Referenced by ora::getContainerFromSession(), and ora::DatabaseUtilitySession::importContainerSchema().
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::containerHandle | ( | int | contId | ) |
Definition at line 268 of file DatabaseSession.cc.
ora::NamedSequence & ora::DatabaseSession::containerIdSequence | ( | ) |
Definition at line 355 of file DatabaseSession.cc.
const std::map< int, ora::Handle< ora::DatabaseContainer > > & ora::DatabaseSession::containers | ( | ) |
Definition at line 272 of file DatabaseSession.cc.
ora::ContainerUpdateTable & ora::DatabaseSession::containerUpdateTable | ( | ) |
Definition at line 375 of file DatabaseSession.cc.
void ora::DatabaseSession::create | ( | const std::string & | userSchemaVersion = std::string("") | ) |
Definition at line 181 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseContainer > ora::DatabaseSession::createContainer | ( | const std::string & | containerName, |
const Reflex::Type & | type | ||
) |
Definition at line 248 of file DatabaseSession.cc.
References ora::DatabaseContainer::create().
Referenced by ora::getContainerFromSession().
void ora::DatabaseSession::disconnect | ( | void | ) |
Definition at line 110 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 188 of file DatabaseSession.cc.
References ora::throwException().
void ora::DatabaseSession::dropContainer | ( | const std::string & | name | ) |
Definition at line 258 of file DatabaseSession.cc.
References cont, ora::DatabaseContainer::drop(), ora::DatabaseContainer::id(), and mergeVDriftHistosByStation::name.
bool ora::DatabaseSession::eraseAllNames | ( | ) |
Definition at line 286 of file DatabaseSession.cc.
bool ora::DatabaseSession::eraseObjectName | ( | const std::string & | name | ) |
Definition at line 282 of file DatabaseSession.cc.
bool ora::DatabaseSession::exists | ( | ) |
Definition at line 174 of file DatabaseSession.cc.
ora::Object ora::DatabaseSession::fetchObjectByName | ( | const std::string & | name | ) |
Definition at line 290 of file DatabaseSession.cc.
References cont, ora::DatabaseContainer::fetchItem(), run_regression::ret, and ora::DatabaseContainer::type().
boost::shared_ptr< void > ora::DatabaseSession::fetchTypedObjectByName | ( | const std::string & | name, |
const Reflex::Type & | asType | ||
) |
Definition at line 309 of file DatabaseSession.cc.
References 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 300 of file DatabaseSession.cc.
bool ora::DatabaseSession::getNamesForContainer | ( | int | containerId, |
std::vector< std::string > & | destination | ||
) |
Definition at line 327 of file DatabaseSession.cc.
bool ora::DatabaseSession::getNamesForObject | ( | int | containerId, |
int | itemId, | ||
std::vector< std::string > & | destination | ||
) |
Definition at line 332 of file DatabaseSession.cc.
bool ora::DatabaseSession::isConnected | ( | ) |
Definition at line 120 of file DatabaseSession.cc.
bool ora::DatabaseSession::isTransactionActive | ( | bool | checkIfReadOnly = false | ) |
bool ora::DatabaseSession::listObjectNames | ( | std::vector< std::string > & | destination | ) |
Definition at line 338 of file DatabaseSession.cc.
ora::MappingDatabase & ora::DatabaseSession::mappingDatabase | ( | ) |
Definition at line 359 of file DatabaseSession.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
void ora::DatabaseSession::open | ( | ) |
Definition at line 209 of file DatabaseSession.cc.
Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig(), and ora::DatabaseUtilitySession::importContainerSchema().
void ora::DatabaseSession::rollbackTransaction | ( | ) |
Definition at line 152 of file DatabaseSession.cc.
ora::IDatabaseSchema & ora::DatabaseSession::schema | ( | ) |
Definition at line 351 of file DatabaseSession.cc.
std::string ora::DatabaseSession::schemaVersion | ( | bool | userSchema | ) |
Definition at line 225 of file DatabaseSession.cc.
References AlCaHLTBitMon_QueryRunRegistry::string, ora::IMainTable::userSchemaVersionParameterName(), BeamSplash_cfg::version, and ora::IMainTable::versionParameterName().
void ora::DatabaseSession::setAccessPermission | ( | const std::string & | principal, |
bool | forWrite | ||
) |
Definition at line 197 of file DatabaseSession.cc.
void ora::DatabaseSession::setObjectName | ( | const std::string & | name, |
int | containerId, | ||
int | itemId | ||
) |
Definition at line 276 of file DatabaseSession.cc.
void ora::DatabaseSession::startTransaction | ( | bool | readOnly | ) |
Definition at line 128 of file DatabaseSession.cc.
References ora::IDatabaseSchema::createSchemaHandle(), and ora::MappingRules::sequenceNameForContainerId().
ora::SharedSession & ora::DatabaseSession::storageAccessSession | ( | ) |
Definition at line 367 of file DatabaseSession.cc.
bool ora::DatabaseSession::testDropPermission | ( | ) |
Definition at line 202 of file DatabaseSession.cc.
ora::Handle< ora::DatabaseUtilitySession > ora::DatabaseSession::utility | ( | ) |
Definition at line 343 of file DatabaseSession.cc.
|
private |
Definition at line 141 of file DatabaseSession.h.
|
private |
Definition at line 133 of file DatabaseSession.h.
Referenced by DatabaseSession().
|
private |
Definition at line 135 of file DatabaseSession.h.
|
private |
Definition at line 140 of file DatabaseSession.h.
|
private |
Definition at line 137 of file DatabaseSession.h.
|
private |
Definition at line 134 of file DatabaseSession.h.
|
private |
Definition at line 138 of file DatabaseSession.h.
|
private |
Definition at line 142 of file DatabaseSession.h.
|
private |
Definition at line 136 of file DatabaseSession.h.
|
private |
Definition at line 139 of file DatabaseSession.h.