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

#include <PoolDatabaseSchema.h>

Inheritance diagram for ora::PoolMappingVersionTable:
ora::IDatabaseTable

Public Member Functions

void create ()
 
void drop ()
 
bool exists ()
 
 PoolMappingVersionTable (coral::ISchema &dbSchema)
 
virtual ~PoolMappingVersionTable ()
 
- Public Member Functions inherited from ora::IDatabaseTable
virtual ~IDatabaseTable ()
 

Static Public Member Functions

static std::string containerNameColumn ()
 
static std::string mappingVersionColumn ()
 
static std::string tableName ()
 

Private Attributes

coral::ISchema & m_schema
 

Detailed Description

Definition at line 87 of file PoolDatabaseSchema.h.

Constructor & Destructor Documentation

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

Definition at line 203 of file PoolDatabaseSchema.cc.

203  :
204  m_schema( dbSchema ){
205 }
ora::PoolMappingVersionTable::~PoolMappingVersionTable ( )
virtual

Definition at line 207 of file PoolDatabaseSchema.cc.

207  {
208 }

Member Function Documentation

std::string ora::PoolMappingVersionTable::containerNameColumn ( )
static

Definition at line 198 of file PoolDatabaseSchema.cc.

198  {
199  static std::string s_col("CONTAINER_ID");
200  return s_col;
201 }
void ora::PoolMappingVersionTable::create ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 214 of file PoolDatabaseSchema.cc.

References ora::throwException().

214  {
215  if( m_schema.existsTable( tableName() )){
216  throwException( "POOL database mapping version table already exists in this schema.",
217  "PoolMappingVersionTable::create");
218  }
219  throwException( "POOL database cannot be created.","PoolMappingVersionTable::create");
220 }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:10
void ora::PoolMappingVersionTable::drop ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 222 of file PoolDatabaseSchema.cc.

222  {
223  m_schema.dropIfExistsTable( tableName() );
224 }
bool ora::PoolMappingVersionTable::exists ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 210 of file PoolDatabaseSchema.cc.

210  {
211  return m_schema.existsTable( tableName() );
212 }
std::string ora::PoolMappingVersionTable::mappingVersionColumn ( )
static

Definition at line 193 of file PoolDatabaseSchema.cc.

Referenced by ora::PoolMappingSchema::getVersionList(), ora::PoolMappingSchema::removeMapping(), and ora::PoolMappingSchema::storeMapping().

193  {
194  static std::string s_col("MAPPING_VERSION");
195  return s_col;
196 }
std::string ora::PoolMappingVersionTable::tableName ( )
static

Definition at line 188 of file PoolDatabaseSchema.cc.

Referenced by ora::PoolMappingSchema::getVersionList(), ora::PoolMappingSchema::removeMapping(), and ora::PoolMappingSchema::storeMapping().

188  {
189  static std::string s_table("POOL_OR_MAPPING_VERSIONS");
190  return s_table;
191 }

Member Data Documentation

coral::ISchema& ora::PoolMappingVersionTable::m_schema
private

Definition at line 100 of file PoolDatabaseSchema.h.