#include <DatabaseContainer.h>
Public Member Functions | |
void * | getItem () |
void * | getItemAsType (const Reflex::Type &type) |
int | itemId () |
IteratorBuffer (ContainerSchema &schema, ReadBuffer &buffer) | |
bool | next () |
void | reset () |
const Reflex::Type & | type () |
~IteratorBuffer () | |
Private Attributes | |
int | m_itemId |
SelectOperation | m_query |
ReadBuffer & | m_readBuffer |
Definition at line 27 of file DatabaseContainer.h.
ora::IteratorBuffer::IteratorBuffer | ( | ContainerSchema & | schema, |
ReadBuffer & | buffer | ||
) |
Definition at line 239 of file DatabaseContainer.cc.
References ora::SelectOperation::addId(), ora::SelectOperation::addOrderId(), ora::MappingElement::columnNames(), m_query, ora::ContainerSchema::mapping(), AlCaHLTBitMon_QueryRunRegistry::string, and ora::MappingTree::topElement().
: m_query( schema.mapping().topElement().tableName(), schema.storageSchema() ), m_itemId( -1 ), m_readBuffer( buffer ){ const std::string& idCol = schema.mapping().topElement().columnNames()[0]; m_query.addId( idCol ); m_query.addOrderId( idCol ); }
ora::IteratorBuffer::~IteratorBuffer | ( | ) |
Definition at line 249 of file DatabaseContainer.cc.
{ }
void * ora::IteratorBuffer::getItem | ( | ) |
Definition at line 270 of file DatabaseContainer.cc.
References run_regression::ret.
{ void* ret = 0; if( m_itemId != -1 ){ ret = m_readBuffer.read( m_itemId ); } return ret; }
void * ora::IteratorBuffer::getItemAsType | ( | const Reflex::Type & | type | ) |
Definition at line 278 of file DatabaseContainer.cc.
References ora::ClassUtils::isType(), and ora::throwException().
{ if( !ClassUtils::isType( type(), asType ) ){ throwException("Provided output object type \""+asType.Name(Reflex::SCOPED)+"\" does not match with the container type \""+ type().Name(Reflex::SCOPED)+"\"","IteratorBuffer::getItemAsType"); } return getItem(); }
int ora::IteratorBuffer::itemId | ( | ) |
Definition at line 286 of file DatabaseContainer.cc.
{ return m_itemId; }
bool ora::IteratorBuffer::next | ( | void | ) |
Definition at line 256 of file DatabaseContainer.cc.
void ora::IteratorBuffer::reset | ( | void | ) |
Definition at line 252 of file DatabaseContainer.cc.
{ m_query.execute(); }
const Reflex::Type & ora::IteratorBuffer::type | ( | ) |
Definition at line 290 of file DatabaseContainer.cc.
{ return m_readBuffer.type(); }
int ora::IteratorBuffer::m_itemId [private] |
Definition at line 47 of file DatabaseContainer.h.
SelectOperation ora::IteratorBuffer::m_query [private] |
Definition at line 46 of file DatabaseContainer.h.
Referenced by IteratorBuffer().
ReadBuffer& ora::IteratorBuffer::m_readBuffer [private] |
Definition at line 48 of file DatabaseContainer.h.