CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DbTransaction.h
Go to the documentation of this file.
1 #ifndef CondCore_DBCommon_DbTransaction_H
2 #define CondCore_DBCommon_DbTransaction_H
3 //
4 // Package: DBCommon
5 // Class : DbTransaction
6 //
10 //
11 //
12 
13 namespace ora {
14  class Transaction;
15 }
16 
17 namespace cond{
18  class DbTransaction {
19 
20  public:
21  DbTransaction( ora::Transaction& dbTrans );
22 
25  int start(bool readOnly = false);
27  int commit();
29  bool forceCommit();
31  bool rollback();
33  int isActive() const;
35  bool isReadOnly() const;
36  private:
38  bool m_readOnly;
39  int m_clients;
40 
41  };
42 }
43 #endif
bool rollback()
rollback transaction
int isActive() const
current transaction is active
int commit()
commit transaction.
int start(bool readOnly=false)
start transaction
bool forceCommit()
force the commit, regardless to the transaction clients
DbTransaction(ora::Transaction &dbTrans)
Definition: DbTransaction.cc:8
bool isReadOnly() const
current transaction is readonly
ora::Transaction & m_dbTrans
Definition: DbTransaction.h:37