CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::RelationalDeleter Class Reference

#include <RelationalDeleter.h>

Public Member Functions

void build (RelationalBuffer &buffer)
 
void clear ()
 
void erase (int itemId)
 
 RelationalDeleter (MappingElement &dataMapping)
 
 RelationalDeleter (const std::vector< MappingElement > &mappingList)
 
virtual ~RelationalDeleter ()
 Destructor. More...
 

Private Attributes

std::vector< const
MappingElement * > 
m_mappings
 
std::vector< DeleteOperation * > m_operations
 

Detailed Description

Definition at line 12 of file RelationalDeleter.h.

Constructor & Destructor Documentation

ora::RelationalDeleter::RelationalDeleter ( MappingElement dataMapping)
explicit

Definition at line 9 of file RelationalDeleter.cc.

References m_mappings.

9  :
10  m_mappings(),
11  m_operations(){
12  m_mappings.push_back( &dataMapping );
13 }
std::vector< DeleteOperation * > m_operations
std::vector< const MappingElement * > m_mappings
ora::RelationalDeleter::RelationalDeleter ( const std::vector< MappingElement > &  mappingList)
explicit

Definition at line 15 of file RelationalDeleter.cc.

References m_mappings.

15  :
16  m_mappings(),
17  m_operations(){
18  for( std::vector<MappingElement>::const_iterator iMe = mappingList.begin();
19  iMe != mappingList.end(); ++iMe ){
20  m_mappings.push_back( &(*iMe) );
21  }
22 }
std::vector< DeleteOperation * > m_operations
std::vector< const MappingElement * > m_mappings
ora::RelationalDeleter::~RelationalDeleter ( )
virtual

Destructor.

Definition at line 24 of file RelationalDeleter.cc.

References hitfit::clear().

24  {
25  clear();
26 }

Member Function Documentation

void ora::RelationalDeleter::build ( RelationalBuffer buffer)

Definition at line 32 of file RelationalDeleter.cc.

References ora::InputRelationalData::addWhereId(), plotBeamSpotDB::first, i, ora::RelationalBuffer::newDelete(), and edm::second().

Referenced by ora::UpdateBuffer::flush(), ora::DeleteBuffer::flush(), and psClasses.BuildThread::run().

32  {
33  m_operations.clear();
34  for( std::vector<const MappingElement*>::iterator iMe = m_mappings.begin();
35  iMe != m_mappings.end(); iMe++ ){
36  std::vector<std::pair<std::string,std::string> > tableHierarchy = (*iMe)->tableHierarchy();
37  size_t sz = tableHierarchy.size();
38  for( size_t i=1; i<sz+1; i++ ){
39  DeleteOperation& delOperation = buffer.newDelete( tableHierarchy[sz-i].first, i==sz );
40  delOperation.addWhereId( tableHierarchy[sz-i].second );
41  m_operations.push_back(&delOperation);
42  }
43  }
44 }
std::vector< DeleteOperation * > m_operations
int i
Definition: DBlmapReader.cc:9
std::vector< const MappingElement * > m_mappings
U second(std::pair< T, U > const &p)
void ora::RelationalDeleter::clear ( void  )
void ora::RelationalDeleter::erase ( int  itemId)

Definition at line 46 of file RelationalDeleter.cc.

Referenced by ora::UpdateBuffer::flush(), and ora::DeleteBuffer::flush().

46  {
47  for( std::vector<DeleteOperation*>::const_iterator iDel = m_operations.begin();
48  iDel != m_operations.end(); ++iDel ){
49  coral::AttributeList& whereData = (*iDel)->whereData();
50  whereData.begin()->data<int>() = itemId;
51  }
52 }
std::vector< DeleteOperation * > m_operations

Member Data Documentation

std::vector<const MappingElement*> ora::RelationalDeleter::m_mappings
private

Definition at line 29 of file RelationalDeleter.h.

Referenced by RelationalDeleter().

std::vector<DeleteOperation*> ora::RelationalDeleter::m_operations
private

Definition at line 30 of file RelationalDeleter.h.