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::SequenceManager Class Reference

#include <SequenceManager.h>

Public Member Functions

void clear ()
 
void create (const std::string &sequenceName)
 
void erase (const std::string &sequenceName)
 
int getNextId (const std::string &sequenceName, bool sinchronize=false)
 
SequenceManageroperator= (const SequenceManager &rhs)
 
 SequenceManager (const std::string &tableName, coral::ISchema &schema)
 
 SequenceManager (const SequenceManager &rhs)
 
void sinchronize (const std::string &sequenceName)
 
void sinchronizeAll ()
 
std::string tableName ()
 
virtual ~SequenceManager ()
 

Private Attributes

boost::shared_ptr< Sequencesm_impl
 
boost::shared_ptr
< OraSequenceTable
m_table
 

Detailed Description

Definition at line 17 of file SequenceManager.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file SequenceManager.cc.

References m_impl, and m_table.

6  :
7  m_table(),
8  m_impl(){
9  m_table.reset( new OraSequenceTable( tableName, schema ) );
10  m_impl.reset( new Sequences( *m_table ) );
11 }
std::string tableName()
boost::shared_ptr< Sequences > m_impl
boost::shared_ptr< OraSequenceTable > m_table
SequenceManager::SequenceManager ( const SequenceManager rhs)

Definition at line 13 of file SequenceManager.cc.

13  :
14  m_table( rhs.m_table ),
15  m_impl( rhs.m_impl ){
16 }
boost::shared_ptr< Sequences > m_impl
boost::shared_ptr< OraSequenceTable > m_table
SequenceManager::~SequenceManager ( )
virtual

Definition at line 18 of file SequenceManager.cc.

18  {
19 }

Member Function Documentation

void SequenceManager::clear ( void  )
void SequenceManager::create ( const std::string &  sequenceName)

Definition at line 33 of file SequenceManager.cc.

Referenced by cond::CredentialStore::createSchema().

33  {
34  if( !m_table->exists() ){
35  m_table->create();
36  }
37  int lastId=0;
38  if(!m_table->getLastId( sequenceName, lastId ) ) m_impl->create( sequenceName );
39 }
boost::shared_ptr< Sequences > m_impl
boost::shared_ptr< OraSequenceTable > m_table
void SequenceManager::erase ( const std::string &  sequenceName)

Definition at line 54 of file SequenceManager.cc.

54  {
55  m_impl->erase( sequenceName );
56 }
boost::shared_ptr< Sequences > m_impl
int SequenceManager::getNextId ( const std::string &  sequenceName,
bool  sinchronize = false 
)
ora::SequenceManager & SequenceManager::operator= ( const SequenceManager rhs)

Definition at line 21 of file SequenceManager.cc.

References m_impl, and m_table.

21  {
22  if( this != &rhs ){
23  m_table = rhs.m_table;
24  m_impl = rhs.m_impl;
25  }
26  return *this;
27 }
boost::shared_ptr< Sequences > m_impl
boost::shared_ptr< OraSequenceTable > m_table
void SequenceManager::sinchronize ( const std::string &  sequenceName)

Definition at line 46 of file SequenceManager.cc.

46  {
47  m_impl->sinchronize( sequenceName );
48 }
boost::shared_ptr< Sequences > m_impl
void SequenceManager::sinchronizeAll ( )

Definition at line 50 of file SequenceManager.cc.

50  {
51  m_impl->sinchronizeAll();
52 }
boost::shared_ptr< Sequences > m_impl
std::string SequenceManager::tableName ( )

Definition at line 29 of file SequenceManager.cc.

29  {
30  return m_table->name();
31 }
boost::shared_ptr< OraSequenceTable > m_table

Member Data Documentation

boost::shared_ptr<Sequences> ora::SequenceManager::m_impl
private

Definition at line 56 of file SequenceManager.h.

Referenced by operator=(), and SequenceManager().

boost::shared_ptr<OraSequenceTable> ora::SequenceManager::m_table
private

Definition at line 55 of file SequenceManager.h.

Referenced by operator=(), and SequenceManager().