CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cond::persistency::TAG_LOG::Table Class Reference

#include <IOVSchema.h>

Inheritance diagram for cond::persistency::TAG_LOG::Table:
cond::persistency::ITagLogTable

Public Member Functions

void create () override
 
bool exists () override
 
void insert (const std::string &tag, const boost::posix_time::ptime &eventTime, const std::string &userName, const std::string &hostName, const std::string &command, const std::string &action, const std::string &userText) override
 
 Table (coral::ISchema &schema)
 
 ~Table () override
 
- Public Member Functions inherited from cond::persistency::ITagLogTable
virtual ~ITagLogTable ()
 

Private Attributes

coral::ISchema & m_schema
 

Detailed Description

Definition at line 159 of file IOVSchema.h.

Constructor & Destructor Documentation

Table::Table ( coral::ISchema &  schema)
explicit

Definition at line 265 of file IOVSchema.cc.

265  :
266  m_schema( schema ){
267  }
cond::persistency::TAG_LOG::Table::~Table ( )
inlineoverride

Member Function Documentation

void Table::create ( )
overridevirtual

Implements cond::persistency::ITagLogTable.

Definition at line 273 of file IOVSchema.cc.

References exists(), cond::persistency::TableDescription< Types >::get(), m_schema, cond::persistency::TableDescription< Types >::setForeignKey(), cond::persistency::TableDescription< Types >::setPrimaryKey(), cond::persistency::throwException(), and cond::persistency::TAG_LOG::tname.

Referenced by cond::persistency::IOVSchema::create(), and o2olib.O2OTool::execute().

273  {
274  if( exists() ){
275  throwException( "TAG_LOG table already exists in this schema.",
276  "TAG_LOG::create");
277  }
278  TableDescription< TAG_NAME, EVENT_TIME, USER_NAME, HOST_NAME, COMMAND, ACTION, USER_TEXT > descr( tname );
279  descr.setPrimaryKey<TAG_NAME, EVENT_TIME, ACTION>();
280  descr.setForeignKey< TAG_NAME, TAG::NAME >( "TAG_NAME_FK" );
281  createTable( m_schema, descr.get() );
282  }
static char const * tname
Definition: IOVSchema.h:149
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:14
bool Table::exists ( )
overridevirtual

Implements cond::persistency::ITagLogTable.

Definition at line 269 of file IOVSchema.cc.

References m_schema, and cond::persistency::TAG_LOG::tname.

Referenced by create().

269  {
270  return existsTable( m_schema, tname );
271  }
static char const * tname
Definition: IOVSchema.h:149
void Table::insert ( const std::string &  tag,
const boost::posix_time::ptime &  eventTime,
const std::string &  userName,
const std::string &  hostName,
const std::string &  command,
const std::string &  action,
const std::string &  userText 
)
overridevirtual

Implements cond::persistency::ITagLogTable.

Definition at line 284 of file IOVSchema.cc.

References cond::persistency::RowBuffer< Columns >::get(), m_schema, and cond::persistency::TAG_LOG::tname.

Referenced by BeautifulSoup.PageElement::append().

290  {
291  RowBuffer< TAG_NAME, EVENT_TIME, USER_NAME, HOST_NAME, COMMAND, ACTION, USER_TEXT >
292  dataToInsert( std::tie( tag, eventTime, userName, hostName, command, action, userText ) );
293  insertInTable( m_schema, tname, dataToInsert.get() );
294  }
static char const * tname
Definition: IOVSchema.h:149
list command
Definition: mps_check.py:25

Member Data Documentation

coral::ISchema& cond::persistency::TAG_LOG::Table::m_schema
private

Definition at line 168 of file IOVSchema.h.

Referenced by create(), exists(), and insert().