test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::DatabaseUtility Class Reference

#include <DatabaseUtility.h>

Public Member Functions

 DatabaseUtility ()
 
 DatabaseUtility (Handle< DatabaseUtilitySession > &session)
 
 DatabaseUtility (const DatabaseUtility &rhs)
 
bool dumpMapping (const std::string &mappingVersion, std::ostream &outputStream)
 
void eraseMapping (const std::string &mappingVersion)
 
void importContainer (const std::string &sourceConnectionString, const std::string &containerName)
 
void importContainerSchema (const std::string &sourceConnectionString, const std::string &containerName)
 
std::map< std::string,
std::string > 
listMappings (const std::string &containerName)
 
std::set< std::string > listMappingVersions (const std::string &containerName)
 
DatabaseUtilityoperator= (const DatabaseUtility &rhs)
 
virtual ~DatabaseUtility ()
 

Private Attributes

Handle< DatabaseUtilitySessionm_session
 

Detailed Description

Definition at line 14 of file DatabaseUtility.h.

Constructor & Destructor Documentation

ora::DatabaseUtility::DatabaseUtility ( )

Definition at line 8 of file DatabaseUtility.cc.

8  :
9  m_session(){
10 }
Handle< DatabaseUtilitySession > m_session
ora::DatabaseUtility::DatabaseUtility ( Handle< DatabaseUtilitySession > &  session)
explicit

Definition at line 12 of file DatabaseUtility.cc.

12  :
13  m_session( utilitySession ){
14 }
Handle< DatabaseUtilitySession > m_session
ora::DatabaseUtility::DatabaseUtility ( const DatabaseUtility rhs)

Definition at line 16 of file DatabaseUtility.cc.

16  :
17  m_session( rhs.m_session ){
18 }
Handle< DatabaseUtilitySession > m_session
ora::DatabaseUtility::~DatabaseUtility ( )
virtual

Definition at line 20 of file DatabaseUtility.cc.

20  {
21 }

Member Function Documentation

bool ora::DatabaseUtility::dumpMapping ( const std::string &  mappingVersion,
std::ostream &  outputStream 
)

Definition at line 46 of file DatabaseUtility.cc.

47  {
48  return m_session->dumpMapping( mappingVersion,outputStream );
49 }
Handle< DatabaseUtilitySession > m_session
void ora::DatabaseUtility::eraseMapping ( const std::string &  mappingVersion)

Definition at line 61 of file DatabaseUtility.cc.

Referenced by cond::DbSession::deleteMapping().

61  {
62  m_session->eraseMapping( mappingVersion );
63 }
Handle< DatabaseUtilitySession > m_session
void ora::DatabaseUtility::importContainer ( const std::string &  sourceConnectionString,
const std::string &  containerName 
)

Definition at line 56 of file DatabaseUtility.cc.

57  {
58  m_session->importContainer( sourceConnectionString, containerName );
59 }
Handle< DatabaseUtilitySession > m_session
void ora::DatabaseUtility::importContainerSchema ( const std::string &  sourceConnectionString,
const std::string &  containerName 
)

Definition at line 51 of file DatabaseUtility.cc.

Referenced by cond::DbSession::importMapping().

52  {
53  m_session->importContainerSchema( sourceConnectionString, containerName );
54 }
Handle< DatabaseUtilitySession > m_session
std::map< std::string, std::string > ora::DatabaseUtility::listMappings ( const std::string &  containerName)

Definition at line 37 of file DatabaseUtility.cc.

References generateEDF::cont, ora::DatabaseContainer::id(), and ora::throwException().

37  {
38  Handle<DatabaseContainer> cont = m_session->containerHandle( containerName );
39  if( !cont ){
40  throwException("Container \""+containerName+"\" does not exist in the database.",
41  "DatabaseUtility::listMappings");
42  }
43  return m_session->listMappings( cont->id() );
44 }
tuple cont
load Luminosity info ##
Definition: generateEDF.py:622
Handle< DatabaseUtilitySession > m_session
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
std::set< std::string > ora::DatabaseUtility::listMappingVersions ( const std::string &  containerName)

Definition at line 28 of file DatabaseUtility.cc.

References generateEDF::cont, ora::DatabaseContainer::id(), and ora::throwException().

28  {
29  Handle<DatabaseContainer> cont = m_session->containerHandle( containerName );
30  if( !cont ){
31  throwException("Container \""+containerName+"\" does not exist in the database.",
32  "DatabaseUtility::listMappingVersions");
33  }
34  return m_session->listMappingVersions( cont->id() );
35 }
tuple cont
load Luminosity info ##
Definition: generateEDF.py:622
Handle< DatabaseUtilitySession > m_session
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
ora::DatabaseUtility & ora::DatabaseUtility::operator= ( const DatabaseUtility rhs)

Definition at line 23 of file DatabaseUtility.cc.

References m_session.

23  {
24  m_session = rhs.m_session;
25  return *this;
26 }
Handle< DatabaseUtilitySession > m_session

Member Data Documentation

Handle<DatabaseUtilitySession> ora::DatabaseUtility::m_session
private

Definition at line 51 of file DatabaseUtility.h.

Referenced by operator=().