#include <MappingDatabase.h>
Public Member Functions | |
void | clear () |
bool | getBaseMappingForContainer (const std::string &className, int containerId, MappingTree &destination) |
bool | getClassVersionListForContainer (int containerId, std::map< std::string, std::string > &versionMap) |
bool | getClassVersionListForMappingVersion (const std::string &mappingVersion, std::set< std::string > &destination) |
bool | getDependentClassesForContainer (int containerId, std::set< std::string > &list) |
bool | getDependentMappingsForContainer (int containerId, std::vector< MappingElement > &destination) |
bool | getMappingByVersion (const std::string &version, MappingTree &destination) |
bool | getMappingForContainer (const std::string &className, const std::string &classVersion, int containerId, MappingTree &destination) |
bool | getMappingVersionsForContainer (int containerId, std::set< std::string > &versionList) |
void | insertClassVersion (const edm::TypeWithDict &dictionaryEntry, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false) |
void | insertClassVersion (const std::string &className, const std::string &classVersion, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false) |
MappingDatabase (IDatabaseSchema &schema) | |
Constructor. More... | |
std::string | newMappingVersionForContainer (const std::string &className) |
std::string | newMappingVersionForDependentClass (const std::string &containerName, const std::string &className) |
void | removeMapping (const std::string &version) |
void | setMappingVersionForClass (const edm::TypeWithDict &dictionaryEntry, int containerId, const std::string &mappingVersion, bool dependency=false) |
void | setUp () |
void | storeMapping (const MappingTree &mappingStructure) |
const std::set< std::string > & | versions () |
~MappingDatabase () | |
Destructor. More... | |
Static Public Member Functions | |
static std::string | versionOfClass (const edm::TypeWithDict &dictionary) |
Private Member Functions | |
void | buildElement (MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements) |
void | unfoldElement (const MappingElement &element, MappingRawData &destination) |
Private Attributes | |
bool | m_isLoaded |
NamedSequence | m_mappingSequence |
IDatabaseSchema & | m_schema |
The schema in use. More... | |
std::set< std::string > | m_versions |
Utility class to manage the object-relational mappings for the C++ classes.
Definition at line 27 of file MappingDatabase.h.
|
explicit |
Constructor.
Definition at line 56 of file MappingDatabase.cc.
ora::MappingDatabase::~MappingDatabase | ( | ) |
|
private |
Definition at line 20 of file MappingDatabase.cc.
References ora::MappingElement::appendSubElement(), ora::MappingElement::setColumnNames(), and AlCaHLTBitMon_QueryRunRegistry::string.
void ora::MappingDatabase::clear | ( | void | ) |
Definition at line 319 of file MappingDatabase.cc.
Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), BeautifulSoup.Tag::setString(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().
bool ora::MappingDatabase::getBaseMappingForContainer | ( | const std::string & | className, |
int | containerId, | ||
MappingTree & | destination | ||
) |
Definition at line 201 of file MappingDatabase.cc.
References ora::MappingRules::baseIdForClass(), className(), ora::MappingTree::className(), newFWLiteAna::found, run_regression::ret, AlCaHLTBitMon_QueryRunRegistry::string, and ora::throwException().
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
bool ora::MappingDatabase::getClassVersionListForContainer | ( | int | containerId, |
std::map< std::string, std::string > & | versionMap | ||
) |
Definition at line 261 of file MappingDatabase.cc.
bool ora::MappingDatabase::getClassVersionListForMappingVersion | ( | const std::string & | mappingVersion, |
std::set< std::string > & | destination | ||
) |
Definition at line 243 of file MappingDatabase.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
bool ora::MappingDatabase::getDependentClassesForContainer | ( | int | containerId, |
std::set< std::string > & | list | ||
) |
Definition at line 314 of file MappingDatabase.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
bool ora::MappingDatabase::getDependentMappingsForContainer | ( | int | containerId, |
std::vector< MappingElement > & | destination | ||
) |
Definition at line 223 of file MappingDatabase.cc.
References run_regression::ret, ora::throwException(), and ora::MappingTree::topElement().
bool ora::MappingDatabase::getMappingByVersion | ( | const std::string & | version, |
MappingTree & | destination | ||
) |
Definition at line 125 of file MappingDatabase.cc.
References ora::MappingElement::classMappingElementType(), ora::MappingRawElement::columns, ora::MappingElement::dependencyMappingElementType(), ora::MappingRawData::elements, ora::MappingRawElement::elementType, ora::MappingRawElement::emptyScope(), run_regression::ret, ora::MappingElement::setColumnNames(), ora::MappingTree::setTopElement(), ora::MappingTree::setVersion(), ora::MappingRawElement::tableName, ora::throwException(), and ora::MappingRawElement::variableName.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
bool ora::MappingDatabase::getMappingForContainer | ( | const std::string & | className, |
const std::string & | classVersion, | ||
int | containerId, | ||
MappingTree & | destination | ||
) |
Definition at line 176 of file MappingDatabase.cc.
References ora::MappingRules::classId(), className(), ora::MappingTree::className(), newFWLiteAna::found, run_regression::ret, AlCaHLTBitMon_QueryRunRegistry::string, ora::throwException(), and relval_steps::version.
bool ora::MappingDatabase::getMappingVersionsForContainer | ( | int | containerId, |
std::set< std::string > & | versionList | ||
) |
Definition at line 302 of file MappingDatabase.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
void ora::MappingDatabase::insertClassVersion | ( | const edm::TypeWithDict & | dictionaryEntry, |
int | dependencyIndex, | ||
int | containerId, | ||
const std::string & | mappingVersion, | ||
bool | asBase = false |
||
) |
Definition at line 267 of file MappingDatabase.cc.
References className(), edm::TypeWithDict::cppName(), and AlCaHLTBitMon_QueryRunRegistry::string.
void ora::MappingDatabase::insertClassVersion | ( | const std::string & | className, |
const std::string & | classVersion, | ||
int | dependencyIndex, | ||
int | containerId, | ||
const std::string & | mappingVersion, | ||
bool | asBase = false |
||
) |
Definition at line 248 of file MappingDatabase.cc.
References ora::MappingRules::baseClassVersion(), ora::MappingRules::baseIdForClass(), ora::MappingRules::classId(), and AlCaHLTBitMon_QueryRunRegistry::string.
std::string ora::MappingDatabase::newMappingVersionForContainer | ( | const std::string & | className | ) |
Definition at line 72 of file MappingDatabase.cc.
References newFWLiteAna::found, align_cfg::iteration, ora::MappingRules::newMappingVersionForContainer(), and AlCaHLTBitMon_QueryRunRegistry::string.
std::string ora::MappingDatabase::newMappingVersionForDependentClass | ( | const std::string & | containerName, |
const std::string & | className | ||
) |
Definition at line 99 of file MappingDatabase.cc.
References newFWLiteAna::found, align_cfg::iteration, ora::MappingRules::newMappingVersionForDependentClass(), and AlCaHLTBitMon_QueryRunRegistry::string.
void ora::MappingDatabase::removeMapping | ( | const std::string & | version | ) |
Definition at line 171 of file MappingDatabase.cc.
void ora::MappingDatabase::setMappingVersionForClass | ( | const edm::TypeWithDict & | dictionaryEntry, |
int | containerId, | ||
const std::string & | mappingVersion, | ||
bool | dependency = false |
||
) |
Definition at line 277 of file MappingDatabase.cc.
References ora::MappingRules::classId(), className(), edm::TypeWithDict::cppName(), newFWLiteAna::found, and AlCaHLTBitMon_QueryRunRegistry::string.
void ora::MappingDatabase::setUp | ( | ) |
Definition at line 67 of file MappingDatabase.cc.
void ora::MappingDatabase::storeMapping | ( | const MappingTree & | mappingStructure | ) |
Definition at line 295 of file MappingDatabase.cc.
References ora::MappingTree::topElement(), and ora::MappingTree::version().
|
private |
Definition at line 40 of file MappingDatabase.cc.
References ora::MappingRawData::addElement(), ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingRawElement::columns, HTMLExport::elem(), ora::MappingRawElement::elementType, ora::MappingElement::elementType(), ora::MappingElement::elementTypeAsString(), ora::MappingRawElement::emptyScope(), ora::MappingElement::end(), ora::MappingRawElement::scopeName, ora::MappingElement::scopeName(), ora::MappingRawElement::tableName, ora::MappingElement::tableName(), ora::MappingRawElement::variableName, ora::MappingElement::variableName(), ora::MappingRawElement::variableType, and ora::MappingElement::variableType().
|
static |
Definition at line 13 of file MappingDatabase.cc.
References className(), ora::MappingRules::classVersionPropertyNameInDictionary(), edm::TypeWithDict::cppName(), ora::MappingRules::defaultClassVersion(), ora::ClassUtils::getClassProperty(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::ContainerSchema::loadMappingForDependentClass(), and ora::ContainerSchema::mapping().
const std::set< std::string > & ora::MappingDatabase::versions | ( | ) |
Definition at line 306 of file MappingDatabase.cc.
|
private |
Definition at line 86 of file MappingDatabase.h.
|
private |
Definition at line 84 of file MappingDatabase.h.
|
private |
The schema in use.
Definition at line 83 of file MappingDatabase.h.
|
private |
Definition at line 85 of file MappingDatabase.h.