test
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::OraReferenceMapping Class Reference

#include <RelationalMapping.h>

Inheritance diagram for ora::OraReferenceMapping:
ora::IRelationalMapping

Public Member Functions

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

Private Attributes

TableRegisterm_tableRegister
 
edm::TypeWithDict m_type
 

Detailed Description

Definition at line 74 of file RelationalMapping.h.

Constructor & Destructor Documentation

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

Definition at line 222 of file RelationalMapping.cc.

222  :
223  m_type(attributeType),m_tableRegister( tableRegister ){
224 }
edm::TypeWithDict m_type
TableRegister & m_tableRegister
ora::OraReferenceMapping::~OraReferenceMapping ( )

Definition at line 226 of file RelationalMapping.cc.

226  {
227 }

Member Function Documentation

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

Implements ora::IRelationalMapping.

Definition at line 229 of file RelationalMapping.cc.

References ora::MappingElement::appendSubElement(), className(), ora::MappingRules::columnNameForOID(), i, j, ora::MappingRules::MaxColumnNameLength, hlt_dqm_clientPB-live_cfg::me, ora::MappingRules::newNameForSchemaObject(), ora::MappingElement::OraReferenceMappingElementType(), ora::MappingElement::setColumnNames(), AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), and ora::throwException().

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().

232  {
235  if(!m_tableRegister.checkTable( parentElement.tableName())){
236  throwException("Table \""+parentElement.tableName()+"\" has not been allocated.",
237  "OraReferenceMapping::process");
238  }
239  ora::MappingElement& me = parentElement.appendSubElement( elementType, attributeName, className, parentElement.tableName() );
240 
241  std::vector<std::string> cols;
242  for(unsigned int j=0;j<2;j++){
243  std::string inputCol = ora::MappingRules::columnNameForOID( attributeNameForSchema, scopeNameForSchema, j );
244  std::string columnName(inputCol);
245  unsigned int i=0;
246  while(m_tableRegister.checkColumn(parentElement.tableName(),columnName)){
248  i++;
249  }
250  m_tableRegister.insertColumn(parentElement.tableName(),columnName);
251  cols.push_back( columnName );
252  }
253  me.setColumnNames( cols );
254 }
int i
Definition: DBlmapReader.cc:9
bool insertColumn(const std::string &tableName, const std::string &columnName)
static std::string OraReferenceMappingElementType()
Returns the name of the ORA reference mapping element type.
std::string cppName() const
edm::TypeWithDict m_type
int j
Definition: DBlmapReader.cc:9
static std::string columnNameForOID(const std::string &variableName, const std::string &scope, unsigned int index)
TableRegister & m_tableRegister
bool checkColumn(const std::string &tableName, const std::string &columnName)
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
static const size_t MaxColumnNameLength
Definition: MappingRules.h:20
bool checkTable(const std::string &tableName)
static std::string newNameForSchemaObject(const std::string &initialName, unsigned int index, size_t maxLength, char indexTrailer=0)
functions for new schema object name generation
std::string className(const T &t)
Definition: ClassName.h:30
void setColumnNames(const std::vector< std::string > &columns)

Member Data Documentation

TableRegister& ora::OraReferenceMapping::m_tableRegister
private

Definition at line 84 of file RelationalMapping.h.

edm::TypeWithDict ora::OraReferenceMapping::m_type
private

Definition at line 83 of file RelationalMapping.h.