CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ora::MappingDatabase Class Reference

#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
 
IDatabaseSchemam_schema
 The schema in use. More...
 
std::set< std::string > m_versions
 

Detailed Description

Utility class to manage the object-relational mappings for the C++ classes.

Definition at line 27 of file MappingDatabase.h.

Constructor & Destructor Documentation

ora::MappingDatabase::MappingDatabase ( ora::IDatabaseSchema schema)
explicit

Constructor.

Definition at line 58 of file MappingDatabase.cc.

58  :
59  m_schema( schema ),
61  m_versions(),
62  m_isLoaded( false ){
63 }
NamedSequence m_mappingSequence
static std::string sequenceNameForMapping()
Definition: MappingRules.cc:29
std::set< std::string > m_versions
IDatabaseSchema & m_schema
The schema in use.
ora::MappingDatabase::~MappingDatabase ( )

Destructor.

Definition at line 66 of file MappingDatabase.cc.

66  {
67 }

Member Function Documentation

void ora::MappingDatabase::buildElement ( MappingElement parentElement,
const std::string &  scopeName,
std::map< std::string, std::vector< MappingRawElement > > &  innerElements 
)
private

Definition at line 22 of file MappingDatabase.cc.

References ora::MappingElement::appendSubElement(), and ora::MappingElement::setColumnNames().

24  {
25  std::map<std::string,std::vector<MappingRawElement> >::iterator iScope = innerElements.find(scopeName);
26  if(iScope != innerElements.end()){
27  for( std::vector<MappingRawElement>::const_iterator iM = iScope->second.begin();
28  iM != iScope->second.end(); ++iM ){
29  MappingElement& element = parentElement.appendSubElement( iM->elementType,
30  iM->variableName,
31  iM->variableType,
32  iM->tableName );
33  element.setColumnNames(iM->columns);
34  std::string nextScope(scopeName);
35  nextScope.append("::").append(iM->variableName);
36  buildElement( element, nextScope, innerElements );
37  }
38  }
39  innerElements.erase(scopeName);
40 }
void buildElement(MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements)
void ora::MappingDatabase::clear ( void  )
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, and ora::throwException().

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

205  {
206  bool ret = false;
207  std::string classId = MappingRules::baseIdForClass( className );
208  std::string mappingVersion("");
209  bool found = m_schema.mappingSchema().selectMappingVersion( classId, containerId, mappingVersion );
210 
211  if( found ){
212  ret = getMappingByVersion( mappingVersion, destination );
213  if( !ret ){
214  throwException("Mapping version \""+mappingVersion+"\" not found.",
215  "MappingDatabase::getBaseMappingForContainer");
216  }
217  if( destination.className() != className ){
218  throwException("Mapping inconsistency detected for version=\""+mappingVersion+"\"",
219  "MappingDatabase::getBaseMappingForContainer");
220  }
221  }
222  return ret;
223 }
static std::string baseIdForClass(const std::string &className)
Definition: MappingRules.cc:78
virtual bool selectMappingVersion(const std::string &classId, int containerId, std::string &destination)=0
virtual IMappingSchema & mappingSchema()=0
bool getMappingByVersion(const std::string &version, MappingTree &destination)
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
bool ora::MappingDatabase::getClassVersionListForContainer ( int  containerId,
std::map< std::string, std::string > &  versionMap 
)

Definition at line 263 of file MappingDatabase.cc.

264  {
265 
266  return m_schema.mappingSchema().getClassVersionListForContainer( containerId, versionMap );
267 }
virtual bool getClassVersionListForContainer(int containerId, std::map< std::string, std::string > &versionMap)=0
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
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().

246  {
247  return m_schema.mappingSchema().getClassVersionListForMappingVersion( mappingVersion, destination );
248 }
virtual IMappingSchema & mappingSchema()=0
virtual bool getClassVersionListForMappingVersion(const std::string &mappingVersion, std::set< std::string > &destination)=0
IDatabaseSchema & m_schema
The schema in use.
bool ora::MappingDatabase::getDependentClassesForContainer ( int  containerId,
std::set< std::string > &  list 
)

Definition at line 316 of file MappingDatabase.cc.

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

317  {
319 }
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
virtual bool getDependentClassesInContainerMapping(int containerId, std::set< std::string > &destination)=0
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
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().

226  {
227  bool ret = false;
228  std::set<std::string> versions;
229  if( m_schema.mappingSchema().getMappingVersionListForContainer( containerId, versions, true ) ){
230  ret = true;
231  for( std::set<std::string>::iterator iM = versions.begin();
232  iM != versions.end(); ++iM ){
233  MappingTree mapping;
234  if( ! getMappingByVersion( *iM, mapping )){
235  throwException("Mapping version \""+*iM+"\" not found.",
236  "MappingDatabase::getDependentMappingsForContainer");
237 
238  }
239  destination.push_back( mapping.topElement() );
240  }
241  }
242  return ret;
243 }
virtual IMappingSchema & mappingSchema()=0
bool getMappingByVersion(const std::string &version, MappingTree &destination)
const std::set< std::string > & versions()
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
IDatabaseSchema & m_schema
The schema in use.
virtual bool getMappingVersionListForContainer(int containerId, std::set< std::string > &destination, bool onlyDependency=false)=0
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().

127  {
128  bool ret = false;
129  MappingRawData mapData;
130  if(m_schema.mappingSchema().getMapping( version, mapData )){
131  ret = true;
132  MappingRawElement topLevelElement;
133  bool topLevelFound = false;
134  bool dependency = false;
135  std::map<std::string, std::vector<MappingRawElement> > innerElements;
136  for( std::map< int, MappingRawElement>::iterator iElem = mapData.elements.begin();
137  iElem != mapData.elements.end(); iElem++ ){
138  // first loading the top level elements
139  if( iElem->second.scopeName == MappingRawElement::emptyScope() ){
140  if( iElem->second.elementType == MappingElement::classMappingElementType() ||
141  iElem->second.elementType == MappingElement::dependencyMappingElementType() ){
142  if( topLevelFound ){
143  throwException("Mapping inconsistent.More then one top level element found.",
144  "MappingDatabase::getMappingByVersion");
145  }
146  topLevelElement = iElem->second;
147  if( topLevelElement.elementType == MappingElement::dependencyMappingElementType() ) dependency = true;
148  topLevelFound = true;
149  }
150  } else {
151  std::map<std::string, std::vector<MappingRawElement> >::iterator iN = innerElements.find( iElem->second.scopeName );
152  if(iN==innerElements.end()){
153  innerElements.insert( std::make_pair( iElem->second.scopeName, std::vector<MappingRawElement>(1,iElem->second) ) );
154  } else {
155  iN->second.push_back( iElem->second );
156  }
157  }
158  }
159  if( !topLevelFound ){
160  throwException( "Could not find top element for mapping version \""+version+"\".",
161  "MappingDatabase::getMappingByVersion" );
162  }
163  MappingElement& topElement = destination.setTopElement( topLevelElement.variableName,
164  topLevelElement.tableName,
165  dependency );
166  topElement.setColumnNames( topLevelElement.columns);
167  buildElement( topElement, topLevelElement.variableName, innerElements );
168  destination.setVersion( version );
169  }
170  return ret;
171 }
static std::string dependencyMappingElementType()
Returns the name of the dependent class mapping element type.
virtual bool getMapping(const std::string &version, MappingRawData &destination)=0
void buildElement(MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements)
static std::string emptyScope()
virtual IMappingSchema & mappingSchema()=0
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
IDatabaseSchema & m_schema
The schema in use.
static std::string classMappingElementType()
Returns the name of the class mapping element type.
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, ora::throwException(), and BeamSplash_cfg::version.

181  {
182  bool ret = false;
183  // The classId parameter
184  std::string classId = MappingRules::classId( className, classVersion );
185 
186  std::string version("");
187  bool found = m_schema.mappingSchema().selectMappingVersion( classId, containerId, version );
188 
189  if( found ){
190  ret = getMappingByVersion( version, destination );
191  if( !ret ){
192  throwException("Mapping version \""+version+"\" not found.",
193  "MappingDatabase::getMappingForContainer");
194  }
195  if( destination.className() != className ){
196  throwException("Mapping inconsistency detected for version=\""+version+"\"",
197  "MappingDatabase::getMappingForContainer");
198  }
199  }
200  return ret;
201 }
virtual bool selectMappingVersion(const std::string &classId, int containerId, std::string &destination)=0
virtual IMappingSchema & mappingSchema()=0
bool getMappingByVersion(const std::string &version, MappingTree &destination)
static std::string classId(const std::string &className, const std::string &classVersion)
Definition: MappingRules.cc:63
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
bool ora::MappingDatabase::getMappingVersionsForContainer ( int  containerId,
std::set< std::string > &  versionList 
)

Definition at line 304 of file MappingDatabase.cc.

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

304  {
305  return m_schema.mappingSchema().getMappingVersionListForContainer( containerId, versionList );
306 }
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
virtual bool getMappingVersionListForContainer(int containerId, std::set< std::string > &destination, bool onlyDependency=false)=0
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().

273  {
274  std::string className = dictionaryEntry.Name( Reflex::SCOPED );
275  std::string classVersion = versionOfClass( dictionaryEntry );
276  insertClassVersion( className, classVersion, depIndex, containerId, mappingVersion, asBase );
277 }
void insertClassVersion(const Reflex::Type &dictionaryEntry, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false)
static std::string versionOfClass(const Reflex::Type &dictionary)
std::string className(const T &t)
Definition: ClassName.h:30
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(), and ora::MappingRules::classId().

255  {
256  std::string classId = MappingRules::classId( className, classVersion );
257  m_schema.mappingSchema().insertClassVersion( className, classVersion, classId, dependencyIndex, containerId, mappingVersion );
258  if( asBase ){
260  }
261 }
static std::string baseIdForClass(const std::string &className)
Definition: MappingRules.cc:78
virtual IMappingSchema & mappingSchema()=0
virtual void insertClassVersion(const std::string &className, const std::string &classVersion, const std::string &classId, int dependencyIndex, int containerId, const std::string &mappingVersion)=0
static std::string baseClassVersion()
Definition: MappingRules.cc:83
static std::string classId(const std::string &className, const std::string &classVersion)
Definition: MappingRules.cc:63
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
std::string ora::MappingDatabase::newMappingVersionForContainer ( const std::string &  className)

Definition at line 74 of file MappingDatabase.cc.

References newFWLiteAna::found, align_cfg::iteration, and ora::MappingRules::newMappingVersionForContainer().

74  {
75  if(!m_isLoaded){
77  m_isLoaded = true;
78  }
79 
80  std::string newMappingVersion = "";
81  for ( int iteration = 0;; ++iteration ) {
82  newMappingVersion = MappingRules::newMappingVersionForContainer( containerName, iteration );
83  bool found = false;
84  for ( std::set<std::string>::reverse_iterator iVersion = m_versions.rbegin();
85  iVersion != m_versions.rend(); ++iVersion ) {
86  if ( *iVersion == newMappingVersion ) {
87  found = true;
88  break;
89  }
90  }
91  if ( ! found ){
92  m_versions.insert( newMappingVersion );
93  break;
94  }
95 
96  }
97  return newMappingVersion;
98 }
static std::string newMappingVersionForContainer(const std::string &containerName, int iteration)
mapping versions
virtual bool getVersionList(std::set< std::string > &destination)=0
tuple iteration
Definition: align_cfg.py:5
virtual IMappingSchema & mappingSchema()=0
std::set< std::string > m_versions
IDatabaseSchema & m_schema
The schema in use.
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, and ora::MappingRules::newMappingVersionForDependentClass().

101  {
102  if(!m_isLoaded){
104  m_isLoaded = true;
105  }
106 
107  std::string newMappingVersion = "";
108  for ( int iteration = 0;; ++iteration ) {
109  newMappingVersion = MappingRules::newMappingVersionForDependentClass( containerName, className, iteration );
110  bool found = false;
111  for ( std::set<std::string>::reverse_iterator iVersion = m_versions.rbegin();
112  iVersion != m_versions.rend(); ++iVersion ) {
113  if ( *iVersion == newMappingVersion ) {
114  found = true;
115  break;
116  }
117  }
118  if ( ! found ){
119  m_versions.insert( newMappingVersion );
120  break;
121  }
122 
123  }
124  return newMappingVersion;
125 }
virtual bool getVersionList(std::set< std::string > &destination)=0
tuple iteration
Definition: align_cfg.py:5
virtual IMappingSchema & mappingSchema()=0
std::set< std::string > m_versions
static std::string newMappingVersionForDependentClass(const std::string &containerName, const std::string &className, int iteration)
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
void ora::MappingDatabase::removeMapping ( const std::string &  version)

Definition at line 173 of file MappingDatabase.cc.

173  {
175 }
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
virtual void removeMapping(const std::string &version)=0
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(), and newFWLiteAna::found.

282  {
283  std::string className = dictionaryEntry.Name( Reflex::SCOPED );
284  std::string classVersion = versionOfClass( dictionaryEntry );
285  std::string classId = MappingRules::classId( className, classVersion );
286  std::string mv("");
287  bool found = m_schema.mappingSchema().selectMappingVersion( classId, containerId, mv );
288  if( !found ){
289  int depIndex = 0;
290  if( dependency ) depIndex = 1;
291  m_schema.mappingSchema().insertClassVersion( className, classVersion, classId, depIndex, containerId, mappingVersion );
292  } else {
293  m_schema.mappingSchema().setMappingVersion( classId, containerId, mappingVersion );
294  }
295 }
virtual bool selectMappingVersion(const std::string &classId, int containerId, std::string &destination)=0
virtual void setMappingVersion(const std::string &classId, int containerId, const std::string &mappingVersion)=0
static std::string versionOfClass(const Reflex::Type &dictionary)
virtual IMappingSchema & mappingSchema()=0
virtual void insertClassVersion(const std::string &className, const std::string &classVersion, const std::string &classId, int dependencyIndex, int containerId, const std::string &mappingVersion)=0
static std::string classId(const std::string &className, const std::string &classVersion)
Definition: MappingRules.cc:63
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
void ora::MappingDatabase::setUp ( )

Definition at line 69 of file MappingDatabase.cc.

69  {
71 }
NamedSequence m_mappingSequence
void ora::MappingDatabase::storeMapping ( const MappingTree mappingStructure)

Definition at line 297 of file MappingDatabase.cc.

References ora::MappingTree::topElement(), and ora::MappingTree::version().

297  {
298  MappingRawData rowMapping( mapping.version() );
299  unfoldElement( mapping.topElement(), rowMapping );
301  m_schema.mappingSchema().storeMapping( rowMapping );
302 }
NamedSequence m_mappingSequence
void unfoldElement(const MappingElement &element, MappingRawData &destination)
virtual void storeMapping(const MappingRawData &data)=0
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
void ora::MappingDatabase::unfoldElement ( const MappingElement element,
MappingRawData destination 
)
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().

42  {
43  int newElemId = m_mappingSequence.getNextId();
44  MappingRawElement& elem = destination.addElement( newElemId );
45  elem.elementType = MappingElement::elementTypeAsString( element.elementType() );
46  elem.scopeName = element.scopeName();
47  if(elem.scopeName.empty()) elem.scopeName = MappingRawElement::emptyScope();
48  elem.variableName = element.variableName();
49  elem.variableType = element.variableType();
50  elem.tableName = element.tableName();
51  elem.columns = element.columnNames();
52  for ( MappingElement::const_iterator iSubEl = element.begin();
53  iSubEl != element.end(); ++iSubEl) {
54  unfoldElement( iSubEl->second, destination );
55  }
56 }
NamedSequence m_mappingSequence
int getNextId(bool sinchronize=false)
Definition: Sequences.cc:83
void unfoldElement(const MappingElement &element, MappingRawData &destination)
static std::string elementTypeAsString(ElementType elementType)
Converts the enumeration type to a string.
static std::string emptyScope()
std::map< std::string, MappingElement >::const_iterator const_iterator
std::string ora::MappingDatabase::versionOfClass ( const Reflex::Type &  dictionary)
static

Definition at line 12 of file MappingDatabase.cc.

References className(), ora::MappingRules::classVersionPropertyNameInDictionary(), and ora::MappingRules::defaultClassVersion().

Referenced by ora::ContainerSchema::loadMappingForDependentClass(), and ora::ContainerSchema::mapping().

12  {
13  std::string className = dictionary.Name(Reflex::SCOPED);
14  Reflex::PropertyList classProps = dictionary.Properties();
15  std::string classVersion = MappingRules::defaultClassVersion(className);
16  if(classProps.HasProperty(MappingRules::classVersionPropertyNameInDictionary())){
17  classVersion = classProps.PropertyAsString(MappingRules::classVersionPropertyNameInDictionary());
18  }
19  return classVersion;
20 }
static std::string defaultClassVersion(const std::string &className)
static std::string classVersionPropertyNameInDictionary()
std::string className(const T &t)
Definition: ClassName.h:30
const std::set< std::string > & ora::MappingDatabase::versions ( )

Definition at line 308 of file MappingDatabase.cc.

308  {
309  if(!m_isLoaded){
311  m_isLoaded = true;
312  }
313  return m_versions;
314 }
virtual bool getVersionList(std::set< std::string > &destination)=0
virtual IMappingSchema & mappingSchema()=0
std::set< std::string > m_versions
IDatabaseSchema & m_schema
The schema in use.

Member Data Documentation

bool ora::MappingDatabase::m_isLoaded
private

Definition at line 86 of file MappingDatabase.h.

NamedSequence ora::MappingDatabase::m_mappingSequence
private

Definition at line 84 of file MappingDatabase.h.

IDatabaseSchema& ora::MappingDatabase::m_schema
private

The schema in use.

Definition at line 83 of file MappingDatabase.h.

std::set<std::string> ora::MappingDatabase::m_versions
private

Definition at line 85 of file MappingDatabase.h.