CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Attributes

ora::PoolDatabaseSchema Class Reference

#include <PoolDatabaseSchema.h>

Inheritance diagram for ora::PoolDatabaseSchema:
ora::IDatabaseSchema

List of all members.

Public Member Functions

IDatabaseTableclassVersionTable ()
IContainerHeaderTablecontainerHeaderTable ()
void create (const std::string &userSchemaVersion)
void drop ()
bool exists ()
IMainTablemainTable ()
IDatabaseTablemappingElementTable ()
IMappingSchemamappingSchema ()
IDatabaseTablemappingVersionTable ()
INamingServiceTablenamingServiceTable ()
 PoolDatabaseSchema (coral::ISchema &dbSchema)
ISequenceTablesequenceTable ()
void setAccessPermission (const std::string &principal, bool forWrite)
bool testDropPermission ()
virtual ~PoolDatabaseSchema ()

Static Public Member Functions

static bool existsMainTable (coral::ISchema &dbSchema)

Private Attributes

PoolClassVersionTable m_classVersionTable
PoolContainerHeaderTable m_containerHeaderTable
PoolDbCache m_dbCache
PoolMainTable m_mainTable
PoolMappingElementTable m_mappingElementTable
PoolMappingSchema m_mappingSchema
PoolMappingVersionTable m_mappingVersionTable
CondMetadataTable m_metadataTable
coral::ISchema & m_schema
PoolSequenceTable m_sequenceTable

Detailed Description

Definition at line 226 of file PoolDatabaseSchema.h.


Constructor & Destructor Documentation

ora::PoolDatabaseSchema::PoolDatabaseSchema ( coral::ISchema &  dbSchema) [explicit]
ora::PoolDatabaseSchema::~PoolDatabaseSchema ( ) [virtual]

Definition at line 1357 of file PoolDatabaseSchema.cc.

                                          {
}

Member Function Documentation

ora::IDatabaseTable & ora::PoolDatabaseSchema::classVersionTable ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1424 of file PoolDatabaseSchema.cc.

                                                           {
  return m_classVersionTable;  
}
ora::IContainerHeaderTable & ora::PoolDatabaseSchema::containerHeaderTable ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1420 of file PoolDatabaseSchema.cc.

void ora::PoolDatabaseSchema::create ( const std::string &  userSchemaVersion) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1380 of file PoolDatabaseSchema.cc.

References ora::throwException().

                                                    {
  throwException( "POOL database cannot be created.","PoolDatabaseSchema::create");  
}
void ora::PoolDatabaseSchema::drop ( ) [virtual]
bool ora::PoolDatabaseSchema::exists ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1360 of file PoolDatabaseSchema.cc.

References ora::throwException().

                                  {
  if(!m_mainTable.exists()){
    return false;
  }

  if(!m_sequenceTable.exists() ||
     !m_mappingVersionTable.exists() ||
     !m_mappingElementTable.exists() ||
     !m_containerHeaderTable.exists() ||
     !m_classVersionTable.exists()){
    throwException( "POOL database is corrupted..",
                    "PoolDatabaseSchema::exists");
  }
  if( !m_metadataTable.exists()){
    throwException( "Metadata table has not been found.",
                    "PoolDatabaseSchema::exists");    
  }
  return true;
}
bool ora::PoolDatabaseSchema::existsMainTable ( coral::ISchema &  dbSchema) [static]

Definition at line 1335 of file PoolDatabaseSchema.cc.

References ora::PoolMainTable::exists(), and tmp.

Referenced by ora::IDatabaseSchema::createSchemaHandle().

                                                                   {
  PoolMainTable tmp( dbSchema );
  return tmp.exists();
}
ora::IMainTable & ora::PoolDatabaseSchema::mainTable ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1404 of file PoolDatabaseSchema.cc.

                                               {
  return m_mainTable;
}
ora::IDatabaseTable & ora::PoolDatabaseSchema::mappingElementTable ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1416 of file PoolDatabaseSchema.cc.

                                                             {
  return m_mappingElementTable;  
}
ora::IMappingSchema & ora::PoolDatabaseSchema::mappingSchema ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1428 of file PoolDatabaseSchema.cc.

                                                       {
  return m_mappingSchema;  
}
ora::IDatabaseTable & ora::PoolDatabaseSchema::mappingVersionTable ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1412 of file PoolDatabaseSchema.cc.

                                                             {
  return m_mappingVersionTable;  
}
ora::INamingServiceTable & ora::PoolDatabaseSchema::namingServiceTable ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1432 of file PoolDatabaseSchema.cc.

                                                                 {
  return m_metadataTable;
}
ora::ISequenceTable & ora::PoolDatabaseSchema::sequenceTable ( ) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1408 of file PoolDatabaseSchema.cc.

                                                       {
  return m_sequenceTable;
}
void ora::PoolDatabaseSchema::setAccessPermission ( const std::string &  principal,
bool  forWrite 
) [virtual]

Implements ora::IDatabaseSchema.

Definition at line 1393 of file PoolDatabaseSchema.cc.

                                                                  {
  m_mainTable.setAccessPermission( principal, forWrite );  
  m_sequenceTable.setAccessPermission( principal, forWrite );  
  m_mappingVersionTable.setAccessPermission( principal, forWrite );  
  m_mappingElementTable.setAccessPermission( principal, forWrite );  
  m_containerHeaderTable.setAccessPermission( principal, forWrite );  
  m_classVersionTable.setAccessPermission( principal, forWrite ); 
  m_metadataTable.setAccessPermission( principal, forWrite ); 
}
bool ora::PoolDatabaseSchema::testDropPermission ( ) [inline, virtual]

Implements ora::IDatabaseSchema.

Definition at line 246 of file PoolDatabaseSchema.h.

                             {
      return false;
    }

Member Data Documentation

Definition at line 258 of file PoolDatabaseSchema.h.

Definition at line 257 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().

Definition at line 252 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().

Definition at line 253 of file PoolDatabaseSchema.h.

Definition at line 256 of file PoolDatabaseSchema.h.

Definition at line 259 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().

Definition at line 255 of file PoolDatabaseSchema.h.

Definition at line 260 of file PoolDatabaseSchema.h.

coral::ISchema& ora::PoolDatabaseSchema::m_schema [private]

Reimplemented from ora::IDatabaseSchema.

Definition at line 251 of file PoolDatabaseSchema.h.

Definition at line 254 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().