CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/CondCore/DBCommon/interface/DbTransaction.h

Go to the documentation of this file.
00001 #ifndef CondCore_DBCommon_DbTransaction_H
00002 #define CondCore_DBCommon_DbTransaction_H
00003 //
00004 // Package:     DBCommon
00005 // Class  :     DbTransaction
00006 // 
00010 //
00011 //
00012 
00013 namespace ora {
00014   class Transaction;
00015 }
00016 
00017 namespace cond{
00018   class DbTransaction {
00019 
00020     public:
00021     DbTransaction( ora::Transaction& dbTrans );   
00022     
00023     ~DbTransaction();
00025     int start(bool readOnly = false);
00027     int commit();
00029     bool forceCommit();
00031     bool rollback();
00033     int isActive() const;
00035     bool isReadOnly() const;
00036     private:
00037     ora::Transaction& m_dbTrans;
00038     bool m_readOnly;
00039     int m_clients;
00040 
00041   };
00042 }
00043 #endif