00001 #ifndef INCLUDE_ORA_DATABASEUTILITY_H 00002 #define INCLUDE_ORA_DATABASEUTILITY_H 00003 00004 #include "Handle.h" 00005 #include <boost/shared_ptr.hpp> 00006 // 00007 #include <set> 00008 #include <map> 00009 00010 namespace ora { 00011 00012 class DatabaseUtilitySession; 00013 00014 class DatabaseUtility { 00015 public: 00016 // 00017 DatabaseUtility(); 00018 00019 // 00020 explicit DatabaseUtility( Handle<DatabaseUtilitySession>& session ); 00021 00022 // 00023 DatabaseUtility( const DatabaseUtility& rhs ); 00024 00026 virtual ~DatabaseUtility(); 00027 00029 DatabaseUtility& operator=( const DatabaseUtility& rhs ); 00030 00032 std::set<std::string> listMappingVersions( const std::string& containerName ); 00033 00035 std::map<std::string,std::string> listMappings( const std::string& containerName ); 00036 00038 bool dumpMapping( const std::string& mappingVersion, std::ostream& outputStream ); 00039 00041 void importContainerSchema( const std::string& sourceConnectionString, const std::string& containerName ); 00042 00044 void importContainer( const std::string& sourceConnectionString, const std::string& containerName ); 00045 00047 void eraseMapping( const std::string& mappingVersion ); 00048 00049 private: 00050 00051 Handle<DatabaseUtilitySession> m_session; 00052 00053 }; 00054 00055 } 00056 00057 #endif