CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions

ora::PoolMainTable Class Reference

#include <PoolDatabaseSchema.h>

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

List of all members.

Public Member Functions

void create ()
void drop ()
bool exists ()
bool getParameters (std::map< std::string, std::string > &destination)
std::string name ()
 PoolMainTable (coral::ISchema &dbSchema)
std::string schemaVersion ()
void setParameter (const std::string &paramName, const std::string &paramValue)
virtual ~PoolMainTable ()

Static Public Member Functions

static std::string tableName ()
static std::string version ()

Detailed Description

Definition at line 48 of file PoolDatabaseSchema.h.


Constructor & Destructor Documentation

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

Definition at line 32 of file PoolDatabaseSchema.cc.

                                                       :
  IMainTable( dbSchema ){
}
ora::PoolMainTable::~PoolMainTable ( ) [virtual]

Definition at line 36 of file PoolDatabaseSchema.cc.

                                {
}

Member Function Documentation

void ora::PoolMainTable::create ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 60 of file PoolDatabaseSchema.cc.

References python::IdGenerator::schema, and ora::throwException().

                             {
  if( schema().existsTable( tableName() )){
    throwException( "POOL database main table already exists in this schema.",
                    "PoolMainTable::create");
  }
  throwException( "POOL database cannot be created.","PoolMainTable::create");
}
void ora::PoolMainTable::drop ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 68 of file PoolDatabaseSchema.cc.

References python::IdGenerator::schema.

                           {
  schema().dropIfExistsTable( tableName() );
}
bool ora::PoolMainTable::exists ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 56 of file PoolDatabaseSchema.cc.

References python::IdGenerator::schema.

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

                             {
  return schema().existsTable( tableName() );
}
bool ora::PoolMainTable::getParameters ( std::map< std::string, std::string > &  destination) [virtual]

Implements ora::IMainTable.

Definition at line 43 of file PoolDatabaseSchema.cc.

References BeamSplash_cfg::version, and ora::IMainTable::versionParameterName().

                                                                      {
  dest.insert(std::make_pair( IMainTable::versionParameterName(), version() ) );
  return true;
}
std::string ora::PoolMainTable::name ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 52 of file PoolDatabaseSchema.cc.

                                {
  return tableName();
}
std::string ora::PoolMainTable::schemaVersion ( ) [virtual]

Implements ora::IMainTable.

Definition at line 48 of file PoolDatabaseSchema.cc.

References ora::poolSchemaVersion().

                                         {
  return poolSchemaVersion();
}
void ora::PoolMainTable::setParameter ( const std::string &  paramName,
const std::string &  paramValue 
) [virtual]

Implements ora::IMainTable.

Definition at line 39 of file PoolDatabaseSchema.cc.

                                                         {
}
std::string ora::PoolMainTable::tableName ( ) [static]

Definition at line 27 of file PoolDatabaseSchema.cc.

                                     {
  static std::string s_name("POOL_RSS_DB");
  return s_name;
}
std::string ora::PoolMainTable::version ( ) [static]

Definition at line 22 of file PoolDatabaseSchema.cc.

                                   {
  static std::string s_version("POOL");
  return s_version;
}