CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ora::PoolDatabaseSchema Class Reference

#include <PoolDatabaseSchema.h>

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

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 ()
 
- Public Member Functions inherited from ora::IDatabaseSchema
 IDatabaseSchema (coral::ISchema &schema)
 
coral::ISchema & storageSchema ()
 
virtual ~IDatabaseSchema ()
 

Static Public Member Functions

static bool existsMainTable (coral::ISchema &dbSchema)
 
- Static Public Member Functions inherited from ora::IDatabaseSchema
static IDatabaseSchemacreateSchemaHandle (coral::ISchema &schema)
 

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

Definition at line 1340 of file PoolDatabaseSchema.cc.

References ora::PoolSequenceTable::init(), ora::PoolContainerHeaderTable::init(), ora::PoolMappingSchema::init(), m_containerHeaderTable, m_dbCache, m_mappingSchema, and m_sequenceTable.

1340  :
1341  IDatabaseSchema( dbSchema ),
1342  m_schema( dbSchema ),
1343  m_dbCache(),
1344  m_mainTable( dbSchema ),
1345  m_sequenceTable( dbSchema ),
1346  m_mappingVersionTable( dbSchema ),
1347  m_mappingElementTable( dbSchema ),
1348  m_containerHeaderTable( dbSchema ),
1349  m_classVersionTable( dbSchema ),
1350  m_mappingSchema( dbSchema ),
1351  m_metadataTable( dbSchema, m_dbCache ){
1355 }
void init(PoolDbCache &dbCache)
PoolMappingSchema m_mappingSchema
PoolClassVersionTable m_classVersionTable
void init(PoolDbCache &dbCache)
PoolMappingElementTable m_mappingElementTable
PoolSequenceTable m_sequenceTable
CondMetadataTable m_metadataTable
IDatabaseSchema(coral::ISchema &schema)
void init(PoolDbCache &dbCache)
PoolMappingVersionTable m_mappingVersionTable
PoolContainerHeaderTable m_containerHeaderTable
ora::PoolDatabaseSchema::~PoolDatabaseSchema ( )
virtual

Definition at line 1357 of file PoolDatabaseSchema.cc.

1357  {
1358 }

Member Function Documentation

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

Implements ora::IDatabaseSchema.

Definition at line 1424 of file PoolDatabaseSchema.cc.

1424  {
1425  return m_classVersionTable;
1426 }
PoolClassVersionTable m_classVersionTable
ora::IContainerHeaderTable & ora::PoolDatabaseSchema::containerHeaderTable ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1420 of file PoolDatabaseSchema.cc.

1420  {
1421  return m_containerHeaderTable;
1422 }
PoolContainerHeaderTable m_containerHeaderTable
void ora::PoolDatabaseSchema::create ( const std::string &  userSchemaVersion)
virtual

Implements ora::IDatabaseSchema.

Definition at line 1380 of file PoolDatabaseSchema.cc.

References ora::throwException().

1380  {
1381  throwException( "POOL database cannot be created.","PoolDatabaseSchema::create");
1382 }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
void ora::PoolDatabaseSchema::drop ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1384 of file PoolDatabaseSchema.cc.

bool ora::PoolDatabaseSchema::exists ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1360 of file PoolDatabaseSchema.cc.

References ora::throwException().

1360  {
1361  if(!m_mainTable.exists()){
1362  return false;
1363  }
1364 
1365  if(!m_sequenceTable.exists() ||
1370  throwException( "POOL database is corrupted..",
1371  "PoolDatabaseSchema::exists");
1372  }
1373  if( !m_metadataTable.exists()){
1374  throwException( "Metadata table has not been found.",
1375  "PoolDatabaseSchema::exists");
1376  }
1377  return true;
1378 }
PoolClassVersionTable m_classVersionTable
PoolMappingElementTable m_mappingElementTable
PoolSequenceTable m_sequenceTable
CondMetadataTable m_metadataTable
PoolMappingVersionTable m_mappingVersionTable
PoolContainerHeaderTable m_containerHeaderTable
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
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().

1335  {
1336  PoolMainTable tmp( dbSchema );
1337  return tmp.exists();
1338 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
ora::IMainTable & ora::PoolDatabaseSchema::mainTable ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1404 of file PoolDatabaseSchema.cc.

1404  {
1405  return m_mainTable;
1406 }
ora::IDatabaseTable & ora::PoolDatabaseSchema::mappingElementTable ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1416 of file PoolDatabaseSchema.cc.

1416  {
1417  return m_mappingElementTable;
1418 }
PoolMappingElementTable m_mappingElementTable
ora::IMappingSchema & ora::PoolDatabaseSchema::mappingSchema ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1428 of file PoolDatabaseSchema.cc.

1428  {
1429  return m_mappingSchema;
1430 }
PoolMappingSchema m_mappingSchema
ora::IDatabaseTable & ora::PoolDatabaseSchema::mappingVersionTable ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1412 of file PoolDatabaseSchema.cc.

1412  {
1413  return m_mappingVersionTable;
1414 }
PoolMappingVersionTable m_mappingVersionTable
ora::INamingServiceTable & ora::PoolDatabaseSchema::namingServiceTable ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1432 of file PoolDatabaseSchema.cc.

1432  {
1433  return m_metadataTable;
1434 }
CondMetadataTable m_metadataTable
ora::ISequenceTable & ora::PoolDatabaseSchema::sequenceTable ( )
virtual

Implements ora::IDatabaseSchema.

Definition at line 1408 of file PoolDatabaseSchema.cc.

1408  {
1409  return m_sequenceTable;
1410 }
PoolSequenceTable m_sequenceTable
void ora::PoolDatabaseSchema::setAccessPermission ( const std::string &  principal,
bool  forWrite 
)
virtual

Implements ora::IDatabaseSchema.

Definition at line 1393 of file PoolDatabaseSchema.cc.

1394  {
1402 }
PoolClassVersionTable m_classVersionTable
PoolMappingElementTable m_mappingElementTable
PoolSequenceTable m_sequenceTable
CondMetadataTable m_metadataTable
PoolMappingVersionTable m_mappingVersionTable
PoolContainerHeaderTable m_containerHeaderTable
virtual void setAccessPermission(const std::string &principal, bool forWrite)
bool ora::PoolDatabaseSchema::testDropPermission ( )
inlinevirtual

Implements ora::IDatabaseSchema.

Definition at line 246 of file PoolDatabaseSchema.h.

246  {
247  return false;
248  }

Member Data Documentation

PoolClassVersionTable ora::PoolDatabaseSchema::m_classVersionTable
private

Definition at line 258 of file PoolDatabaseSchema.h.

PoolContainerHeaderTable ora::PoolDatabaseSchema::m_containerHeaderTable
private

Definition at line 257 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().

PoolDbCache ora::PoolDatabaseSchema::m_dbCache
private

Definition at line 252 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().

PoolMainTable ora::PoolDatabaseSchema::m_mainTable
private

Definition at line 253 of file PoolDatabaseSchema.h.

PoolMappingElementTable ora::PoolDatabaseSchema::m_mappingElementTable
private

Definition at line 256 of file PoolDatabaseSchema.h.

PoolMappingSchema ora::PoolDatabaseSchema::m_mappingSchema
private

Definition at line 259 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().

PoolMappingVersionTable ora::PoolDatabaseSchema::m_mappingVersionTable
private

Definition at line 255 of file PoolDatabaseSchema.h.

CondMetadataTable ora::PoolDatabaseSchema::m_metadataTable
private

Definition at line 260 of file PoolDatabaseSchema.h.

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

Definition at line 251 of file PoolDatabaseSchema.h.

PoolSequenceTable ora::PoolDatabaseSchema::m_sequenceTable
private

Definition at line 254 of file PoolDatabaseSchema.h.

Referenced by PoolDatabaseSchema().