CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/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 //
00005 // Package:     DBCommon
00006 // Class  :     DbTransaction
00007 // 
00011 //
00012 //
00013 
00014 namespace ora {
00015   class Transaction;
00016 }
00017 
00018 namespace cond{
00019   class DbTransaction {
00020 
00021     public:
00022     DbTransaction( ora::Transaction& dbTrans );   
00023     
00024     ~DbTransaction();
00026     int start(bool readOnly = false);
00028     int commit();
00030     bool forceCommit();
00032     bool rollback();
00034     int isActive() const;
00036     bool isReadOnly() const;
00037     private:
00038     ora::Transaction& m_dbTrans;
00039     bool m_readOnly;
00040     int m_clients;
00041 
00042   };
00043 }
00044 #endif