#include <OraDatabaseSchema.h>
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 |
Definition at line 50 of file OraDatabaseSchema.h.
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.
{ }
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.
bool ora::OraMappingVersionTable::exists | ( | ) | [virtual] |
Implements ora::IDatabaseTable.
Definition at line 222 of file OraDatabaseSchema.cc.
std::string ora::OraMappingVersionTable::mappingVersionColumn | ( | ) | [static] |
Definition at line 210 of file OraDatabaseSchema.cc.
Referenced by ora::OraMappingElementTable::create(), ora::OraClassVersionTable::create(), ora::OraMappingSchema::getVersionList(), ora::OraMappingSchema::removeMapping(), and ora::OraMappingSchema::storeMapping().
{ static std::string s_col("MAPPING_VERSION"); return s_col; }
std::string ora::OraMappingVersionTable::tableName | ( | ) | [static] |
Definition at line 205 of file OraDatabaseSchema.cc.
Referenced by ora::OraMappingElementTable::create(), ora::OraClassVersionTable::create(), ora::OraMappingSchema::getVersionList(), ora::OraMappingSchema::removeMapping(), and ora::OraMappingSchema::storeMapping().
{ static std::string s_table("ORA_MAPPING_VERSION"); return s_table; }
coral::ISchema& ora::OraMappingVersionTable::m_schema [private] |
Definition at line 62 of file OraDatabaseSchema.h.