#include <OraDatabaseSchema.h>
Public Member Functions | |
void | create () |
void | drop () |
bool | exists () |
std::string | name () |
OraClassVersionTable (coral::ISchema &dbSchema) | |
virtual | ~OraClassVersionTable () |
Static Public Member Functions | |
static std::string | classIdColumn () |
static std::string | classNameColumn () |
static std::string | classVersionColumn () |
static std::string | containerIdColumn () |
static std::string | dependencyIndexColumn () |
static std::string | mappingVersionColumn () |
static std::string | tableName () |
Definition at line 114 of file OraDatabaseSchema.h.
ora::OraClassVersionTable::OraClassVersionTable | ( | coral::ISchema & | dbSchema | ) | [explicit] |
Definition at line 626 of file OraDatabaseSchema.cc.
: IDatabaseTable( dbSchema ){ }
ora::OraClassVersionTable::~OraClassVersionTable | ( | ) | [virtual] |
Definition at line 630 of file OraDatabaseSchema.cc.
{ }
std::string ora::OraClassVersionTable::classIdColumn | ( | ) | [static] |
Definition at line 604 of file OraDatabaseSchema.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::OraMappingSchema::insertClassVersion(), ora::OraMappingSchema::selectMappingVersion(), and ora::OraMappingSchema::setMappingVersion().
{ static std::string s_col("CLASS_ID"); return s_col; }
std::string ora::OraClassVersionTable::classNameColumn | ( | ) | [static] |
Definition at line 594 of file OraDatabaseSchema.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::OraMappingSchema::getDependentClassesInContainerMapping(), and ora::OraMappingSchema::insertClassVersion().
{ static std::string s_col("CLASS_NAME"); return s_col; }
std::string ora::OraClassVersionTable::classVersionColumn | ( | ) | [static] |
Definition at line 599 of file OraDatabaseSchema.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::OraMappingSchema::getClassVersionListForContainer(), ora::OraMappingSchema::getClassVersionListForMappingVersion(), and ora::OraMappingSchema::insertClassVersion().
{ static std::string s_col("CLASS_VERSION"); return s_col; }
std::string ora::OraClassVersionTable::containerIdColumn | ( | ) | [static] |
Definition at line 614 of file OraDatabaseSchema.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::OraMappingSchema::containerForMappingVersion(), ora::OraMappingSchema::getClassVersionListForContainer(), ora::OraMappingSchema::getContainerTableMap(), ora::OraMappingSchema::getDependentClassesInContainerMapping(), ora::OraMappingSchema::getMappingVersionListForContainer(), ora::OraMappingSchema::insertClassVersion(), ora::OraMappingSchema::selectMappingVersion(), and ora::OraMappingSchema::setMappingVersion().
{ static std::string s_col("CONTAINER_ID"); return s_col; }
void ora::OraClassVersionTable::create | ( | ) | [virtual] |
Implements ora::IDatabaseTable.
Definition at line 641 of file OraDatabaseSchema.cc.
References ora::OraContainerHeaderTable::containerIdColumn(), ora::OraMappingVersionTable::mappingVersionColumn(), python::IdGenerator::schema, AlCaHLTBitMon_QueryRunRegistry::string, ora::OraMappingVersionTable::tableName(), ora::OraContainerHeaderTable::tableName(), and ora::throwException().
{ if( schema().existsTable( tableName() )){ throwException( "ORA database class version table already exists in this schema.", "OraClassVersionTable::create"); } // class version table coral::TableDescription description1( "OraDb" ); description1.setName( tableName() ); description1.insertColumn( classNameColumn(), coral::AttributeSpecification::typeNameForType<std::string>(), 1000, false); description1.setNotNullConstraint( classNameColumn() ); description1.insertColumn( classVersionColumn(), coral::AttributeSpecification::typeNameForType<std::string>(), 1000, false); description1.setNotNullConstraint( classVersionColumn() ); description1.insertColumn( classIdColumn(), coral::AttributeSpecification::typeNameForType<std::string>(), 1000, false); description1.setNotNullConstraint( classIdColumn() ); description1.insertColumn( dependencyIndexColumn(), coral::AttributeSpecification::typeNameForType<int>() ); description1.setNotNullConstraint( dependencyIndexColumn() ); description1.insertColumn( containerIdColumn(), coral::AttributeSpecification::typeNameForType<int>() ); description1.setNotNullConstraint( containerIdColumn() ); description1.insertColumn( mappingVersionColumn(), coral::AttributeSpecification::typeNameForType<std::string>(), 1000, false); description1.setNotNullConstraint( mappingVersionColumn() ); std::vector<std::string> cols1; cols1.push_back( classIdColumn() ); cols1.push_back( containerIdColumn() ); description1.setPrimaryKey( cols1 ); std::string fk10Name = mappingVersionColumn()+"_FK10"; description1.createForeignKey( fk10Name, mappingVersionColumn(), ora::OraMappingVersionTable::tableName(),ora::OraMappingVersionTable::mappingVersionColumn()); std::string fk11Name = containerIdColumn()+"_FK11"; description1.createForeignKey( fk11Name, containerIdColumn(), ora::OraContainerHeaderTable::tableName(),ora::OraContainerHeaderTable::containerIdColumn()); schema().createTable( description1 ); }
std::string ora::OraClassVersionTable::dependencyIndexColumn | ( | ) | [static] |
Definition at line 609 of file OraDatabaseSchema.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::OraMappingSchema::getDependentClassesInContainerMapping(), ora::OraMappingSchema::getMappingVersionListForContainer(), and ora::OraMappingSchema::insertClassVersion().
{ static std::string s_col("DEPENDENCY_INDEX"); return s_col; }
void ora::OraClassVersionTable::drop | ( | ) | [virtual] |
Implements ora::IDatabaseTable.
Definition at line 680 of file OraDatabaseSchema.cc.
References python::IdGenerator::schema.
bool ora::OraClassVersionTable::exists | ( | ) | [virtual] |
Implements ora::IDatabaseTable.
Definition at line 637 of file OraDatabaseSchema.cc.
References python::IdGenerator::schema.
std::string ora::OraClassVersionTable::mappingVersionColumn | ( | ) | [static] |
Definition at line 620 of file OraDatabaseSchema.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::OraMappingSchema::containerForMappingVersion(), ora::OraMappingSchema::getClassVersionListForContainer(), ora::OraMappingSchema::getClassVersionListForMappingVersion(), ora::OraMappingSchema::getContainerTableMap(), ora::OraMappingSchema::getMappingVersionListForContainer(), ora::OraMappingSchema::insertClassVersion(), ora::OraMappingSchema::selectMappingVersion(), and ora::OraMappingSchema::setMappingVersion().
{ static std::string s_col("MAPPING_VERSION"); return s_col; }
std::string ora::OraClassVersionTable::name | ( | ) | [virtual] |
Implements ora::IDatabaseTable.
Definition at line 633 of file OraDatabaseSchema.cc.
{ return tableName(); }
std::string ora::OraClassVersionTable::tableName | ( | ) | [static] |
Definition at line 589 of file OraDatabaseSchema.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by ora::OraMappingSchema::containerForMappingVersion(), ora::OraMappingSchema::getClassVersionListForContainer(), ora::OraMappingSchema::getClassVersionListForMappingVersion(), ora::OraMappingSchema::getContainerTableMap(), ora::OraMappingSchema::getDependentClassesInContainerMapping(), ora::OraMappingSchema::getMappingVersionListForContainer(), ora::OraMappingSchema::insertClassVersion(), ora::OraMappingSchema::removeMapping(), ora::OraMappingSchema::selectMappingVersion(), and ora::OraMappingSchema::setMappingVersion().
{ static std::string s_table("ORA_CLASS_VERSION"); return s_table; }