CMS 3D CMS Logo

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

#include <RelationalMapping.h>

Inheritance diagram for ora::NamedRefMapping:
ora::IRelationalMapping

Public Member Functions

 NamedRefMapping (const Reflex::Type &attributeType, TableRegister &tableRegister)
 
void process (MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
 
 ~NamedRefMapping ()
 
- Public Member Functions inherited from ora::IRelationalMapping
virtual ~IRelationalMapping ()
 

Private Attributes

TableRegisterm_tableRegister
 
Reflex::Type m_type
 

Detailed Description

Definition at line 116 of file RelationalMapping.h.

Constructor & Destructor Documentation

ora::NamedRefMapping::NamedRefMapping ( const Reflex::Type &  attributeType,
TableRegister tableRegister 
)

Definition at line 321 of file RelationalMapping.cc.

321  :
322  m_type( attributeType ),
323  m_tableRegister( tableRegister ){
324 }
TableRegister & m_tableRegister
ora::NamedRefMapping::~NamedRefMapping ( )

Definition at line 326 of file RelationalMapping.cc.

326  {
327 }

Member Function Documentation

void ora::NamedRefMapping::process ( MappingElement parentElement,
const std::string &  attributeName,
const std::string &  attributeNameForSchema,
const std::string &  scopeNameForSchema 
)
virtual

Implements ora::IRelationalMapping.

Definition at line 329 of file RelationalMapping.cc.

References ora::MappingElement::appendSubElement(), ora::MappingRules::columnNameForNamedReference(), i, ora::MappingRules::MaxColumnNameLength, ora::MappingElement::namedReferenceMappingElementType(), ora::MappingRules::newNameForSchemaObject(), ora::MappingElement::setColumnNames(), AlCaHLTBitMon_QueryRunRegistry::string, and ora::MappingElement::tableName().

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::dumpPython(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::open(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), ConfigBuilder.ConfigBuilder::prepare_FASTSIM(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), ConfigBuilder.ConfigBuilder::scheduleSequence(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProperty().

332  {
333  std::string typeName = m_type.Name(Reflex::SCOPED);
334  ora::MappingElement& me = parentElement.appendSubElement( ora::MappingElement::namedReferenceMappingElementType(), attributeName, typeName, parentElement.tableName() );
335 
336  std::vector< std::string > cols;
337  std::string inputCol = ora::MappingRules::columnNameForNamedReference( attributeNameForSchema, scopeNameForSchema );
338  std::string columnName(inputCol);
339  unsigned int i=0;
340  while(m_tableRegister.checkColumn(parentElement.tableName(),columnName)){
342  i++;
343  }
344  m_tableRegister.insertColumn(parentElement.tableName(),columnName);
345  cols.push_back(columnName);
346 
347  me.setColumnNames( cols );
348 
349 }
int i
Definition: DBlmapReader.cc:9
static std::string namedReferenceMappingElementType()
Returns the name of the named reference element type.
bool insertColumn(const std::string &tableName, const std::string &columnName)
MappingElement & appendSubElement(const std::string &elementType, const std::string &variableName, const std::string &variableType, const std::string &tableName)
bool checkColumn(const std::string &tableName, const std::string &columnName)
static std::string columnNameForNamedReference(const std::string &variableName, const std::string &scope)
TableRegister & m_tableRegister
static const size_t MaxColumnNameLength
Definition: MappingRules.h:20
static std::string newNameForSchemaObject(const std::string &initialName, unsigned int index, size_t maxLength, char indexTrailer=0)
functions for new schema object name generation
void setColumnNames(const std::vector< std::string > &columns)

Member Data Documentation

TableRegister& ora::NamedRefMapping::m_tableRegister
private

Definition at line 126 of file RelationalMapping.h.

Reflex::Type ora::NamedRefMapping::m_type
private

Definition at line 125 of file RelationalMapping.h.