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

#include <PoolDatabaseSchema.h>

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

Public Member Functions

void create ()
 
void drop ()
 
bool exists ()
 
std::string name ()
 
 PoolMappingVersionTable (coral::ISchema &dbSchema)
 
virtual ~PoolMappingVersionTable ()
 
- 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 containerNameColumn ()
 
static std::string mappingVersionColumn ()
 
static std::string tableName ()
 

Detailed Description

Definition at line 88 of file PoolDatabaseSchema.h.

Constructor & Destructor Documentation

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

Definition at line 221 of file PoolDatabaseSchema.cc.

221  :
222  IDatabaseTable( dbSchema ){
223 }
IDatabaseTable(coral::ISchema &schema)
ora::PoolMappingVersionTable::~PoolMappingVersionTable ( )
virtual

Definition at line 225 of file PoolDatabaseSchema.cc.

225  {
226 }

Member Function Documentation

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

Definition at line 216 of file PoolDatabaseSchema.cc.

216  {
217  static std::string s_col("CONTAINER_ID");
218  return s_col;
219 }
void ora::PoolMappingVersionTable::create ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 236 of file PoolDatabaseSchema.cc.

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

236  {
237  if( schema().existsTable( tableName() )){
238  throwException( "POOL database mapping version table already exists in this schema.",
239  "PoolMappingVersionTable::create");
240  }
241  throwException( "POOL database cannot be created.","PoolMappingVersionTable::create");
242 }
coral::ISchema & schema()
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 244 of file PoolDatabaseSchema.cc.

References python.IdGenerator::schema.

244  {
245  schema().dropIfExistsTable( tableName() );
246 }
coral::ISchema & schema()
bool ora::PoolMappingVersionTable::exists ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 232 of file PoolDatabaseSchema.cc.

References python.IdGenerator::schema.

232  {
233  return schema().existsTable( tableName() );
234 }
coral::ISchema & schema()
std::string ora::PoolMappingVersionTable::mappingVersionColumn ( )
static

Definition at line 211 of file PoolDatabaseSchema.cc.

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

211  {
212  static std::string s_col("MAPPING_VERSION");
213  return s_col;
214 }
std::string ora::PoolMappingVersionTable::name ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 228 of file PoolDatabaseSchema.cc.

Referenced by Vispa.Views.PropertyView.Property::valueChanged().

228  {
229  return tableName();
230 }
std::string ora::PoolMappingVersionTable::tableName ( )
static

Definition at line 206 of file PoolDatabaseSchema.cc.

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

206  {
207  static std::string s_table("POOL_OR_MAPPING_VERSIONS");
208  return s_table;
209 }