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::PoolMainTable Class Reference

#include <PoolDatabaseSchema.h>

Inheritance diagram for ora::PoolMainTable:
ora::IMainTable ora::IDatabaseTable

Public Member Functions

void create ()
 
void drop ()
 
bool exists ()
 
bool getParameters (std::map< std::string, std::string > &destination)
 
 PoolMainTable (coral::ISchema &dbSchema)
 
std::string schemaVersion ()
 
virtual ~PoolMainTable ()
 
- Public Member Functions inherited from ora::IMainTable
virtual ~IMainTable ()
 
- Public Member Functions inherited from ora::IDatabaseTable
virtual ~IDatabaseTable ()
 

Static Public Member Functions

static std::string tableName ()
 
- Static Public Member Functions inherited from ora::IMainTable
static std::string versionParameterName ()
 

Private Attributes

coral::ISchema & m_schema
 

Detailed Description

Definition at line 48 of file PoolDatabaseSchema.h.

Constructor & Destructor Documentation

ora::PoolMainTable::PoolMainTable ( coral::ISchema &  dbSchema)
explicit

Definition at line 27 of file PoolDatabaseSchema.cc.

27  :
28  m_schema( dbSchema ){
29 }
coral::ISchema & m_schema
ora::PoolMainTable::~PoolMainTable ( )
virtual

Definition at line 31 of file PoolDatabaseSchema.cc.

31  {
32 }

Member Function Documentation

void ora::PoolMainTable::create ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 46 of file PoolDatabaseSchema.cc.

References ora::throwException().

46  {
47  if( m_schema.existsTable( tableName() )){
48  throwException( "POOL database main table already exists in this schema.",
49  "PoolMainTable::create");
50  }
51  throwException( "POOL database cannot be created.","PoolMainTable::create");
52 }
static std::string tableName()
coral::ISchema & m_schema
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
void ora::PoolMainTable::drop ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 54 of file PoolDatabaseSchema.cc.

54  {
55  m_schema.dropIfExistsTable( tableName() );
56 }
static std::string tableName()
coral::ISchema & m_schema
bool ora::PoolMainTable::exists ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 42 of file PoolDatabaseSchema.cc.

Referenced by ora::PoolDatabaseSchema::existsMainTable().

42  {
43  return m_schema.existsTable( tableName() );
44 }
static std::string tableName()
coral::ISchema & m_schema
bool ora::PoolMainTable::getParameters ( std::map< std::string, std::string > &  destination)
virtual

Implements ora::IMainTable.

Definition at line 34 of file PoolDatabaseSchema.cc.

34  {
35  return false;
36 }
std::string ora::PoolMainTable::schemaVersion ( )
virtual

Implements ora::IMainTable.

Definition at line 38 of file PoolDatabaseSchema.cc.

References ora::poolSchemaVersion().

38  {
39  return poolSchemaVersion();
40 }
std::string poolSchemaVersion()
std::string ora::PoolMainTable::tableName ( )
static

Definition at line 22 of file PoolDatabaseSchema.cc.

22  {
23  static std::string s_name("POOL_RSS_DB");
24  return s_name;
25 }

Member Data Documentation

coral::ISchema& ora::PoolMainTable::m_schema
private

Definition at line 61 of file PoolDatabaseSchema.h.