CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/CondCore/ORA/interface/Transaction.h

Go to the documentation of this file.
00001 #ifndef INCLUDE_ORA_TRANSACTION_H
00002 #define INCLUDE_ORA_TRANSACTION_H
00003 
00004 namespace ora {
00005 
00006   class DatabaseSession;
00007   
00012   class Transaction {
00013 
00014     public:
00015     explicit Transaction( DatabaseSession& session );
00016     
00018     virtual ~Transaction();
00019 
00021     bool start( bool readOnly=true );
00022 
00024     bool commit();
00025 
00027     bool rollback();
00028 
00030     bool isActive( bool checkIfReadOnly=false ) const;
00031     
00032     private:
00033     DatabaseSession& m_session;
00034     bool m_localActive;
00035   };
00036 
00037 }
00038 
00039 #endif
00040