CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Classes | Enumerations | Functions
ora Namespace Reference

TO BE REMOVED. More...

Namespaces

 ClassUtils
 
 RelationalMapping
 
 SchemaUtils
 

Classes

struct  AllKnowTypeHandlers
 
union  AnyData
 
struct  AnyTypeHandler
 
class  ArrayHandlerFactory
 
class  ArrayMapping
 
class  BlobMapping
 
class  BlobReader
 
class  BlobStreamer
 
class  BlobUpdater
 
class  BlobWriter
 
class  BlobWriterBase
 
class  BulkInsertOperation
 
class  CArrayHandler
 
class  CArrayIteratorHandler
 
class  CArrayMapping
 
class  CArrayReader
 
class  CArrayStreamer
 
class  CArrayUpdater
 
class  CArrayWriter
 
struct  CompareTypeHandler
 
class  CondMetadataTable
 
class  Configuration
 
class  ConnectionPool
 To be moved in DBCommon, has to serve also the pure coral use case. More...
 
class  Container
 
struct  ContainerHeaderData
 
class  ContainerIterator
 
class  ContainerSchema
 
class  ContainerUpdateTable
 
class  Database
 
class  DatabaseContainer
 
class  DatabaseImpl
 
class  DatabaseSession
 
class  DatabaseUtility
 
class  DatabaseUtilitySession
 
class  DataElement
 
class  DeleteBuffer
 
class  DeleteOperation
 
class  DependentClassReader
 
class  DependentClassWriter
 
class  EmptyMapping
 
class  Exception
 Base exception class for the object to relational access. More...
 
struct  Guid
 
class  Handle
 
class  Holder
 
class  IArrayHandler
 
class  IArrayIteratorHandler
 
class  IBlobStreamingService
 Interface for a Streaming Service. More...
 
class  IContainerHeaderTable
 
class  IDatabaseSchema
 
class  IDatabaseTable
 
class  IMainTable
 
class  IMappingSchema
 
class  INamingServiceTable
 
class  InlineCArrayReader
 
class  InlineCArrayStreamer
 
class  InlineCArrayStreamerBase
 
class  InlineCArrayUpdater
 
class  InlineCArrayWriter
 
class  InputRelationalData
 
class  InsertCache
 
class  InsertOperation
 
class  IPtrLoader
 
class  IReferenceHandler
 
class  IRelationalData
 
class  IRelationalMapping
 
class  IRelationalOperation
 
class  IRelationalReader
 
class  IRelationalStreamer
 
class  IRelationalUpdater
 
class  IRelationalWriter
 
class  ISequenceTable
 
class  IteratorBuffer
 
class  ITokenParser
 
class  ITokenWriter
 
class  IVectorLoader
 
class  MappingDatabase
 
class  MappingElement
 
class  MappingGenerator
 
struct  MappingRawData
 
struct  MappingRawElement
 
class  MappingRules
 
class  MappingToSchema
 
class  MappingTree
 
class  Monitoring
 
class  MultiIndexDataTrie
 
class  MultiRecordInsertOperation
 
class  MultiRecordSelectOperation
 
class  NamedRef
 
class  NamedReference
 
class  NamedReferenceStreamerBase
 
class  NamedRefMapping
 
class  NamedRefReader
 
class  NamedRefStreamer
 
class  NamedRefUpdater
 
class  NamedRefWriter
 
class  NamedSequence
 
struct  NullTypeHandler
 
class  Object
 
class  ObjectMapping
 
class  ObjectReader
 
class  ObjectStreamer
 
class  ObjectStreamerBase
 
class  ObjectUpdater
 
class  ObjectWriter
 
class  OId
 
class  OraClassVersionTable
 
class  OraContainerHeaderTable
 
class  OraDatabaseSchema
 
class  OraMainTable
 
class  OraMappingElementTable
 
class  OraMappingSchema
 
class  OraMappingVersionTable
 
class  OraNamingServiceTable
 
class  OraPtrMapping
 
class  OraPtrReadBuffer
 
class  OraPtrReader
 
class  OraPtrStreamer
 
class  OraPtrUpdater
 
class  OraPtrWriter
 
class  OraReferenceMapping
 
class  OraReferenceReader
 
class  OraReferenceStreamer
 
class  OraReferenceStreamerBase
 
class  OraReferenceUpdater
 
class  OraReferenceWriter
 
class  OraSequenceTable
 
class  PoolClassVersionTable
 
class  PoolContainerHeaderTable
 
class  PoolDatabaseSchema
 
class  PoolDbCache
 
struct  PoolDbCacheData
 
class  PoolMainTable
 
class  PoolMappingElementTable
 
class  PoolMappingSchema
 
class  PoolMappingVersionTable
 
class  PoolSequenceTable
 
class  PrimitiveMapping
 
class  PrimitiveReader
 
class  PrimitiveStreamer
 
class  PrimitiveStreamerBase
 
class  PrimitiveUpdater
 
class  PrimitiveWriter
 
class  Properties
 
class  Ptr
 
class  PVector
 
class  PVectorHandler
 
class  PVectorIteratorHandler
 
class  PVectorReader
 
class  PVectorStreamer
 
class  PVectorUpdater
 
class  PVectorWriter
 
class  Query
 
class  QueryableVector
 
class  QueryableVectorLoader
 
class  QueryableVectorReader
 
class  QueryableVectorStreamer
 
class  QueryableVectorUpdater
 
class  QueryableVectorWriter
 
class  QVQueryMaker
 
class  QVReader
 
class  Range
 
class  RangeIterator
 
class  RangeReverseIterator
 
class  ReadBuffer
 
class  Record
 
class  RecordSpec
 
struct  RecordSpecImpl
 
class  Reference
 
class  RelationalBuffer
 
class  RelationalDeleter
 
class  RelationalMappingFactory
 
class  RelationalPtrLoader
 
class  RelationalRefLoader
 
class  RelationalStreamerFactory
 
class  RflxDeleter
 
class  ScopedTransaction
 
class  Selection
 
class  SelectOperation
 
class  SequenceManager
 
class  Sequences
 
class  Serializer
 
class  SessionMonitoringData
 
struct  SharedLibraryName
 
class  SharedSession
 
struct  SimpleTypeHandler
 
class  SpecialSTLContainerHandler
 
class  STLContainerHandler
 
class  STLContainerIteratorHandler
 
class  STLContainerReader
 
class  STLContainerStreamer
 
class  STLContainerUpdater
 
class  STLContainerWriter
 
struct  TableInfo
 
class  TableRegister
 
class  Transaction
 
class  TransactionCache
 
struct  TransactionMonitoringData
 
struct  TypeHandler
 
union  U_Primitives
 
class  UniqueRef
 
class  UniqueReferenceMapping
 
class  UniqueRefReader
 
class  UniqueRefStreamer
 
class  UniqueRefUpdater
 
class  UniqueRefWriter
 
class  UpdateBuffer
 
class  UpdateOperation
 
class  Version
 
struct  VoidStarHandler
 
class  WriteBuffer
 

Enumerations

enum  ConditionType {
  Eq, Gt, Lt, Ge,
  Le
}
 
enum  SelectionItemType {
  EQ, NE, GT, GE,
  LT, LE
}
 

Functions

void addFromTableHierarchy (const std::string &tableName, std::map< std::string, std::set< std::string > > &tableList, std::vector< std::string > &orderedList)
 
void checkString (const std::string &s, int code, bool thro=true)
 
const char * conditionOfType (ConditionType condType)
 
void deleteArrayElements (MappingElement &mapping, int oid, int fromIndex, RelationalBuffer &buffer)
 
int existAttribute (const std::string &attributeName, const coral::AttributeList &data)
 
Container getContainerFromSession (const std::string &name, const Reflex::Type &contType, DatabaseSession &session)
 
void getTableHierarchyFromMappingElement (const MappingElement &source, std::map< std::string, std::set< std::string > > &tableList)
 
std::string guidFromTime ()
 
bool isLoosePersistencyDataMember (const Reflex::Member &dataMember)
 
bool isLoosePersistencyOnWriting (const Reflex::Member &dataMember)
 
std::string mappingTypeFromPool (const std::string &mappingType)
 
std::string namedRefNullLabel ()
 
std::string nameFromClass (const Reflex::Type &contType)
 
std::string poolSchemaVersion ()
 
void processBaseClasses (MappingElement &mappingElement, const Reflex::Type &objType, const std::string &scopeNameForSchema, TableRegister &tableRegister)
 
void processLeafElement (MappingElement &parentElement, const std::string &elementType, const std::string &typeName, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema, TableRegister &tableRegister)
 
void processTableHierarchy (const MappingElement &element, std::set< std::string > &tableRegister, std::vector< std::pair< std::string, std::string > > &tableList)
 
void rebuildPoolMapping (const std::string &scope, const std::string &extraScope, const std::map< std::string, std::vector< MappingRawElement > > &elementsByScope, ora::MappingRawData &dest, int &counter)
 
void scanElement (const MappingElement &element, const TableInfo &currentTable, bool isDependency, std::vector< std::string > &tableHierarchy, std::map< std::string, TableInfo > &tableMap)
 
void setTableAccessPermission (coral::ITable &table, const std::string &principal, bool forWrite)
 
void throwException (const std::string &message, const std::string &methodName) __attribute__((noreturn))
 
void throwException (const std::string &message, const std::type_info &sourceType, const std::string &methodName) __attribute__((noreturn))
 
std::string uniqueRefNullLabel ()
 
static const std::string validChars ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789")
 
std::string variableNameFromPool (const std::string &variableName)
 

Detailed Description

TO BE REMOVED.

Enumeration Type Documentation

Enumerator
Eq 
Gt 
Lt 
Ge 
Le 

Definition at line 33 of file RelationalOperation.h.

Enumerator
EQ 
NE 
GT 
GE 
LT 
LE 

Definition at line 16 of file Selection.h.

16 { EQ, NE, GT, GE, LT, LE } SelectionItemType;
SelectionItemType
Definition: Selection.h:16

Function Documentation

void ora::addFromTableHierarchy ( const std::string &  tableName,
std::map< std::string, std::set< std::string > > &  tableList,
std::vector< std::string > &  orderedList 
)

Definition at line 35 of file ContainerSchema.cc.

Referenced by ora::ContainerSchema::getTableHierarchy().

37  {
38  orderedList.push_back( tableName );
39  std::map<std::string, std::set<std::string> >::const_iterator iDeps = tableList.find( tableName );
40  if(iDeps != tableList.end() ){
41  for( std::set<std::string>::const_iterator iDt = iDeps->second.begin();
42  iDt != iDeps->second.end(); iDt++ ){
43  addFromTableHierarchy( *iDt, tableList, orderedList );
44  }
45  }
46  }
void addFromTableHierarchy(const std::string &tableName, std::map< std::string, std::set< std::string > > &tableList, std::vector< std::string > &orderedList)
void ora::checkString ( const std::string &  s,
int  code,
bool  thro = true 
)

Definition at line 201 of file MappingRules.cc.

References i, throwException(), and validChars().

201  {
202  for( size_t i=0;i<s.size();i++){
203  if( validChars.find( s[i])==std::string::npos ) {
204  std::stringstream mess;
205  mess <<" code="<<code<<" in string ["<<s<<"] found a wrong char=["<<s[i]<<"].";
206  if( thro ) throwException( mess.str(),"validChars");
207  }
208  }
209  }
int i
Definition: DBlmapReader.cc:9
static const std::string validChars("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789")
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
const char* ora::conditionOfType ( ConditionType  condType)

Definition at line 27 of file RelationalOperation.cc.

Referenced by ora::InputRelationalData::addWhereId().

27  {
28  static const char* cond[ 5 ] = { (char*)"=",(char*)">",(char*)"<",(char*)">=",(char*)"<=" };
29  return cond[ condType ];
30  }
void ora::deleteArrayElements ( MappingElement &  mapping,
int  oid,
int  fromIndex,
RelationalBuffer &  buffer 
)

Definition at line 8 of file ArrayCommonImpl.cc.

References ora::InputRelationalData::addWhereId(), ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingElement::elementType(), ora::MappingElement::end(), Ge, ora::RelationalBuffer::newDelete(), AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), and ora::InputRelationalData::whereData().

Referenced by ora::PVectorUpdater::update().

11  {
12  for ( MappingElement::iterator iMe = mapping.begin();
13  iMe != mapping.end(); ++iMe ) {
14  MappingElement::ElementType elementType = iMe->second.elementType();
15  // add the InlineCArray (or change the algorithm...
16  if ( elementType == MappingElement::Object ||
17  elementType == MappingElement::Array ||
18  elementType == MappingElement::OraArray ||
19  elementType == MappingElement::CArray ) {
20  deleteArrayElements( iMe->second, oid, fromIndex, buffer );
21  }
22  }
23  if ( mapping.elementType() == MappingElement::Object) return;
24 
25  std::string oidColumn = mapping.columnNames()[ 0 ];
26  std::string indexColumn = mapping.columnNames()[ 1 ];
27  DeleteOperation& deleteOperation = buffer.newDelete( mapping.tableName() );
28  deleteOperation.addWhereId( oidColumn );
29  deleteOperation.addWhereId( indexColumn, Ge );
30  coral::AttributeList::iterator condDataIter = deleteOperation.whereData().begin();
31  condDataIter->data<int>() = oid;
32  ++condDataIter;
33  condDataIter->data<int>() = fromIndex;
34 }
void deleteArrayElements(MappingElement &mapping, int oid, int fromIndex, RelationalBuffer &buffer)
int ora::existAttribute ( const std::string &  attributeName,
const coral::AttributeList &  data 
)

Definition at line 15 of file RelationalOperation.cc.

References getHLTprescales::index, and run_regression::ret.

Referenced by ora::InputRelationalData::addBlobData(), ora::InputRelationalData::addData(), ora::InputRelationalData::addId(), ora::InputRelationalData::addWhereId(), and ora::SelectOperation::addWhereId().

16  {
17  int ret = -1;
18  int index = 0;
19  for(coral::AttributeList::const_iterator iAttr = data.begin();
20  iAttr!=data.end() && (ret==-1); ++iAttr){
21  if( iAttr->specification().name() == attributeName ) ret = index;
22  index++;
23  }
24  return ret;
25  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Container ora::getContainerFromSession ( const std::string &  name,
const Reflex::Type &  contType,
DatabaseSession &  session 
)

Definition at line 41 of file Database.cc.

References ora::Configuration::automaticContainerCreation(), ora::Configuration::automaticDatabaseCreation(), ora::DatabaseSession::configuration(), ora::DatabaseSession::containerHandle(), ora::DatabaseSession::createContainer(), ora::Properties::getFlag(), ora::Configuration::properties(), and throwException().

Referenced by ora::Database::getContainer(), and ora::Database::insertItem().

41  {
42  Handle<DatabaseContainer> contHandle = session.containerHandle( name );
43  if( !contHandle ){
44  if( session.configuration().properties().getFlag( Configuration::automaticDatabaseCreation()) ||
45  session.configuration().properties().getFlag( Configuration::automaticContainerCreation() ) ){
46  contHandle = session.createContainer( name, contType );
47  } else {
48  throwException("Container \""+name+"\" does not exist in the database.",
49  "Database::insertItem");
50  }
51  }
52 
53  return Container( contHandle );
54  }
EcalChannelStatus Container
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
void ora::getTableHierarchyFromMappingElement ( const MappingElement &  source,
std::map< std::string, std::set< std::string > > &  tableList 
)

Definition at line 16 of file ContainerSchema.cc.

References ora::MappingElement::begin(), ora::MappingElement::end(), AlCaHLTBitMon_QueryRunRegistry::string, and ora::MappingElement::tableName().

Referenced by ora::ContainerSchema::getTableHierarchy().

17  {
18  const std::string& tableName = source.tableName();
19  std::map<std::string, std::set<std::string> >::iterator iTab = tableList.find( tableName );
20  if( iTab ==tableList.end() ){
21  std::set<std::string> dependencies;
22  tableList.insert(std::make_pair( tableName, dependencies ) );
23  }
24  for( MappingElement::const_iterator iElem = source.begin();
25  iElem != source.end(); iElem++ ){
26  std::map<std::string, std::set<std::string> >::iterator iT = tableList.find( tableName );
27  const std::string& innerTable = iElem->second.tableName();
28  if( innerTable != tableName ){
29  iT->second.insert( innerTable );
30  }
31  getTableHierarchyFromMappingElement( iElem->second, tableList );
32  }
33  }
void getTableHierarchyFromMappingElement(const MappingElement &source, std::map< std::string, std::set< std::string > > &tableList)
static std::string const source
Definition: EdmProvDump.cc:43
std::string ora::guidFromTime ( )

Definition at line 37 of file Guid.cc.

References ora::Guid::fromTime(), tmp, and ora::Guid::toString().

Referenced by ora::SessionMonitoringData::newTransaction(), and ora::Monitoring::startSession().

37  {
38  Guid tmp;
39  tmp.fromTime();
40  return tmp.toString();
41 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
ora::Guid Guid
Definition: Guid.h:26
bool ora::isLoosePersistencyDataMember ( const Reflex::Member &  dataMember)

Definition at line 13 of file ObjectStreamer.cc.

References ora::MappingRules::isLooseOnReading(), ora::MappingRules::isLooseOnWriting(), ora::MappingRules::persistencyPropertyNameInDictionary(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::ObjectStreamerBase::buildBaseDataMembers(), and ora::ObjectStreamerBase::buildDataMembers().

13  {
14  std::string persistencyType("");
15  Reflex::PropertyList memberProps = dataMember.Properties();
16  if( memberProps.HasProperty(ora::MappingRules::persistencyPropertyNameInDictionary())){
17  persistencyType = memberProps.PropertyAsString(ora::MappingRules::persistencyPropertyNameInDictionary());
18  }
19  return ora::MappingRules::isLooseOnWriting( persistencyType ) || ora::MappingRules::isLooseOnReading( persistencyType ) ;
20  }
static std::string persistencyPropertyNameInDictionary()
Definition: MappingRules.cc:47
static bool isLooseOnReading(const std::string &persistencyProperty)
Definition: MappingRules.cc:53
static bool isLooseOnWriting(const std::string &persistencyProperty)
Definition: MappingRules.cc:58
bool ora::isLoosePersistencyOnWriting ( const Reflex::Member &  dataMember)

Definition at line 535 of file RelationalMapping.cc.

References ora::MappingRules::isLooseOnWriting(), ora::MappingRules::persistencyPropertyNameInDictionary(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::ObjectMapping::process(), and processBaseClasses().

535  {
536  std::string persistencyType("");
537  Reflex::PropertyList memberProps = dataMember.Properties();
538  if( memberProps.HasProperty(ora::MappingRules::persistencyPropertyNameInDictionary())){
539  persistencyType = memberProps.PropertyAsString(ora::MappingRules::persistencyPropertyNameInDictionary());
540  }
541  return ora::MappingRules::isLooseOnWriting( persistencyType );
542  }
static std::string persistencyPropertyNameInDictionary()
Definition: MappingRules.cc:47
static bool isLooseOnWriting(const std::string &persistencyProperty)
Definition: MappingRules.cc:58
std::string ora::mappingTypeFromPool ( const std::string &  mappingType)

Definition at line 731 of file PoolDatabaseSchema.cc.

References ora::MappingElement::OraArrayMappingElementType().

Referenced by ora::PoolMappingSchema::getMapping().

731  {
732  if( mappingType == "PoolArray" ) return MappingElement::OraArrayMappingElementType();
733  return mappingType;
734  }
std::string ora::namedRefNullLabel ( )

Definition at line 14 of file NamedRefStreamer.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::NamedReferenceStreamerBase::bindDataForRead(), and ora::NamedReferenceStreamerBase::bindDataForUpdate().

14  {
15  static const std::string nullLabel("ora::NamedRef::Null");
16  return nullLabel;
17 }
std::string ora::nameFromClass ( const Reflex::Type &  contType)

Definition at line 37 of file Database.cc.

Referenced by ora::Database::createContainer(), ora::Database::getContainer(), and ora::Database::nameForContainer().

37  {
38  return contType.Name( Reflex::SCOPED );
39  }
std::string ora::poolSchemaVersion ( )

Definition at line 9 of file IDatabaseSchema.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::BlobWriterBase::buildDataElement(), ora::Version::fromString(), and ora::PoolMainTable::schemaVersion().

9  {
10  static const std::string s_version("POOL");
11  return s_version;
12 }
void ora::processBaseClasses ( MappingElement &  mappingElement,
const Reflex::Type &  objType,
const std::string &  scopeNameForSchema,
TableRegister &  tableRegister 
)

Definition at line 544 of file RelationalMapping.cc.

References CustomConfigs::Base(), newFWLiteAna::base, className(), i, isLoosePersistencyOnWriting(), ora::MappingRules::isMappedToBlob(), j, ora::MappingRules::mappingPropertyNameInDictionary(), ora::RelationalMappingFactory::newProcessor(), ora::ClassUtils::resolvedType(), ora::MappingRules::scopedVariableForSchemaObjects(), ora::MappingRules::scopedVariableName(), AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by ora::ObjectMapping::process().

547  {
548  std::string className = objType.Name(Reflex::SCOPED);
549  for ( size_t i=0; i< objType.BaseSize(); i++){
550  Reflex::Base base = objType.BaseAt(i);
551  Reflex::Type baseType = ClassUtils::resolvedType( base.ToType() );
552  if(!baseType){
553  throwException( "Class for base \""+base.Name()+"\" is not in the dictionary.","ObjectMapping::process");
554  }
555 
556  // TO BE FIXED:: here there is still to fix the right scopeName to pass
557  processBaseClasses( mappingElement, baseType, scopeNameForSchema, tableRegister );
558  for ( size_t j=0; j< baseType.DataMemberSize(); j++){
559  Reflex::Member baseMember = baseType.DataMemberAt(j);
560  // Skip the transient and the static ones
561  if ( baseMember.IsTransient() || baseMember.IsStatic() || isLoosePersistencyOnWriting( baseMember ) ) continue;
562  // Retrieve the data member type
563  Reflex::Type type = ClassUtils::resolvedType( baseMember.TypeOf() );
564  Reflex::Type declaringType = ClassUtils::resolvedType( baseMember.DeclaringType());
565  std::string scope = declaringType.Name(Reflex::SCOPED);
566  // Retrieve the field name
567  std::string objectMemberName = ora::MappingRules::scopedVariableName( baseMember.Name(), scope );
568  std::string objectMemberNameForSchema = ora::MappingRules::scopedVariableForSchemaObjects( baseMember.Name(), scope );
569 
570  std::string mappingType("");
571  Reflex::PropertyList memberProps = baseMember.Properties();
572  if( memberProps.HasProperty(ora::MappingRules::mappingPropertyNameInDictionary())){
573  mappingType = memberProps.PropertyAsString(ora::MappingRules::mappingPropertyNameInDictionary());
574  }
575  bool blobStreaming = ora::MappingRules::isMappedToBlob( mappingType );
576 
577  RelationalMappingFactory mappingFactory( tableRegister );
578  std::auto_ptr<IRelationalMapping> processor( mappingFactory.newProcessor( type, blobStreaming ) );
579  processor->process( mappingElement, objectMemberName, objectMemberNameForSchema, scopeNameForSchema );
580  }
581  }
582  }
tuple base
Main Program
Definition: newFWLiteAna.py:92
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
static std::string scopedVariableName(const std::string &variableName, const std::string &scope)
variable name manipulation
bool isLoosePersistencyOnWriting(const Reflex::Member &dataMember)
static std::string scopedVariableForSchemaObjects(const std::string &variableName, const std::string &scope)
static std::string mappingPropertyNameInDictionary()
class related parameters
Definition: MappingRules.cc:35
int j
Definition: DBlmapReader.cc:9
static bool isMappedToBlob(const std::string &mappingProperty)
Definition: MappingRules.cc:42
Reflex::Type resolvedType(const Reflex::Type &typ)
Definition: ClassUtils.cc:404
void processBaseClasses(MappingElement &mappingElement, const Reflex::Type &objType, const std::string &scopeNameForSchema, TableRegister &tableRegister)
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
std::string className(const T &t)
Definition: ClassName.h:30
void ora::processLeafElement ( MappingElement &  parentElement,
const std::string &  elementType,
const std::string &  typeName,
const std::string &  attributeName,
const std::string &  attributeNameForSchema,
const std::string &  scopeNameForSchema,
TableRegister &  tableRegister 
)

Definition at line 141 of file RelationalMapping.cc.

References ora::MappingElement::appendSubElement(), ora::MappingElement::blobMappingElementType(), ora::TableRegister::checkColumn(), ora::TableRegister::checkTable(), ora::MappingRules::columnNameForBlobMetadata(), ora::MappingRules::columnNameForVariable(), i, ora::TableRegister::insertColumn(), ora::MappingRules::MaxColumnNameLength, ora::MappingRules::newNameForSchemaObject(), ora::MappingElement::setColumnNames(), AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), and throwException().

Referenced by ora::PrimitiveMapping::process(), and ora::BlobMapping::process().

147  {
148  if(!tableRegister.checkTable( parentElement.tableName())){
149  throwException("Table \""+parentElement.tableName()+"\" has not been allocated.",
150  "processLeafElement");
151  }
152  ora::MappingElement& me = parentElement.appendSubElement( elementType, attributeName, typeName, parentElement.tableName() );
153  std::string inputCol = ora::MappingRules::columnNameForVariable( attributeNameForSchema, scopeNameForSchema );
154  std::string columnName(inputCol);
155  unsigned int i=0;
156  while(tableRegister.checkColumn(parentElement.tableName(),columnName)){
158  i++;
159  }
160  tableRegister.insertColumn(parentElement.tableName(),columnName);
161  std::vector<std::string> cols;
162  cols.push_back( columnName );
163  // add metadata column for blobs
164  if( elementType == ora::MappingElement::blobMappingElementType() ){
165  std::string metaDataColumnName = ora::MappingRules::columnNameForBlobMetadata( columnName );
166  tableRegister.insertColumn(parentElement.tableName(),metaDataColumnName );
167  cols.push_back( metaDataColumnName );
168  }
169  me.setColumnNames( cols );
170  }
int i
Definition: DBlmapReader.cc:9
static std::string blobMappingElementType()
Returns the name of the blob mapping element type.
MappingElement & appendSubElement(const std::string &elementType, const std::string &variableName, const std::string &variableType, const std::string &tableName)
static std::string columnNameForVariable(const std::string &variableName, const std::string &scope, bool forData=true)
static std::string columnNameForBlobMetadata(const std::string &dataColumnName)
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 throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
void setColumnNames(const std::vector< std::string > &columns)
void ora::processTableHierarchy ( const MappingElement &  element,
std::set< std::string > &  tableRegister,
std::vector< std::pair< std::string, std::string > > &  tableList 
)

Definition at line 277 of file MappingElement.cc.

References ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingElement::end(), AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), throwException(), and ora::MappingElement::variableName().

Referenced by ora::MappingElement::tableHierarchy().

279  {
280  const std::string& tableName = element.tableName();
281  std::set<std::string>::iterator iT = tableRegister.find( tableName );
282  if( iT == tableRegister.end() ){
283  if( element.columnNames().empty() ){
284  throwException( "Mapping element for variable \""+element.variableName()+"\" does not specify column names.",
285  "MappingElement::tableHierarchy");
286  }
287  tableRegister.insert( tableName );
288  tableList.push_back( std::make_pair(tableName,element.columnNames()[0]) );
289  }
290  for(MappingElement::const_iterator iEl = element.begin();
291  iEl != element.end(); ++iEl ){
292  processTableHierarchy( iEl->second, tableRegister, tableList );
293  }
294  }
void processTableHierarchy(const MappingElement &element, std::set< std::string > &tableRegister, std::vector< std::pair< std::string, std::string > > &tableList)
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
void ora::rebuildPoolMapping ( const std::string &  scope,
const std::string &  extraScope,
const std::map< std::string, std::vector< MappingRawElement > > &  elementsByScope,
ora::MappingRawData dest,
int &  counter 
)

Definition at line 778 of file PoolDatabaseSchema.cc.

References ora::MappingRawData::addElement(), HTMLExport::elem(), and ora::MappingRawElement::scopeName.

Referenced by ora::PoolMappingSchema::getMapping().

778  {
779  std::map<std::string, std::vector<MappingRawElement> >::const_iterator iSc = elementsByScope.find( scope );
780  if( iSc != elementsByScope.end() ){
781  for( std::vector<MappingRawElement>::const_iterator iMap = iSc->second.begin();
782  iMap != iSc->second.end(); ++iMap ){
783  MappingRawElement& elem = dest.addElement( counter ) = *iMap;
784  elem.scopeName = extraScope+"::"+iMap->scopeName;
785  counter++;
786  rebuildPoolMapping( scope+"::"+iMap->variableName, extraScope, elementsByScope, dest, counter );
787  }
788  }
789  }
MappingRawElement & addElement(int elementId)
void rebuildPoolMapping(const std::string &scope, const std::string &extraScope, const std::map< std::string, std::vector< MappingRawElement > > &elementsByScope, ora::MappingRawData &dest, int &counter)
static std::atomic< unsigned int > counter
void ora::scanElement ( const MappingElement &  element,
const TableInfo &  currentTable,
bool  isDependency,
std::vector< std::string > &  tableHierarchy,
std::map< std::string, TableInfo > &  tableMap 
)

Definition at line 64 of file MappingTree.cc.

References ora::MappingElement::begin(), ora::MappingElement::Blob, ora::MappingElement::columnNames(), ora::MappingElement::elementType(), ora::MappingElement::end(), ora::TableInfo::m_idColumns, ora::TableInfo::m_tableName, ora::MappingElement::NamedReference, ora::MappingElement::OraReference, ora::MappingElement::Primitive, AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), ora::MappingElement::UniqueReference, and ora::MappingElement::variableType().

Referenced by ora::MappingTree::tables().

68  {
69  const std::string& tName = element.tableName();
70  std::map<std::string,TableInfo>::iterator iT = tableMap.find( tName );
71  if( iT == tableMap.end() ){
72  tableHierarchy.push_back( tName );
73  iT = tableMap.insert( std::make_pair( tName, TableInfo() ) ).first;
74  iT->second.m_dependency = isDependency;
75  iT->second.m_tableName = tName;
76  iT->second.m_idColumns = element.columnNames();
77  iT->second.m_parentTableName = currentTable.m_tableName;
78  iT->second.m_refColumns = currentTable.m_idColumns;
79  } else {
80  const std::vector<std::string>& dataCols = element.columnNames();
81  MappingElement::ElementType elementType = element.elementType();
82  switch ( elementType ) {
83  case MappingElement::Primitive :
84  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
85  element.variableType() ));
86  break;
87  case MappingElement::Blob :
88  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
89  coral::AttributeSpecification::typeNameForId( typeid(coral::Blob) ) ));
90  iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
91  coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
92  iT->second.m_nullableColumns.insert( dataCols[1] );
93  break;
94  case MappingElement::OraReference :
95  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
96  coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
97  iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
98  coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
99  break;
100  case MappingElement::NamedReference :
101  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
102  coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
103  break;
104  case MappingElement::UniqueReference :
105  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
106  coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
107  iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
108  coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
109  break;
110  default:
111  break;
112  }
113  }
114  TableInfo currT = iT->second;
115  for( MappingElement::const_iterator iM = element.begin();
116  iM != element.end(); ++iM ){
117  scanElement( iM->second, currT, isDependency, tableHierarchy, tableMap );
118  }
119  }
void scanElement(const MappingElement &element, const TableInfo &currentTable, bool isDependency, std::vector< std::string > &tableHierarchy, std::map< std::string, TableInfo > &tableMap)
Definition: MappingTree.cc:64
void ora::setTableAccessPermission ( coral::ITable &  table,
const std::string &  principal,
bool  forWrite 
)

Definition at line 14 of file IDatabaseSchema.cc.

Referenced by ora::IDatabaseTable::setAccessPermission(), and ora::ContainerSchema::setAccessPermission().

16  {
17  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Select );
18  if(forWrite){
19  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Update );
20  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Insert );
21  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Delete );
22  }
23 }
#define table(NAME)
Definition: DbCore.h:49
void ora::throwException ( const std::string &  message,
const std::string &  methodName 
)

Definition at line 10 of file Exception.cc.

References edm::hlt::Exception.

Referenced by ora::PoolDbCache::add(), ora::PoolContainerHeaderTable::addContainer(), ora::Selection::addIndexItem(), ora::MappingToSchema::alter(), ora::MappingElement::alterType(), ora::MappingElement::appendSubElement(), ora::BlobWriterBase::bindData(), ora::PrimitiveStreamerBase::bindDataForRead(), ora::OraReferenceStreamerBase::bindDataForRead(), ora::NamedReferenceStreamerBase::bindDataForRead(), ora::PrimitiveStreamerBase::bindDataForUpdate(), ora::OraReferenceStreamerBase::bindDataForUpdate(), ora::NamedReferenceStreamerBase::bindDataForUpdate(), ora::MultiIndexDataTrie::branchSize(), ora::DependentClassWriter::build(), ora::OraPtrWriter::build(), ora::CArrayWriter::build(), ora::OraPtrReadBuffer::build(), ora::UniqueRefWriter::build(), ora::STLContainerWriter::build(), ora::OraPtrUpdater::build(), ora::QVQueryMaker::build(), ora::BlobReader::build(), ora::UniqueRefReader::build(), ora::CArrayReader::build(), ora::DependentClassReader::build(), ora::STLContainerReader::build(), ora::ObjectStreamerBase::buildBaseDataMembers(), ora::OraReferenceStreamerBase::buildDataElement(), ora::PrimitiveStreamerBase::buildDataElement(), ora::BlobWriterBase::buildDataElement(), ora::InlineCArrayStreamerBase::buildDataElement(), ora::NamedReferenceStreamerBase::buildDataElement(), ora::ObjectStreamerBase::buildDataMembers(), ora::Object::cast(), checkString(), ora::Database::checkTransaction(), ora::DatabaseUtilitySession::containerHandle(), ora::Database::containerHandle(), ora::OraMainTable::create(), ora::OraSequenceTable::create(), ora::PoolMainTable::create(), ora::OraMappingVersionTable::create(), ora::PoolSequenceTable::create(), ora::OraMappingElementTable::create(), ora::PoolMappingVersionTable::create(), ora::OraContainerHeaderTable::create(), ora::PoolMappingElementTable::create(), ora::OraClassVersionTable::create(), ora::PoolContainerHeaderTable::create(), ora::PoolClassVersionTable::create(), ora::OraNamingServiceTable::create(), ora::CondMetadataTable::create(), ora::PoolDatabaseSchema::create(), ora::Database::createContainer(), ora::MappingGenerator::createNewDependentMapping(), ora::MappingGenerator::createNewMapping(), ora::MultiRecordSelectOperation::data(), ora::SelectOperation::data(), ora::PoolContainerHeaderTable::decrementNumberOfObjects(), ora::Object::destruct(), ora::DatabaseContainer::drop(), ora::DatabaseSession::drop(), ora::CondMetadataTable::drop(), ora::MappingElement::elementTypeAsString(), ora::MappingElement::elementTypeFromString(), ora::DatabaseUtilitySession::eraseMapping(), ora::ContainerSchema::evolve(), ora::QVQueryMaker::executeAndLoad(), ora::PoolSequenceTable::exists(), ora::OraDatabaseSchema::exists(), ora::PoolDatabaseSchema::exists(), ora::DatabaseContainer::fetchItemAsType(), ora::PoolDbCache::find(), ora::WriteBuffer::flush(), ora::UpdateBuffer::flush(), ora::SharedSession::get(), ora::MappingDatabase::getBaseMappingForContainer(), ora::PoolContainerHeaderTable::getContainerData(), getContainerFromSession(), ora::MappingDatabase::getDependentMappingsForContainer(), ora::IteratorBuffer::getItemAsType(), ora::PoolSequenceTable::getLastId(), ora::MappingDatabase::getMappingByVersion(), ora::MappingDatabase::getMappingForContainer(), ora::Database::getNamesForObject(), ora::Sequences::getNextId(), ora::MappingElement::idColumn(), ora::DatabaseUtilitySession::importContainerSchema(), ora::PoolContainerHeaderTable::incrementNumberOfObjects(), ora::ContainerSchema::initClassDict(), ora::PoolMappingSchema::insertClassVersion(), ora::Container::insertItem(), ora::DatabaseContainer::insertItem(), ora::STLContainerHandler::iterate(), ora::PVectorHandler::iterate(), ora::DatabaseUtility::listMappings(), ora::DatabaseUtility::listMappingVersions(), ora::Database::listObjectNames(), ora::RelationalPtrLoader::load(), ora::RelationalRefLoader::load(), ora::ContainerSchema::loadMappingForDependentClass(), ora::DatabaseContainer::lock(), ora::Database::lockContainer(), ora::MultiIndexDataTrie::lookupAndClear(), ora::ClassUtils::lookupDictionary(), ora::ContainerSchema::mapping(), ora::ContainerSchema::mappingForDependentClass(), ora::ArrayHandlerFactory::newArrayHandler(), ora::RelationalStreamerFactory::newStreamer(), ora::Database::open(), cond::parseToken(), ora::MappingElement::pkColumn(), ora::MappingElement::posColumn(), ora::OraReferenceMapping::process(), ora::UniqueReferenceMapping::process(), ora::ArrayMapping::process(), ora::CArrayMapping::process(), ora::ObjectMapping::process(), processBaseClasses(), processLeafElement(), processTableHierarchy(), ora::UniqueRef< T >::ptr(), ora::Ptr< T >::ptr(), ora::MultiIndexDataTrie::push(), ora::PVectorHandler::PVectorHandler(), ora::QueryableVector< Tp >::query(), ora::OraPtrReadBuffer::read(), ora::QueryableVectorReader::read(), ora::BlobReader::read(), ora::UniqueRefReader::read(), ora::OraPtrReader::read(), ora::CArrayReader::read(), ora::STLContainerReader::read(), ora::DependentClassReader::read(), ora::ReadBuffer::read(), ora::ReadBuffer::ReadBuffer(), ora::MappingElement::recordIdColumns(), ora::PoolContainerHeaderTable::removeContainer(), ora::NamedRef< T >::safePtr(), ora::Database::schemaVersion(), ora::OraPtrReader::select(), ora::CArrayReader::select(), ora::STLContainerReader::select(), ora::QVQueryMaker::select(), ora::QueryableVector< Tp >::select(), ora::MultiRecordSelectOperation::selectRow(), ora::PoolMappingSchema::setMappingVersion(), ora::QVQueryMaker::setQueryCondition(), ora::PoolSequenceTable::sinchronize(), ora::SpecialSTLContainerHandler::SpecialSTLContainerHandler(), ora::STLContainerHandler::STLContainerHandler(), ora::OraDatabaseSchema::testDropPermission(), ora::Database::transaction(), ora::PVectorUpdater::update(), ora::QueryableVectorUpdater::update(), ora::OraPtrUpdater::update(), ora::Container::updateItem(), ora::DatabaseContainer::updateItem(), ora::PoolContainerHeaderTable::updateNumberOfObjects(), ora::Handle< T >::validate(), ora::QueryableVectorWriter::write(), ora::CArrayWriter::write(), ora::OraPtrWriter::write(), ora::UniqueRefWriter::write(), ora::STLContainerWriter::write(), and ora::DependentClassWriter::write().

11  {
12  throw Exception( message, methodName );
13  }
void ora::throwException ( const std::string &  message,
const std::type_info &  sourceType,
const std::string &  methodName 
)

Definition at line 15 of file Exception.cc.

References className(), ora::ClassUtils::demangledName(), edm::hlt::Exception, and AlCaHLTBitMon_QueryRunRegistry::string.

17  {
19  throw Exception( message, className+"::"+methodName );
20  }
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:82
std::string className(const T &t)
Definition: ClassName.h:30
std::string ora::uniqueRefNullLabel ( )

Definition at line 184 of file UniqueRefStreamer.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::UniqueRefWriter::write().

184  {
185  static const std::string nullLabel("ora::UniqueRef::Null");
186  return nullLabel;
187 }
static const std::string ora::validChars ( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789"  )
static

Referenced by checkString().

std::string ora::variableNameFromPool ( const std::string &  variableName)

Definition at line 736 of file PoolDatabaseSchema.cc.

Referenced by ora::PoolMappingSchema::getMapping().

736  {
737  size_t ind = variableName.find("pool::PVector");
738  if( ind != std::string::npos ){
739  return "ora::PVector"+variableName.substr(13);
740  }
741  return variableName;
742  }