#include <SequenceManager.h>
Public Member Functions | |
void | clear () |
Clears the internal state. More... | |
void | createSequencesTable () |
Creates the table holding the sequences. More... | |
bool | existSequencesTable () |
Whether sequence table exists. More... | |
unsigned long long | incrementId (const std::string &reftableName) |
Increments and returns a new valid oid for a table. More... | |
SequenceManager (cond::DbSession &coraldb, const std::string &sequenceTableName) | |
Constructor. More... | |
void | updateId (const std::string &reftableName, unsigned long long lastId) |
Updates the last used id. More... | |
~SequenceManager () | |
Destructor. More... | |
Private Member Functions | |
void | init () |
bool | lockEntry (coral::ISchema &schema, const std::string &reftableName, unsigned long long &lastId) |
Locks the id entry in the ref table and returns the lastId value. More... | |
Private Attributes | |
cond::DbSession | m_coraldb |
The coraldb in use. More... | |
bool | m_sequenceTableExists |
Flag indicating whether the sequence table exists. More... | |
std::string | m_sequenceTableName |
Sequence table name. More... | |
std::string | m_setClause |
The set clause for updating a sequence entry. More... | |
bool | m_started |
std::map< std::string, unsigned long long > | m_tableToId |
Map of ids used. More... | |
std::string | m_whereClause |
The where clause pinning a sequence entry. More... | |
coral::AttributeList * | m_whereData |
The data for the where clause. More... | |
Definition at line 23 of file SequenceManager.h.
SequenceManager::SequenceManager | ( | cond::DbSession & | coraldb, |
const std::string & | sequenceTableName | ||
) |
Constructor.
Definition at line 15 of file SequenceManager.cc.
References init(), and m_whereData.
SequenceManager::~SequenceManager | ( | ) |
Destructor.
Definition at line 35 of file SequenceManager.cc.
void SequenceManager::clear | ( | void | ) |
Clears the internal state.
Definition at line 133 of file SequenceManager.cc.
Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().
void SequenceManager::createSequencesTable | ( | ) |
Creates the table holding the sequences.
Definition at line 142 of file SequenceManager.cc.
References idDealer::description, and python.IdGenerator::schema.
Referenced by cond::Logger::createLogDBIfNonExist().
bool SequenceManager::existSequencesTable | ( | ) |
Whether sequence table exists.
Definition at line 138 of file SequenceManager.cc.
Referenced by cond::Logger::createLogDBIfNonExist().
unsigned long long SequenceManager::incrementId | ( | const std::string & | reftableName | ) |
Increments and returns a new valid oid for a table.
Definition at line 40 of file SequenceManager.cc.
References cppFunctionSkipper::exception, edm::hlt::Exception, and python.IdGenerator::schema.
|
private |
Definition at line 31 of file SequenceManager.cc.
Referenced by SequenceManager().
|
private |
Locks the id entry in the ref table and returns the lastId value.
Definition at line 159 of file SequenceManager.cc.
References o2o::query.
void cond::SequenceManager::updateId | ( | const std::string & | reftableName, |
unsigned long long | lastId | ||
) |
Updates the last used id.
|
private |
The coraldb in use.
Definition at line 57 of file SequenceManager.h.
|
private |
Flag indicating whether the sequence table exists.
Definition at line 66 of file SequenceManager.h.
|
private |
Sequence table name.
Definition at line 60 of file SequenceManager.h.
|
private |
The set clause for updating a sequence entry.
Definition at line 75 of file SequenceManager.h.
|
private |
Definition at line 76 of file SequenceManager.h.
|
private |
Map of ids used.
Definition at line 63 of file SequenceManager.h.
|
private |
The where clause pinning a sequence entry.
Definition at line 69 of file SequenceManager.h.
|
private |
The data for the where clause.
Definition at line 72 of file SequenceManager.h.
Referenced by SequenceManager().