test
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

ora::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()
tuple schema
Definition: dataDML.py:2334
boost::shared_ptr< Sequences > m_impl
boost::shared_ptr< OraSequenceTable > m_table
ora::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
ora::SequenceManager::~SequenceManager ( )
virtual

Definition at line 18 of file SequenceManager.cc.

18  {
19 }

Member Function Documentation

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

Definition at line 33 of file SequenceManager.cc.

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 ora::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 ora::SequenceManager::getNextId ( const std::string &  sequenceName,
bool  sinchronize = false 
)

Definition at line 41 of file SequenceManager.cc.

42  {
43  return m_impl->getNextId( sequenceName, sinchronize );
44 }
boost::shared_ptr< Sequences > m_impl
void sinchronize(const std::string &sequenceName)
ora::SequenceManager & ora::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 ora::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 ora::SequenceManager::sinchronizeAll ( )

Definition at line 50 of file SequenceManager.cc.

50  {
51  m_impl->sinchronizeAll();
52 }
boost::shared_ptr< Sequences > m_impl
std::string ora::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().