#include <DbSession.h>
Public Member Functions | |
const std::string & | blobStreamingService () const |
std::string | classNameForItem (const std::string &objectId) |
void | close () |
const DbConnection & | connection () const |
const std::string & | connectionString () const |
bool | createDatabase () |
DbSession () | |
DbSession (const DbConnection &connection) | |
DbSession (const DbSession &rhs) | |
bool | deleteMapping (const std::string &mappingVersion) |
bool | deleteObject (const std::string &objectId) |
void | flush () |
ora::Object | getObject (const std::string &objectId) |
template<typename T > | |
boost::shared_ptr< T > | getTypedObject (const std::string &objectId) |
bool | importMapping (const std::string &sourceConnectionString, const std::string &contName) |
std::string | importObject (cond::DbSession &fromDatabase, const std::string &objectId) |
bool | isOldSchema () |
bool | isOpen () const |
bool | isTransactional () const |
coral::ISchema & | nominalSchema () |
void | open (const std::string &connectionString, bool readOnly=false) |
void | open (const std::string &connectionString, const std::string &role, bool readOnly=false) |
void | open (boost::shared_ptr< coral::ISessionProxy > &coralSession, const std::string &connectionString, const std::string &schemaName="") |
void | openReadOnly (const std::string &connectionString, const std::string &id) |
DbSession & | operator= (const DbSession &rhs) |
coral::ISchema & | schema (const std::string &schemaName) |
ora::Database & | storage () |
template<typename T > | |
std::string | storeObject (const T *object, const std::string &containerName) |
std::string | storeObject (const ora::Object &objectRef, const std::string &containerName) |
DbTransaction & | transaction () |
template<typename T > | |
bool | updateObject (const T *object, const std::string &objectId) |
virtual | ~DbSession () |
Static Public Attributes | |
static const char * | CHANGE_SCHEMA_VERSION = "2.0.0" |
static const char * | COND_SCHEMA_VERSION = "2.0.0" |
Private Attributes | |
boost::shared_ptr< SessionImpl > | m_implementation |
Definition at line 31 of file DbSession.h.
DbSession::DbSession | ( | ) |
Definition at line 139 of file DbSession.cc.
|
explicit |
Definition at line 143 of file DbSession.cc.
DbSession::DbSession | ( | const DbSession & | rhs | ) |
Definition at line 147 of file DbSession.cc.
|
virtual |
Definition at line 151 of file DbSession.cc.
const std::string & DbSession::blobStreamingService | ( | ) | const |
Definition at line 203 of file DbSession.cc.
std::string DbSession::classNameForItem | ( | const std::string & | objectId | ) |
Definition at line 292 of file DbSession.cc.
References generateEDF::cont, ora::OId::containerId(), ora::OId::fromString(), ora::OId::isInvalid(), ora::Container::realClassName(), run_regression::ret, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by cond::ExportIOVUtilities::execute(), cond::AlignSplitIOV::execute(), cond::persistency::OraPayloadTable::getType(), and cond::persistency::OraTagTable::select().
void DbSession::close | ( | void | ) |
Definition at line 179 of file DbSession.cc.
Referenced by cond::CondDB::closeSession(), lumiQTWidget.ApplicationWindow::fileQuit(), FillInfoPopConSourceHandler::getNewObjects(), DTLVStatusHandler::getNewObjects(), DTHVStatusHandler::getNewObjects(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), cond::PayLoadInspector< DataT >::summary(), cond::PayLoadInspector< DataT >::trend_plot(), and l1t::DataManager::~DataManager().
cond::DbConnection const & DbSession::connection | ( | ) | const |
Definition at line 194 of file DbSession.cc.
const std::string & DbSession::connectionString | ( | ) | const |
Definition at line 188 of file DbSession.cc.
bool DbSession::createDatabase | ( | ) |
Definition at line 221 of file DbSession.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by cond::persistency::OraIOVSchema::create(), cond::AlignSplitIOV::processPayloadContainer(), TestFunct::Write(), and TestFunct::WriteWithIOV().
bool DbSession::deleteMapping | ( | const std::string & | mappingVersion | ) |
Definition at line 248 of file DbSession.cc.
References ora::DatabaseUtility::eraseMapping().
bool DbSession::deleteObject | ( | const std::string & | objectId | ) |
Definition at line 274 of file DbSession.cc.
References ora::OId::fromString().
Referenced by TestFunct::DropItem().
void DbSession::flush | ( | ) |
Definition at line 303 of file DbSession.cc.
Referenced by cond::persistency::OraPayloadTable::insertIfNew().
ora::Object DbSession::getObject | ( | const std::string & | objectId | ) |
Definition at line 268 of file DbSession.cc.
References ora::OId::fromString().
Referenced by importObject(), cond::PayLoadInspector< DataT >::load(), and cond::persistency::OraPayloadTable::select().
|
inline |
Definition at line 126 of file DbSession.h.
References ora::Database::fetch(), ora::OId::fromString(), and storage().
Referenced by cond::PayloadRef< std::vector< cond::Time_t > >::load(), cond::KeyList::load(), cond::loadIOV(), cond::PayLoadInspector< DataT >::plot(), cond::AlignSplitIOV::processPayloadContainer(), TestFunct::Read(), TestFunct::ReadWithIOV(), cond::IOVProxyData::refresh(), cond::PayLoadInspector< DataT >::summary(), and cond::PayLoadInspector< DataT >::trend_plot().
bool DbSession::importMapping | ( | const std::string & | sourceConnectionString, |
const std::string & | contName | ||
) |
Definition at line 254 of file DbSession.cc.
References cond::buildTechnologyProxy(), and ora::DatabaseUtility::importContainerSchema().
std::string DbSession::importObject | ( | cond::DbSession & | fromDatabase, |
const std::string & | objectId | ||
) |
Definition at line 282 of file DbSession.cc.
References generateEDF::cont, ora::Database::containerHandle(), ora::OId::containerId(), data, ora::Object::destruct(), ora::OId::fromString(), getObject(), ora::Container::name(), run_regression::ret, storage(), and AlCaHLTBitMon_QueryRunRegistry::string.
bool DbSession::isOldSchema | ( | ) |
Definition at line 230 of file DbSession.cc.
References ora::Version::fromString(), ora::Version::poolSchemaVersion(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by cond::insertIOV(), cond::loadIOV(), cond::IOVProxyData::refresh(), and cond::updateIOV().
bool DbSession::isOpen | ( | ) | const |
Definition at line 184 of file DbSession.cc.
bool DbSession::isTransactional | ( | ) | const |
Definition at line 199 of file DbSession.cc.
coral::ISchema & DbSession::nominalSchema | ( | ) |
Definition at line 243 of file DbSession.cc.
Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), DTHVStatusHandler::checkForPeriod(), DTHVStatusHandler::checkNewData(), l1t::OMDSReader::columnNames(), l1t::OMDSReader::columnNamesView(), TestFunct::CreateMetaTable(), DTHVStatusHandler::createSnapshot(), DTHVStatusHandler::dumpHVAliases(), DTHVStatusHandler::dumpSnapshot(), DTHVStatusHandler::getChannelMap(), DTHVStatusHandler::getChannelSplit(), cond::persistency::getInsertionLogs(), DTHVStatusHandler::getLayerSplit(), TestFunct::GetMetadata(), FillInfoPopConSourceHandler::getNewObjects(), TestFunct::Read(), DTHVStatusHandler::recoverSnapshot(), TestFunct::Write(), and TestFunct::WriteWithIOV().
void DbSession::open | ( | const std::string & | connectionString, |
bool | readOnly = false |
||
) |
Definition at line 159 of file DbSession.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by cond::persistency::checkBackendType(), l1t::DataManager::connect(), cond::RDBMS::getDB(), HcalO2OManager::getListOfPoolIovs(), HcalO2OManager::getListOfPoolTags(), FillInfoPopConSourceHandler::getNewObjects(), DTLVStatusHandler::getNewObjects(), DTHVStatusHandler::getNewObjects(), cond::RDBMS::getReadOnlyDB(), cond::RDBMS::globalTag(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig(), SiStripCoralIface::initialize(), cond::Utilities::newDbSession(), cond::PayLoadInspector< DataT >::plot(), cond::persistency::SessionImpl::startTransaction(), cond::PayLoadInspector< DataT >::summary(), and cond::PayLoadInspector< DataT >::trend_plot().
void DbSession::open | ( | const std::string & | connectionString, |
const std::string & | role, | ||
bool | readOnly = false |
||
) |
Definition at line 165 of file DbSession.cc.
Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig().
void DbSession::open | ( | boost::shared_ptr< coral::ISessionProxy > & | coralSession, |
const std::string & | connectionString, | ||
const std::string & | schemaName = "" |
||
) |
Definition at line 175 of file DbSession.cc.
Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig().
void DbSession::openReadOnly | ( | const std::string & | connectionString, |
const std::string & | id | ||
) |
Definition at line 170 of file DbSession.cc.
cond::DbSession & DbSession::operator= | ( | const DbSession & | rhs | ) |
Definition at line 154 of file DbSession.cc.
References m_implementation.
coral::ISchema & DbSession::schema | ( | const std::string & | schemaName | ) |
Definition at line 238 of file DbSession.cc.
Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), l1t::OMDSReader::columnNames(), l1t::OMDSReader::columnNamesView(), SiStripCoralIface::doNameQuery(), SiStripCoralIface::doQuery(), SiStripCoralIface::doSettingsQuery(), FillInfoPopConSourceHandler::getNewObjects(), and L1CaloHcalScaleConfigOnlineProd::newObject().
ora::Database & DbSession::storage | ( | ) |
Definition at line 215 of file DbSession.cc.
Referenced by cond::ExportIOVUtilities::execute(), cond::persistency::OraIOVSchema::exists(), getTypedObject(), importObject(), cond::insertIOV(), cond::loadIOV(), cond::persistency::OraIOVSchema::parsePoolToken(), cond::IOVProxyData::refresh(), storeObject(), cond::updateIOV(), and updateObject().
|
inline |
Definition at line 132 of file DbSession.h.
References ora::Database::flush(), ora::Database::insert(), run_regression::ret, storage(), AlCaHLTBitMon_QueryRunRegistry::string, and ora::OId::toString().
Referenced by cond::persistency::OraPayloadTable::insertIfNew(), cond::insertIOV(), cond::AlignSplitIOV::processPayloadContainer(), TestFunct::Write(), and TestFunct::WriteWithIOV().
std::string DbSession::storeObject | ( | const ora::Object & | objectRef, |
const std::string & | containerName | ||
) |
Definition at line 262 of file DbSession.cc.
References ora::OId::toString().
cond::DbTransaction & DbSession::transaction | ( | ) |
Definition at line 208 of file DbSession.cc.
Referenced by cond::BasePayloadProxy::BasePayloadProxy(), cond::persistency::checkBackendType(), cond::persistency::OraTransaction::commit(), cond::CondDB::commitTransaction(), l1t::OMDSReader::connect(), cond::ExportIOVUtilities::execute(), cond::AlignSplitIOV::execute(), cond::persistency::getInsertionLogs(), FillInfoPopConSourceHandler::getNewObjects(), DTLVStatusHandler::getNewObjects(), DTHVStatusHandler::getNewObjects(), cond::RDBMS::globalTag(), cond::persistency::OraTransaction::isActive(), cond::KeyList::load(), cond::BasePayloadProxy::loadIov(), cond::BasePayloadProxy::loadTag(), cond::BasePayloadProxy::make(), l1t::OMDSReader::OMDSReader(), cond::PayLoadInspector< DataT >::plot(), cond::BasePayloadProxy::refresh(), cond::persistency::OraTransaction::rollback(), cond::CondDB::startReadOnlyTransaction(), cond::persistency::SessionImpl::startTransaction(), cond::CondDB::startTransaction(), cond::PayLoadInspector< DataT >::summary(), and cond::PayLoadInspector< DataT >::trend_plot().
|
inline |
Definition at line 143 of file DbSession.h.
References ora::Database::flush(), ora::OId::fromString(), run_regression::ret, storage(), and ora::Database::update().
Referenced by cond::updateIOV().
|
static |
Definition at line 34 of file DbSession.h.
|
static |
Definition at line 33 of file DbSession.h.
Referenced by cond::IOVSchemaUtility::createIOVContainer().
|
private |
Definition at line 101 of file DbSession.h.
Referenced by operator=().