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

#include <OraDatabaseSchema.h>

Inheritance diagram for ora::OraMappingVersionTable:
ora::IDatabaseTable

Public Member Functions

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

Detailed Description

Definition at line 52 of file OraDatabaseSchema.h.

Constructor & Destructor Documentation

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

Definition at line 242 of file OraDatabaseSchema.cc.

242  :
243  IDatabaseTable( dbSchema ){
244 }
IDatabaseTable(coral::ISchema &schema)
ora::OraMappingVersionTable::~OraMappingVersionTable ( )
virtual

Definition at line 246 of file OraDatabaseSchema.cc.

246  {
247 }

Member Function Documentation

void ora::OraMappingVersionTable::create ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 257 of file OraDatabaseSchema.cc.

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

257  {
258  if( schema().existsTable( tableName() )){
259  throwException( "ORA database mapping version table already exists in this schema.",
260  "OraMappingVersionTable::create");
261  }
262  // version table
263  coral::TableDescription description0( "OraDb" );
264  description0.setName( tableName() );
265  description0.insertColumn( mappingVersionColumn(),
266  coral::AttributeSpecification::typeNameForType<std::string>(), 1000, false);
267  description0.setNotNullConstraint( mappingVersionColumn() );
268  description0.setPrimaryKey( mappingVersionColumn() );
269  schema().createTable( description0 );
270 }
static std::string tableName()
coral::ISchema & schema()
static std::string mappingVersionColumn()
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
void ora::OraMappingVersionTable::drop ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 272 of file OraDatabaseSchema.cc.

References python.IdGenerator::schema, and HLT_25ns14e33_v1_cff::tableName.

272  {
273  schema().dropIfExistsTable( tableName() );
274 }
static std::string tableName()
coral::ISchema & schema()
bool ora::OraMappingVersionTable::exists ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 253 of file OraDatabaseSchema.cc.

References python.IdGenerator::schema, and HLT_25ns14e33_v1_cff::tableName.

253  {
254  return schema().existsTable( tableName() );
255 }
static std::string tableName()
coral::ISchema & schema()
std::string ora::OraMappingVersionTable::mappingVersionColumn ( )
static
std::string ora::OraMappingVersionTable::name ( )
virtual
std::string ora::OraMappingVersionTable::tableName ( )
static