CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::BulkInsertOperation Class Reference

#include <RelationalOperation.h>

Inheritance diagram for ora::BulkInsertOperation:
ora::InputRelationalData ora::IRelationalOperation ora::IRelationalData

List of all members.

Public Member Functions

 BulkInsertOperation (const std::string &tableName, coral::ISchema &schema)
bool execute ()
bool isRequired ()
void reset ()
coral::IBulkOperation & setUp (int rowCacheSize)
 ~BulkInsertOperation ()

Private Attributes

std::vector
< coral::IBulkOperation * > 
m_bulkOperations
coral::ISchema & m_schema
std::string m_tableName

Detailed Description

Definition at line 110 of file RelationalOperation.h.


Constructor & Destructor Documentation

ora::BulkInsertOperation::BulkInsertOperation ( const std::string &  tableName,
coral::ISchema &  schema 
)

Definition at line 123 of file RelationalOperation.cc.

ora::BulkInsertOperation::~BulkInsertOperation ( )

Definition at line 131 of file RelationalOperation.cc.

                                            {
  for( std::vector<coral::IBulkOperation*>::iterator iB = m_bulkOperations.begin();
       iB != m_bulkOperations.end(); ++iB ){
    delete *iB;
  }
}

Member Function Documentation

bool ora::BulkInsertOperation::execute ( ) [virtual]

Implements ora::IRelationalOperation.

Definition at line 150 of file RelationalOperation.cc.

                                    {
  for( std::vector<coral::IBulkOperation*>::iterator iB = m_bulkOperations.begin();
       iB != m_bulkOperations.end(); ++iB ){
    (*iB)->flush();
    delete *iB;
  }
  m_bulkOperations.clear();
  return true;
}
bool ora::BulkInsertOperation::isRequired ( ) [virtual]

Implements ora::IRelationalOperation.

Definition at line 146 of file RelationalOperation.cc.

                                  {
  return false;
}
void ora::BulkInsertOperation::reset ( void  ) [virtual]

Implements ora::IRelationalOperation.

Definition at line 160 of file RelationalOperation.cc.

                                  {
  for( std::vector<coral::IBulkOperation*>::iterator iB = m_bulkOperations.begin();
       iB != m_bulkOperations.end(); ++iB ){
    delete *iB;
  }
  m_bulkOperations.clear();  
}
coral::IBulkOperation & ora::BulkInsertOperation::setUp ( int  rowCacheSize)

Definition at line 138 of file RelationalOperation.cc.

References runTheMatrix::data, and asciidump::table.

                                                                    {
  coral::ITable& table = m_schema.tableHandle( m_tableName );
  
  m_bulkOperations.push_back( table.dataEditor().bulkInsert( data(), rowCacheSize  ) );
  return *m_bulkOperations.back();
}

Member Data Documentation

std::vector<coral::IBulkOperation*> ora::BulkInsertOperation::m_bulkOperations [private]

Definition at line 123 of file RelationalOperation.h.

coral::ISchema& ora::BulkInsertOperation::m_schema [private]

Definition at line 122 of file RelationalOperation.h.

Definition at line 121 of file RelationalOperation.h.