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 edm::TypeWithDict &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
 
edm::TypeWithDict m_type
 

Detailed Description

Definition at line 116 of file RelationalMapping.h.

Constructor & Destructor Documentation

ora::NamedRefMapping::NamedRefMapping ( const edm::TypeWithDict attributeType,
TableRegister tableRegister 
)

Definition at line 323 of file RelationalMapping.cc.

323  :
324  m_type( attributeType ),
325  m_tableRegister( tableRegister ){
326 }
edm::TypeWithDict m_type
TableRegister & m_tableRegister
ora::NamedRefMapping::~NamedRefMapping ( )

Definition at line 328 of file RelationalMapping.cc.

328  {
329 }

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 331 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_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), 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().

334  {
335  std::string typeName = m_type.cppName();
336  ora::MappingElement& me = parentElement.appendSubElement( ora::MappingElement::namedReferenceMappingElementType(), attributeName, typeName, parentElement.tableName() );
337 
338  std::vector< std::string > cols;
339  std::string inputCol = ora::MappingRules::columnNameForNamedReference( attributeNameForSchema, scopeNameForSchema );
340  std::string columnName(inputCol);
341  unsigned int i=0;
342  while(m_tableRegister.checkColumn(parentElement.tableName(),columnName)){
344  i++;
345  }
346  m_tableRegister.insertColumn(parentElement.tableName(),columnName);
347  cols.push_back(columnName);
348 
349  me.setColumnNames( cols );
350 
351 }
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)
edm::TypeWithDict m_type
MappingElement & appendSubElement(const std::string &elementType, const std::string &variableName, const std::string &variableType, const std::string &tableName)
std::string cppName() const
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.

edm::TypeWithDict ora::NamedRefMapping::m_type
private

Definition at line 125 of file RelationalMapping.h.