CMS 3D CMS Logo

Namespaces | Classes | Enumerations | Functions

ora Namespace Reference

TO BE REMOVED. More...

Namespaces

namespace  ClassUtils
namespace  RelationalMapping
namespace  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)
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)
data refman pasoursint
CMSSW_5_3_10 src CondCore ORA
src ContainerSchema cc data
refman pasoursint CMSSW_5_3_10
src CondCore ORA src
ContainerSchema cc data refman
pasoursint CMSSW_5_3_10 src
CondCore ORA src
ContainerSchema cc data refman
pasoursint CMSSW_5_3_10 src
CondCore ORA src
ContainerSchema cc void 
getTableHierarchyFromMappingElement (const MappingElement &source, std::map< std::string, std::set< std::string > > &tableList)
std::string guidFromTime ()
data refman pasoursint
CMSSW_5_3_10 src CondCore ORA
src ObjectStreamer cc 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::type_info &sourceType, const std::string &methodName)
void throwException (const std::string &message, const std::string &methodName)
std::string uniqueRefNullLabel ()
static 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.


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 39 of file ContainerSchema.cc.

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

                                 {
      for( std::set<std::string>::const_iterator iDt = iDeps->second.begin();
           iDt != iDeps->second.end(); iDt++ ){
        addFromTableHierarchy( *iDt, tableList, orderedList );
      }
    }
  }

}

ora::ContainerSchema::ContainerSchema( int containerId,
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().

                                                                 {
    for( size_t i=0;i<s.size();i++){
      if( validChars.find( s[i])==std::string::npos ) {
        std::stringstream mess;
        mess <<" code="<<code<<" in string ["<<s<<"] found a wrong char=["<<s[i]<<"].";
        if( thro ) throwException( mess.str(),"validChars");
      }
    }    
  } 
char* ora::conditionOfType ( ConditionType  condType)

Definition at line 27 of file RelationalOperation.cc.

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

                                                 {
    static char* cond[ 5 ] = { (char*)"=",(char*)">",(char*)"<",(char*)">=",(char*)"<=" };
    return cond[ condType ];
  }
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(), ora::MappingElement::tableName(), and ora::InputRelationalData::whereData().

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

                                                         {
  for ( MappingElement::iterator iMe = mapping.begin();
        iMe != mapping.end(); ++iMe ) {
    MappingElement::ElementType elementType = iMe->second.elementType();
    // add the InlineCArray (or change the algorithm...
    if ( elementType == MappingElement::Object ||
         elementType == MappingElement::Array ||
         elementType == MappingElement::OraArray ||
         elementType == MappingElement::CArray ) {
      deleteArrayElements( iMe->second, oid, fromIndex, buffer  );
    }
  }
  if ( mapping.elementType() == MappingElement::Object) return;

  std::string oidColumn = mapping.columnNames()[ 0 ];
  std::string indexColumn = mapping.columnNames()[ 1 ];
  DeleteOperation& deleteOperation = buffer.newDelete( mapping.tableName() );
  deleteOperation.addWhereId( oidColumn );
  deleteOperation.addWhereId( indexColumn, Ge );
  coral::AttributeList::iterator condDataIter = deleteOperation.whereData().begin();
  condDataIter->data<int>() = oid;
  ++condDataIter;
  condDataIter->data<int>() = fromIndex;
}
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().

                                                    {
    int ret = -1;
    int index = 0;
    for(coral::AttributeList::const_iterator iAttr = data.begin();
        iAttr!=data.end() && (ret==-1); ++iAttr){
      if( iAttr->specification().name() == attributeName ) ret = index;
      index++;
    }
    return ret;
  }
Container ora::getContainerFromSession ( const std::string &  name,
const Reflex::Type &  contType,
DatabaseSession &  session 
)

Definition at line 42 of file Database.cc.

References ora::Configuration::automaticContainerCreation(), ora::Configuration::automaticDatabaseCreation(), and throwException().

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

                     {
      if( session.configuration().properties().getFlag( Configuration::automaticDatabaseCreation()) ||
          session.configuration().properties().getFlag( Configuration::automaticContainerCreation() ) ){
        contHandle = session.createContainer( name, contType );
      } else {
        throwException("Container \""+name+"\" does not exist in the database.",
                       "Database::insertItem");
      }
    }

    return Container( contHandle );
  }
}
data refman pasoursint CMSSW_5_3_10 src CondCore ORA src ContainerSchema cc data refman pasoursint CMSSW_5_3_10 src CondCore ORA src ContainerSchema cc data refman pasoursint CMSSW_5_3_10 src CondCore ORA src ContainerSchema cc data refman pasoursint CMSSW_5_3_10 src CondCore ORA src ContainerSchema cc void ora::getTableHierarchyFromMappingElement ( const MappingElement &  source,
std::map< std::string, std::set< std::string > > &  tableList 
)

Definition at line 20 of file ContainerSchema.cc.

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

                                {
      std::set<std::string> dependencies;
      tableList.insert(std::make_pair( tableName, dependencies ) );
    }
    for( MappingElement::const_iterator iElem = source.begin();
         iElem != source.end(); iElem++ ){
      std::map<std::string, std::set<std::string> >::iterator iT = tableList.find( tableName );
      const std::string& innerTable = iElem->second.tableName();
      if( innerTable != tableName ){
        iT->second.insert( innerTable );
      }
      getTableHierarchyFromMappingElement( iElem->second, tableList );
    }
  }
  
  void addFromTableHierarchy( const std::string& tableName,
                              std::map<std::string, std::set<std::string> >& tableList,
                              std::vector<std::string>& orderedList ){
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().

                            {
  Guid tmp;
  tmp.fromTime();
  return tmp.toString();
}
data refman pasoursint CMSSW_5_3_10 src CondCore ORA src ObjectStreamer cc bool ora::isLoosePersistencyDataMember ( const Reflex::Member &  dataMember)

Definition at line 14 of file ObjectStreamer.cc.

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

                                                                                      {
       persistencyType = memberProps.PropertyAsString(ora::MappingRules::persistencyPropertyNameInDictionary());
    }
    return ora::MappingRules::isLooseOnWriting( persistencyType ) || ora::MappingRules::isLooseOnReading( persistencyType ) ;
  }

bool ora::isLoosePersistencyOnWriting ( const Reflex::Member &  dataMember)

Definition at line 535 of file RelationalMapping.cc.

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

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

                                                                    {
    std::string persistencyType("");
    Reflex::PropertyList memberProps = dataMember.Properties();
    if( memberProps.HasProperty(ora::MappingRules::persistencyPropertyNameInDictionary())){
       persistencyType = memberProps.PropertyAsString(ora::MappingRules::persistencyPropertyNameInDictionary());
    }
    return ora::MappingRules::isLooseOnWriting( persistencyType );
  }
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().

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

Definition at line 14 of file NamedRefStreamer.cc.

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

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

Definition at line 9 of file IDatabaseSchema.cc.

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

                                {
  static std::string s_version("POOL");
  return s_version;
}
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(), className(), i, isLoosePersistencyOnWriting(), ora::MappingRules::isMappedToBlob(), j, ora::MappingRules::mappingPropertyNameInDictionary(), ora::RelationalMappingFactory::newProcessor(), ora::ClassUtils::resolvedType(), ora::MappingRules::scopedVariableForSchemaObjects(), ora::MappingRules::scopedVariableName(), and throwException().

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

                                                         {
    std::string className = objType.Name(Reflex::SCOPED);
    for ( size_t i=0; i< objType.BaseSize(); i++){
      Reflex::Base base = objType.BaseAt(i);
      Reflex::Type baseType = ClassUtils::resolvedType( base.ToType() );
      if(!baseType){
        throwException( "Class for base \""+base.Name()+"\" is not in the dictionary.","ObjectMapping::process");
      }

      // TO BE FIXED:: here there is still to fix the right scopeName to pass 
      processBaseClasses( mappingElement, baseType, scopeNameForSchema, tableRegister );
      for ( size_t j=0; j< baseType.DataMemberSize(); j++){
        Reflex::Member baseMember = baseType.DataMemberAt(j);
        // Skip the transient and the static ones
        if ( baseMember.IsTransient() || baseMember.IsStatic() || isLoosePersistencyOnWriting( baseMember ) ) continue;
        // Retrieve the data member type
        Reflex::Type type = ClassUtils::resolvedType( baseMember.TypeOf() );
        Reflex::Type declaringType = ClassUtils::resolvedType( baseMember.DeclaringType());
        std::string scope = declaringType.Name(Reflex::SCOPED);
        // Retrieve the field name
        std::string objectMemberName = ora::MappingRules::scopedVariableName( baseMember.Name(), scope );
        std::string objectMemberNameForSchema = ora::MappingRules::scopedVariableForSchemaObjects( baseMember.Name(), scope );

        std::string mappingType("");
        Reflex::PropertyList memberProps = baseMember.Properties();
        if( memberProps.HasProperty(ora::MappingRules::mappingPropertyNameInDictionary())){
          mappingType = memberProps.PropertyAsString(ora::MappingRules::mappingPropertyNameInDictionary());
        }
        bool blobStreaming = ora::MappingRules::isMappedToBlob( mappingType );
        
        RelationalMappingFactory mappingFactory( tableRegister );
        std::auto_ptr<IRelationalMapping> processor( mappingFactory.newProcessor( type, blobStreaming ) );
        processor->process( mappingElement, objectMemberName, objectMemberNameForSchema, scopeNameForSchema );
      }
    }
  }
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(), ora::MappingElement::tableName(), and throwException().

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

                                                        {
    if(!tableRegister.checkTable( parentElement.tableName())){
      throwException("Table \""+parentElement.tableName()+"\" has not been allocated.",
                     "processLeafElement");
    }
    ora::MappingElement& me = parentElement.appendSubElement( elementType, attributeName, typeName, parentElement.tableName() );
    std::string inputCol = ora::MappingRules::columnNameForVariable( attributeNameForSchema, scopeNameForSchema );
    std::string columnName(inputCol);
    unsigned int i=0;
    while(tableRegister.checkColumn(parentElement.tableName(),columnName)){
      columnName = ora::MappingRules::newNameForSchemaObject( inputCol, i, ora::MappingRules::MaxColumnNameLength );
      i++;
    }
    tableRegister.insertColumn(parentElement.tableName(),columnName);
    std::vector<std::string> cols;
    cols.push_back( columnName );
    // add metadata column for blobs 
    if( elementType == ora::MappingElement::blobMappingElementType() ){
      std::string metaDataColumnName = ora::MappingRules::columnNameForBlobMetadata( columnName );
      tableRegister.insertColumn(parentElement.tableName(),metaDataColumnName );
      cols.push_back( metaDataColumnName );      
    }
    me.setColumnNames( cols );
  }
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(), ora::MappingElement::tableName(), throwException(), and ora::MappingElement::variableName().

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

                                                                                    {
    const std::string& tableName = element.tableName();
    std::set<std::string>::iterator iT = tableRegister.find( tableName );
    if( iT == tableRegister.end() ){
      if( element.columnNames().empty() ){
        throwException( "Mapping element for variable \""+element.variableName()+"\" does not specify column names.",
                        "MappingElement::tableHierarchy");
      }
      tableRegister.insert( tableName );
      tableList.push_back( std::make_pair(tableName,element.columnNames()[0]) );
    }
    for(MappingElement::const_iterator iEl = element.begin();
        iEl != element.end(); ++iEl ){
      processTableHierarchy( iEl->second, tableRegister, tableList );
    }
  }
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().

                                                                                                                                                                                                {
    std::map<std::string, std::vector<MappingRawElement> >::const_iterator iSc = elementsByScope.find( scope );
    if( iSc != elementsByScope.end() ){
      for( std::vector<MappingRawElement>::const_iterator iMap = iSc->second.begin();
           iMap != iSc->second.end(); ++iMap ){
        MappingRawElement& elem = dest.addElement( counter ) = *iMap;
        elem.scopeName = extraScope+"::"+iMap->scopeName;
        counter++;
        rebuildPoolMapping( scope+"::"+iMap->variableName, extraScope, elementsByScope, dest, 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, ora::MappingElement::tableName(), ora::MappingElement::UniqueReference, and ora::MappingElement::variableType().

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

                                                           {
    const std::string& tName = element.tableName();
    std::map<std::string,TableInfo>::iterator iT = tableMap.find( tName );
    if( iT == tableMap.end() ){
      tableHierarchy.push_back( tName );
      iT = tableMap.insert( std::make_pair( tName, TableInfo() ) ).first;
      iT->second.m_dependency = isDependency;
      iT->second.m_tableName = tName;
      iT->second.m_idColumns = element.columnNames();
      iT->second.m_parentTableName = currentTable.m_tableName;
      iT->second.m_refColumns = currentTable.m_idColumns;
    } else {
      const std::vector<std::string>& dataCols = element.columnNames();
      MappingElement::ElementType elementType = element.elementType();
      switch ( elementType ) {
        case MappingElement::Primitive :
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
                                                           element.variableType() ));
          break;
        case MappingElement::Blob :
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
                                                           coral::AttributeSpecification::typeNameForId( typeid(coral::Blob) ) ));
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
                                                           coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
          iT->second.m_nullableColumns.insert( dataCols[1] );
          break;
        case MappingElement::OraReference :
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
                                                           coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
                                                           coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
          break;
        case MappingElement::NamedReference :
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
                                                           coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));   
          break;
        case MappingElement::UniqueReference :
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
                                                           coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
          iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
                                                           coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
          break;
        default:
          break;
      }
    }
    TableInfo currT = iT->second;
    for( MappingElement::const_iterator iM = element.begin();
         iM != element.end(); ++iM ){
      scanElement( iM->second, currT, isDependency, tableHierarchy, tableMap );
    }
  }
void ora::setTableAccessPermission ( coral::ITable &  table,
const std::string &  principal,
bool  forWrite 
)

Definition at line 14 of file IDatabaseSchema.cc.

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

                                                   {
  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Select );
  if(forWrite){
    table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Update );
    table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Insert );
    table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Delete );
  } 
}
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(), and Exception.

                                                    {
    std::string className = ClassUtils::demangledName( sourceType );
    throw Exception( message, className+"::"+methodName );
  }
void ora::throwException ( const std::string &  message,
const std::string &  methodName 
)

Definition at line 10 of file Exception.cc.

References 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::NamedReferenceStreamerBase::bindDataForRead(), ora::OraReferenceStreamerBase::bindDataForRead(), ora::NamedReferenceStreamerBase::bindDataForUpdate(), ora::PrimitiveStreamerBase::bindDataForUpdate(), ora::OraReferenceStreamerBase::bindDataForUpdate(), ora::MultiIndexDataTrie::branchSize(), ora::UniqueRefReader::build(), ora::STLContainerWriter::build(), ora::DependentClassReader::build(), ora::OraPtrWriter::build(), ora::CArrayWriter::build(), ora::BlobReader::build(), ora::STLContainerReader::build(), ora::DependentClassWriter::build(), ora::CArrayReader::build(), ora::UniqueRefWriter::build(), ora::OraPtrUpdater::build(), ora::ObjectStreamerBase::buildBaseDataMembers(), ora::NamedReferenceStreamerBase::buildDataElement(), ora::PrimitiveStreamerBase::buildDataElement(), ora::BlobWriterBase::buildDataElement(), ora::OraReferenceStreamerBase::buildDataElement(), ora::InlineCArrayStreamerBase::buildDataElement(), ora::ObjectStreamerBase::buildDataMembers(), ora::Object::cast(), checkString(), ora::Database::checkTransaction(), ora::DatabaseUtilitySession::containerHandle(), ora::Database::containerHandle(), ora::OraMappingElementTable::create(), ora::PoolContainerHeaderTable::create(), ora::OraContainerHeaderTable::create(), ora::PoolMappingElementTable::create(), ora::PoolMainTable::create(), ora::OraMappingVersionTable::create(), ora::OraNamingServiceTable::create(), ora::OraSequenceTable::create(), ora::OraMainTable::create(), ora::CondMetadataTable::create(), ora::PoolMappingVersionTable::create(), ora::PoolDatabaseSchema::create(), ora::PoolClassVersionTable::create(), ora::PoolSequenceTable::create(), ora::OraClassVersionTable::create(), ora::Database::createContainer(), ora::MappingGenerator::createNewDependentMapping(), ora::MappingGenerator::createNewMapping(), ora::MultiRecordSelectOperation::data(), ora::SelectOperation::data(), ora::PoolContainerHeaderTable::decrementNumberOfObjects(), ora::Object::destruct(), ora::CondMetadataTable::drop(), ora::DatabaseContainer::drop(), ora::DatabaseSession::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(), 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::DatabaseContainer::insertItem(), ora::Container::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::ArrayMapping::process(), ora::OraReferenceMapping::process(), ora::ObjectMapping::process(), ora::UniqueReferenceMapping::process(), ora::CArrayMapping::process(), processBaseClasses(), processLeafElement(), processTableHierarchy(), ora::Ptr< T >::ptr(), ora::UniqueRef< T >::ptr(), ora::MultiIndexDataTrie::push(), ora::PVectorHandler::PVectorHandler(), ora::QueryableVector< Tp >::query(), ora::CArrayReader::read(), ora::DependentClassReader::read(), ora::BlobReader::read(), ora::OraPtrReader::read(), ora::UniqueRefReader::read(), ora::STLContainerReader::read(), ora::QueryableVectorReader::read(), ora::ReadBuffer::ReadBuffer(), ora::MappingElement::recordIdColumns(), ora::PoolContainerHeaderTable::removeContainer(), ora::NamedRef< T >::safePtr(), ora::Database::schemaVersion(), ora::CArrayReader::select(), ora::OraPtrReader::select(), ora::QueryableVector< Tp >::select(), ora::STLContainerReader::select(), ora::QVQueryMaker::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::STLContainerWriter::write(), ora::QueryableVectorWriter::write(), ora::CArrayWriter::write(), ora::DependentClassWriter::write(), ora::OraPtrWriter::write(), and ora::UniqueRefWriter::write().

                                                    {
    throw Exception( message, methodName );
  }
std::string ora::uniqueRefNullLabel ( )

Definition at line 184 of file UniqueRefStreamer.cc.

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

                                 {
  static std::string nullLabel("ora::UniqueRef::Null");
  return nullLabel;
}
static 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().

                                                                 {
    size_t ind = variableName.find("pool::PVector");
    if( ind != std::string::npos ){
      return "ora::PVector"+variableName.substr(13);
    }
    return variableName;
  }