CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Attributes

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 ()
 OraMappingVersionTable (coral::ISchema &dbSchema)
virtual ~OraMappingVersionTable ()

Static Public Member Functions

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

Private Attributes

coral::ISchema & m_schema

Detailed Description

Definition at line 50 of file OraDatabaseSchema.h.


Constructor & Destructor Documentation

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

Definition at line 215 of file OraDatabaseSchema.cc.

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

Definition at line 219 of file OraDatabaseSchema.cc.

                                                  {
}

Member Function Documentation

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

Implements ora::IDatabaseTable.

Definition at line 226 of file OraDatabaseSchema.cc.

References ora::throwException().

                                      {
  if( m_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() );
  m_schema.createTable( description0 ).privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select );
}
void ora::OraMappingVersionTable::drop ( ) [virtual]

Implements ora::IDatabaseTable.

Definition at line 241 of file OraDatabaseSchema.cc.

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

Implements ora::IDatabaseTable.

Definition at line 222 of file OraDatabaseSchema.cc.

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

Member Data Documentation

coral::ISchema& ora::OraMappingVersionTable::m_schema [private]

Definition at line 62 of file OraDatabaseSchema.h.