#include <OraDatabaseSchema.h>
Definition at line 88 of file OraDatabaseSchema.h.
ora::OraContainerHeaderTable::OraContainerHeaderTable |
( |
coral::ISchema & |
dbSchema | ) |
|
|
explicit |
ora::OraContainerHeaderTable::~OraContainerHeaderTable |
( |
| ) |
|
|
virtual |
void ora::OraContainerHeaderTable::addContainer |
( |
int |
id, |
|
|
const std::string & |
containerName, |
|
|
const std::string & |
className |
|
) |
| |
|
virtual |
Implements ora::IContainerHeaderTable.
Definition at line 416 of file OraDatabaseSchema.cc.
419 coral::AttributeList dataToInsert;
420 unsigned int numberOfObjects = 0;
430 containerTable.dataEditor().insertRow( dataToInsert );
std::string className(const T &t)
std::string ora::OraContainerHeaderTable::classNameColumn |
( |
| ) |
|
|
static |
std::string ora::OraContainerHeaderTable::containerIdColumn |
( |
| ) |
|
|
static |
std::string ora::OraContainerHeaderTable::containerNameColumn |
( |
| ) |
|
|
static |
void ora::OraContainerHeaderTable::create |
( |
| ) |
|
|
virtual |
Implements ora::IDatabaseTable.
Definition at line 494 of file OraDatabaseSchema.cc.
References asciidump::table, and ora::throwException().
496 throwException(
"ORA database container header table already exists in this schema.",
497 "OraContainerHeaderTable::create");
500 coral::TableDescription descr(
"OraDb" );
503 coral::AttributeSpecification::typeNameForType<int>() );
505 coral::AttributeSpecification::typeNameForType<std::string>() );
507 coral::AttributeSpecification::typeNameForType<std::string>() );
509 coral::AttributeSpecification::typeNameForType<unsigned int>() );
517 table.privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select );
void throwException(const std::string &message, const std::string &methodName)
void ora::OraContainerHeaderTable::decrementNumberOfObjects |
( |
int |
id | ) |
|
|
virtual |
void ora::OraContainerHeaderTable::drop |
( |
| ) |
|
|
virtual |
bool ora::OraContainerHeaderTable::exists |
( |
| ) |
|
|
virtual |
bool ora::OraContainerHeaderTable::getContainerData |
( |
std::map< std::string, ContainerHeaderData > & |
destination | ) |
|
|
virtual |
void ora::OraContainerHeaderTable::incrementNumberOfObjects |
( |
int |
id | ) |
|
|
virtual |
std::string ora::OraContainerHeaderTable::numberOfObjectsColumn |
( |
| ) |
|
|
static |
void ora::OraContainerHeaderTable::removeContainer |
( |
int |
id | ) |
|
|
virtual |
Implements ora::IContainerHeaderTable.
Definition at line 433 of file OraDatabaseSchema.cc.
434 std::stringstream whereClause;
436 coral::AttributeList whereData;
438 whereData.begin()->data<
int >() =
id;
440 containerTable.dataEditor().deleteRows(whereClause.str(),whereData);
std::string ora::OraContainerHeaderTable::tableName |
( |
| ) |
|
|
static |
void ora::OraContainerHeaderTable::updateContainer |
( |
int |
id, |
|
|
const std::string & |
setClause |
|
) |
| |
|
private |
Definition at line 443 of file OraDatabaseSchema.cc.
445 std::stringstream whereClause;
447 coral::AttributeList updateData;
449 updateData.begin()->data<
int>() = containerId;
451 containerTable.dataEditor().updateRows(setClause,whereClause.str(),updateData);
void ora::OraContainerHeaderTable::updateNumberOfObjects |
( |
const std::map< int, unsigned int > & |
numberOfObjectsForContainerIds | ) |
|
|
virtual |
Implements ora::IContainerHeaderTable.
Definition at line 466 of file OraDatabaseSchema.cc.
467 if( numberOfObjectsForContainerIds.size() ){
469 std::stringstream whereClause;
471 std::stringstream setClause;
473 coral::AttributeList updateData;
478 std::auto_ptr<coral::IBulkOperation> bulkUpdate( containerTable.dataEditor().bulkUpdateRows( setClause.str(), whereClause.str(), updateData,(int)numberOfObjectsForContainerIds.size()));
480 for( std::map<int,unsigned int>::const_iterator iCont = numberOfObjectsForContainerIds.begin();
481 iCont != numberOfObjectsForContainerIds.end(); ++iCont ){
484 bulkUpdate->processNextIteration();
coral::ISchema& ora::OraContainerHeaderTable::m_schema |
|
private |