#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 Reflex::Type &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 Reflex::Type &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 Reflex::Type &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 58 of file MappingDatabase.cc.
ora::MappingDatabase::~MappingDatabase | ( | ) |
|
private |
Definition at line 22 of file MappingDatabase.cc.
References ora::MappingElement::appendSubElement(), ora::MappingElement::setColumnNames(), and AlCaHLTBitMon_QueryRunRegistry::string.
void ora::MappingDatabase::clear | ( | void | ) |
Definition at line 321 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 203 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 263 of file MappingDatabase.cc.
bool ora::MappingDatabase::getClassVersionListForMappingVersion | ( | const std::string & | mappingVersion, |
std::set< std::string > & | destination | ||
) |
Definition at line 245 of file MappingDatabase.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
bool ora::MappingDatabase::getDependentClassesForContainer | ( | int | containerId, |
std::set< std::string > & | list | ||
) |
Definition at line 316 of file MappingDatabase.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
bool ora::MappingDatabase::getDependentMappingsForContainer | ( | int | containerId, |
std::vector< MappingElement > & | destination | ||
) |
Definition at line 225 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 127 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 178 of file MappingDatabase.cc.
References ora::MappingRules::classId(), className(), ora::MappingTree::className(), newFWLiteAna::found, run_regression::ret, AlCaHLTBitMon_QueryRunRegistry::string, ora::throwException(), and BeamSplash_cfg::version.
bool ora::MappingDatabase::getMappingVersionsForContainer | ( | int | containerId, |
std::set< std::string > & | versionList | ||
) |
Definition at line 304 of file MappingDatabase.cc.
Referenced by ora::DatabaseUtilitySession::importContainerSchema().
void ora::MappingDatabase::insertClassVersion | ( | const Reflex::Type & | dictionaryEntry, |
int | dependencyIndex, | ||
int | containerId, | ||
const std::string & | mappingVersion, | ||
bool | asBase = false |
||
) |
Definition at line 269 of file MappingDatabase.cc.
References className(), 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 250 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 74 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 101 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 173 of file MappingDatabase.cc.
void ora::MappingDatabase::setMappingVersionForClass | ( | const Reflex::Type & | dictionaryEntry, |
int | containerId, | ||
const std::string & | mappingVersion, | ||
bool | dependency = false |
||
) |
Definition at line 279 of file MappingDatabase.cc.
References ora::MappingRules::classId(), className(), newFWLiteAna::found, and AlCaHLTBitMon_QueryRunRegistry::string.
void ora::MappingDatabase::setUp | ( | ) |
Definition at line 69 of file MappingDatabase.cc.
void ora::MappingDatabase::storeMapping | ( | const MappingTree & | mappingStructure | ) |
Definition at line 297 of file MappingDatabase.cc.
References ora::MappingTree::topElement(), and ora::MappingTree::version().
|
private |
Definition at line 42 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 12 of file MappingDatabase.cc.
References className(), ora::MappingRules::classVersionPropertyNameInDictionary(), ora::MappingRules::defaultClassVersion(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::ContainerSchema::loadMappingForDependentClass(), and ora::ContainerSchema::mapping().
const std::set< std::string > & ora::MappingDatabase::versions | ( | ) |
Definition at line 308 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.