test
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
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)
 
std::string name ()
 
 PoolMainTable (coral::ISchema &dbSchema)
 
std::string schemaVersion ()
 
void setParameter (const std::string &paramName, const std::string &paramValue)
 
virtual ~PoolMainTable ()
 
- Public Member Functions inherited from ora::IMainTable
 IMainTable (coral::ISchema &schema)
 
virtual ~IMainTable ()
 
- Public Member Functions inherited from ora::IDatabaseTable
 IDatabaseTable (coral::ISchema &schema)
 
coral::ISchema & schema ()
 
virtual void setAccessPermission (const std::string &principal, bool forWrite)
 
virtual ~IDatabaseTable ()
 

Static Public Member Functions

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

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.

32  :
33  IMainTable( dbSchema ){
34 }
IMainTable(coral::ISchema &schema)
ora::PoolMainTable::~PoolMainTable ( )
virtual

Definition at line 36 of file PoolDatabaseSchema.cc.

36  {
37 }

Member Function Documentation

void ora::PoolMainTable::create ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 60 of file PoolDatabaseSchema.cc.

References dataDML::schema, HLT_25ns10e33_v2_cff::tableName, and ora::throwException().

60  {
61  if( schema().existsTable( tableName() )){
62  throwException( "POOL database main table already exists in this schema.",
63  "PoolMainTable::create");
64  }
65  throwException( "POOL database cannot be created.","PoolMainTable::create");
66 }
static std::string tableName()
coral::ISchema & schema()
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
void ora::PoolMainTable::drop ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 68 of file PoolDatabaseSchema.cc.

References dataDML::schema, and HLT_25ns10e33_v2_cff::tableName.

68  {
69  schema().dropIfExistsTable( tableName() );
70 }
static std::string tableName()
coral::ISchema & schema()
bool ora::PoolMainTable::exists ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 56 of file PoolDatabaseSchema.cc.

References dataDML::schema, and HLT_25ns10e33_v2_cff::tableName.

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

56  {
57  return schema().existsTable( tableName() );
58 }
static std::string tableName()
coral::ISchema & schema()
bool ora::PoolMainTable::getParameters ( std::map< std::string, std::string > &  destination)
virtual

Implements ora::IMainTable.

Definition at line 43 of file PoolDatabaseSchema.cc.

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

43  {
44  dest.insert(std::make_pair( IMainTable::versionParameterName(), version() ) );
45  return true;
46 }
static std::string versionParameterName()
static std::string version()
std::string ora::PoolMainTable::name ( )
virtual
std::string ora::PoolMainTable::schemaVersion ( )
virtual

Implements ora::IMainTable.

Definition at line 48 of file PoolDatabaseSchema.cc.

References ora::poolSchemaVersion().

48  {
49  return poolSchemaVersion();
50 }
std::string poolSchemaVersion()
void ora::PoolMainTable::setParameter ( const std::string &  paramName,
const std::string &  paramValue 
)
virtual
std::string ora::PoolMainTable::tableName ( )
static

Definition at line 27 of file PoolDatabaseSchema.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

27  {
28  static const std::string s_name("POOL_RSS_DB");
29  return s_name;
30 }
std::string ora::PoolMainTable::version ( )
static

Definition at line 22 of file PoolDatabaseSchema.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

22  {
23  static const std::string s_version("POOL");
24  return s_version;
25 }