CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SequenceManager.cc
Go to the documentation of this file.
2 #include "OraDatabaseSchema.h"
3 #include "Sequences.h"
4 
6  coral::ISchema& schema ):
7  m_table(),
8  m_impl(){
9  m_table.reset( new OraSequenceTable( tableName, schema ) );
10  m_impl.reset( new Sequences( *m_table ) );
11 }
12 
14  m_table( rhs.m_table ),
15  m_impl( rhs.m_impl ){
16 }
17 
19 }
20 
22  if( this != &rhs ){
23  m_table = rhs.m_table;
24  m_impl = rhs.m_impl;
25  }
26  return *this;
27 }
28 
30  return m_table->name();
31 }
32 
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 }
40 
42  bool sinchronize ){
43  return m_impl->getNextId( sequenceName, sinchronize );
44 }
45 
47  m_impl->sinchronize( sequenceName );
48 }
49 
51  m_impl->sinchronizeAll();
52 }
53 
55  m_impl->erase( sequenceName );
56 }
57 
59  m_impl->clear();
60 }
std::string tableName()
tuple schema
Definition: dataDML.py:2334
SequenceManager(const std::string &tableName, coral::ISchema &schema)
boost::shared_ptr< Sequences > m_impl
int getNextId(const std::string &sequenceName, bool sinchronize=false)
boost::shared_ptr< OraSequenceTable > m_table
SequenceManager & operator=(const SequenceManager &rhs)
void erase(const std::string &sequenceName)
tuple tableName
Definition: HLT_Fake_cff.py:8
void create(const std::string &sequenceName)
void sinchronize(const std::string &sequenceName)