CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::SequenceManager Class Reference

#include <SequenceManager.h>

List of all members.

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 SequenceManager &rhs)
 SequenceManager (const std::string &tableName, coral::ISchema &schema)
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.

                                                             :
  m_table(),
  m_impl(){
  m_table.reset( new OraSequenceTable( tableName, schema ) );
  m_impl.reset( new Sequences( *m_table ) );
}
SequenceManager::SequenceManager ( const SequenceManager rhs)

Definition at line 13 of file SequenceManager.cc.

                                                               :
  m_table( rhs.m_table ),
  m_impl( rhs.m_impl ){
}
SequenceManager::~SequenceManager ( ) [virtual]

Definition at line 18 of file SequenceManager.cc.

                                    {
}

Member Function Documentation

void SequenceManager::clear ( void  )

Definition at line 58 of file SequenceManager.cc.

                              {
  m_impl->clear();
}
void SequenceManager::create ( const std::string &  sequenceName)

Definition at line 33 of file SequenceManager.cc.

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

                                                              {
  if( !m_table->exists() ){
    m_table->create();
  }
  int lastId=0;
  if(!m_table->getLastId( sequenceName, lastId ) ) m_impl->create( sequenceName );
}
void SequenceManager::erase ( const std::string &  sequenceName)

Definition at line 54 of file SequenceManager.cc.

                                                             {
  m_impl->erase( sequenceName );
}
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.

                                                                             {
  if( this != &rhs ){
    m_table = rhs.m_table;
    m_impl = rhs.m_impl;
  }
  return *this;
}
void SequenceManager::sinchronize ( const std::string &  sequenceName)

Definition at line 46 of file SequenceManager.cc.

                                                                   {
  m_impl->sinchronize( sequenceName );
}
void SequenceManager::sinchronizeAll ( )

Definition at line 50 of file SequenceManager.cc.

                                       {
  m_impl->sinchronizeAll();
}
std::string SequenceManager::tableName ( )

Definition at line 29 of file SequenceManager.cc.

                                       {
  return m_table->name();
}

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().