CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SequenceManager.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_SEQUENCEMANAGER_H
2 #define INCLUDE_ORA_SEQUENCEMANAGER_H
3 
4 #include "Exception.h"
5 //
6 #include <boost/shared_ptr.hpp>
7 
8 namespace coral {
9  class ISchema;
10 }
11 
12 namespace ora {
13 
14  class Sequences;
15  class OraSequenceTable;
16 
18  public:
19 
20  //
21  SequenceManager( const std::string& tableName, coral::ISchema& schema );
22 
23  //
24  SequenceManager( const SequenceManager& rhs );
25 
27  virtual ~SequenceManager();
28 
31 
33  std::string tableName();
34 
36  void create( const std::string& sequenceName );
37 
39  int getNextId( const std::string& sequenceName, bool sinchronize = false );
40 
42  void sinchronize( const std::string& sequenceName );
43 
45  void sinchronizeAll();
46 
48  void erase( const std::string& sequenceName );
49 
51  void clear();
52 
53  private:
54 
55  boost::shared_ptr<OraSequenceTable> m_table;
56  boost::shared_ptr<Sequences> m_impl;
57 
58  };
59 
60 }
61 
62 #endif
std::string tableName()
void sinchronize(const std::string &sequenceName)
SequenceManager(const std::string &tableName, coral::ISchema &schema)
boost::shared_ptr< Sequences > m_impl
boost::shared_ptr< OraSequenceTable > m_table
int getNextId(const std::string &sequenceName, bool sinchronize=false)
void create(const std::string &sequenceName)
SequenceManager & operator=(const SequenceManager &rhs)
void erase(const std::string &sequenceName)