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 49 of file OraDatabaseSchema.h.


Constructor & Destructor Documentation

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

Definition at line 237 of file OraDatabaseSchema.cc.

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

Definition at line 241 of file OraDatabaseSchema.cc.

                                                  {
}

Member Function Documentation

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

Implements ora::IDatabaseTable.

Definition at line 252 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 );
  //.privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select );
}
void ora::OraMappingVersionTable::drop ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 268 of file OraDatabaseSchema.cc.

References python::IdGenerator::schema.

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

Implements ora::IDatabaseTable.

Definition at line 248 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 244 of file OraDatabaseSchema.cc.

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