CMS 3D CMS Logo

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

#include <GTSchema.h>

Inheritance diagram for cond::persistency::GLOBAL_TAG::Table:
cond::persistency::IGTTable

Public Member Functions

void create () override
 
bool exists () override
 
void insert (const std::string &name, cond::Time_t validity, const std::string &description, const std::string &release, const boost::posix_time::ptime &snapshotTime, const boost::posix_time::ptime &insertionTime) override
 
bool select (const std::string &name) override
 
bool select (const std::string &name, cond::Time_t &validity, boost::posix_time::ptime &snapshotTime) override
 
bool select (const std::string &name, cond::Time_t &validity, std::string &description, std::string &release, boost::posix_time::ptime &snapshotTime) override
 
 Table (coral::ISchema &schema)
 
void update (const std::string &name, cond::Time_t validity, const std::string &description, const std::string &release, const boost::posix_time::ptime &snapshotTime, const boost::posix_time::ptime &insertionTime) override
 
 ~Table () override
 
- Public Member Functions inherited from cond::persistency::IGTTable
virtual ~IGTTable ()
 

Private Attributes

coral::ISchema & m_schema
 

Detailed Description

Definition at line 22 of file GTSchema.h.

Constructor & Destructor Documentation

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

Definition at line 8 of file GTSchema.cc.

8  :
9  m_schema( schema ){
10  }
cond::persistency::GLOBAL_TAG::Table::~Table ( )
inlineoverride

Member Function Documentation

void Table::create ( )
overridevirtual

Implements cond::persistency::IGTTable.

Definition at line 16 of file GTSchema.cc.

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

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

16  {
17  if( exists() ){
18  throwException( "GLOBAL_TAG table already exists in this schema.",
19  "GLOBAL_TAG::Table::create");
20  }
21  TableDescription< NAME, VALIDITY, DESCRIPTION, RELEASE, SNAPSHOT_TIME, INSERTION_TIME > descr( tname );
22  descr.setPrimaryKey<NAME>();
23  createTable( m_schema, descr.get() );
24  }
static char const * tname
Definition: GTSchema.h:13
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:14
bool Table::exists ( )
overridevirtual

Implements cond::persistency::IGTTable.

Definition at line 12 of file GTSchema.cc.

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

Referenced by create(), and cond::persistency::GTSchema::exists().

12  {
13  return existsTable( m_schema, tname );
14  }
static char const * tname
Definition: GTSchema.h:13
void Table::insert ( const std::string &  name,
cond::Time_t  validity,
const std::string &  description,
const std::string &  release,
const boost::posix_time::ptime &  snapshotTime,
const boost::posix_time::ptime &  insertionTime 
)
overridevirtual

Implements cond::persistency::IGTTable.

Definition at line 56 of file GTSchema.cc.

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

Referenced by BeautifulSoup.PageElement::append().

61  {
62  RowBuffer< NAME, VALIDITY, DESCRIPTION, RELEASE, SNAPSHOT_TIME, INSERTION_TIME >
63  dataToInsert( std::tie( name, validity, description, release, snapshotTime, insertionTime ) );
64  insertInTable( m_schema, tname, dataToInsert.get() );
65  }
static char const * tname
Definition: GTSchema.h:13
bool Table::select ( const std::string &  name)
overridevirtual
bool Table::select ( const std::string &  name,
cond::Time_t validity,
boost::posix_time::ptime &  snapshotTime 
)
overridevirtual
bool Table::select ( const std::string &  name,
cond::Time_t validity,
std::string &  description,
std::string &  release,
boost::posix_time::ptime &  snapshotTime 
)
overridevirtual
void Table::update ( const std::string &  name,
cond::Time_t  validity,
const std::string &  description,
const std::string &  release,
const boost::posix_time::ptime &  snapshotTime,
const boost::posix_time::ptime &  insertionTime 
)
overridevirtual

Implements cond::persistency::IGTTable.

Definition at line 67 of file GTSchema.cc.

References cond::persistency::UpdateBuffer::addWhereCondition(), edmScanValgrind::buffer, m_schema, dataset::name, cmsRelvalreport::RELEASE, cond::persistency::UpdateBuffer::setColumnData(), and cond::persistency::GLOBAL_TAG::tname.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

72  {
73  UpdateBuffer buffer;
74  buffer.setColumnData< VALIDITY, DESCRIPTION, RELEASE, SNAPSHOT_TIME, INSERTION_TIME >( std::tie( validity, description, release, snapshotTime, insertionTime ) );
75  buffer.addWhereCondition<NAME>( name );
76  updateTable( m_schema, tname, buffer );
77  }
static char const * tname
Definition: GTSchema.h:13

Member Data Documentation

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

Definition at line 37 of file GTSchema.h.

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