Public Member Functions | |
DeleteBuffer (ContainerSchema &contSchema) | |
size_t | flush () |
void | registerForDelete (int oid) |
~DeleteBuffer () | |
Private Attributes | |
std::vector< int > | m_buffer |
std::auto_ptr< RelationalDeleter > | m_depDeleter |
std::auto_ptr< RelationalDeleter > | m_mainDeleter |
RelationalBuffer | m_operationBuffer |
Definition at line 207 of file DatabaseContainer.cc.
ora::DeleteBuffer::DeleteBuffer | ( | ContainerSchema & | contSchema | ) | [inline, explicit] |
Definition at line 209 of file DatabaseContainer.cc.
References m_depDeleter, m_mainDeleter, m_operationBuffer, ora::ContainerSchema::mapping(), ora::ContainerSchema::mappingForDependentClasses(), and ora::MappingTree::topElement().
: m_buffer(), m_operationBuffer( contSchema.storageSchema() ), m_mainDeleter(), m_depDeleter(){ m_mainDeleter.reset( new RelationalDeleter( contSchema.mapping().topElement() )); m_mainDeleter->build( m_operationBuffer ); std::vector<MappingElement> dependentMappings; contSchema.mappingForDependentClasses( dependentMappings ); m_depDeleter.reset( new RelationalDeleter( dependentMappings ) ); m_depDeleter->build( m_operationBuffer ); dependentMappings.clear(); }
ora::DeleteBuffer::~DeleteBuffer | ( | ) | [inline] |
Definition at line 224 of file DatabaseContainer.cc.
{ }
size_t ora::DeleteBuffer::flush | ( | ) | [inline] |
Definition at line 232 of file DatabaseContainer.cc.
References ora::RelationalBuffer::flush(), m_buffer, m_depDeleter, m_mainDeleter, and m_operationBuffer.
{ size_t nobj = 0; for( std::vector<int>::const_iterator iD = m_buffer.begin(); iD != m_buffer.end(); ++iD ){ m_depDeleter->erase( *iD ); m_mainDeleter->erase( *iD ); if( m_operationBuffer.flush() ) nobj++; } m_buffer.clear(); return nobj; }
void ora::DeleteBuffer::registerForDelete | ( | int | oid | ) | [inline] |
Definition at line 228 of file DatabaseContainer.cc.
References m_buffer.
{ m_buffer.push_back( oid ); }
std::vector<int> ora::DeleteBuffer::m_buffer [private] |
Definition at line 245 of file DatabaseContainer.cc.
Referenced by flush(), and registerForDelete().
std::auto_ptr<RelationalDeleter> ora::DeleteBuffer::m_depDeleter [private] |
Definition at line 248 of file DatabaseContainer.cc.
Referenced by DeleteBuffer(), and flush().
std::auto_ptr<RelationalDeleter> ora::DeleteBuffer::m_mainDeleter [private] |
Definition at line 247 of file DatabaseContainer.cc.
Referenced by DeleteBuffer(), and flush().
Definition at line 246 of file DatabaseContainer.cc.
Referenced by DeleteBuffer(), and flush().