CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions

ora::OraMappingVersionTable Class Reference

#include <OraDatabaseSchema.h>

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

List of all members.

Public Member Functions

void create ()
void drop ()
bool exists ()
std::string name ()
 OraMappingVersionTable (coral::ISchema &dbSchema)
virtual ~OraMappingVersionTable ()

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.

                                                                          :
  IDatabaseTable( dbSchema ){
}
ora::OraMappingVersionTable::~OraMappingVersionTable ( ) [virtual]

Definition at line 246 of file OraDatabaseSchema.cc.

                                                  {
}

Member Function Documentation

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

Implements ora::IDatabaseTable.

Definition at line 257 of file OraDatabaseSchema.cc.

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

                                      {
  if( schema().existsTable( tableName() )){
    throwException( "ORA database mapping version table already exists in this schema.",
                    "OraMappingVersionTable::create");
  }
  // version table
  coral::TableDescription  description0( "OraDb" );
  description0.setName( tableName() );
  description0.insertColumn( mappingVersionColumn(),
                             coral::AttributeSpecification::typeNameForType<std::string>(), 1000, false);
  description0.setNotNullConstraint( mappingVersionColumn() );
  description0.setPrimaryKey( mappingVersionColumn() );
  schema().createTable( description0 );
}
void ora::OraMappingVersionTable::drop ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 272 of file OraDatabaseSchema.cc.

References python::IdGenerator::schema.

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

Implements ora::IDatabaseTable.

Definition at line 253 of file OraDatabaseSchema.cc.

References python::IdGenerator::schema.

                                      {
  return schema().existsTable( tableName() );
}
std::string ora::OraMappingVersionTable::mappingVersionColumn ( ) [static]
std::string ora::OraMappingVersionTable::name ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 249 of file OraDatabaseSchema.cc.

                                         {
  return tableName();
}
std::string ora::OraMappingVersionTable::tableName ( ) [static]