CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondCore/ORA/src/DatabaseUtilitySession.h

Go to the documentation of this file.
00001 #ifndef INCLUDE_ORA_DATABASEUTILITYIMPL_H
00002 #define INCLUDE_ORA_DATABASEUTILITYIMPL_H
00003 
00004 #include "CondCore/ORA/interface/Handle.h"
00005 //
00006 #include <set>
00007 #include <map>
00008 
00009 namespace ora {
00010 
00011   class DatabaseSession;
00012   class DatabaseContainer;
00013   
00014   class DatabaseUtilitySession {
00015     public:
00016     explicit DatabaseUtilitySession( DatabaseSession& dbSession );
00017 
00018     virtual ~DatabaseUtilitySession();
00019 
00020     std::set<std::string> listMappingVersions( int containerId );
00021 
00022     std::map<std::string,std::string> listMappings( int containerId );
00023 
00024     bool dumpMapping( const std::string& mappingVersion, std::ostream& outputStream );
00025 
00026     void importContainerSchema( const std::string& sourceConnectionString, const std::string& containerName );
00027 
00028     void importContainer( const std::string& sourceConnectionString, const std::string& containerName );
00029 
00030     void eraseMapping( const std::string& mappingVersion );
00031 
00032     Handle<DatabaseContainer> containerHandle( const std::string& name );
00033     
00034     private:
00035 
00036     Handle<ora::DatabaseContainer> importContainerSchema( const std::string& containerName, DatabaseSession& sourceDbSession );
00037 
00038     bool existsContainer( const std::string& containerName );
00039 
00040     private:
00041 
00042     DatabaseSession& m_session;
00043   };
00044 }
00045 
00046 #endif
00047