![]() |
![]() |
#include <LMFRunTag.h>
Public Types | |
typedef LMFUnique::ResultSet | ResultSet |
Public Member Functions | |
std::string | getGeneralTag () const |
int | getVersion () const |
bool | isValid () |
LMFRunTag () | |
LMFRunTag (oracle::occi::Environment *env, oracle::occi::Connection *conn) | |
LMFRunTag (EcalDBConnection *c) | |
bool | operator!= (const LMFRunTag &t) const |
bool | operator== (const LMFRunTag &t) const |
LMFRunTag & | set (const std::string &tag, int vers) |
LMFRunTag & | setGeneralTag (const std::string &tag) |
LMFRunTag & | setVersion (int v) |
~LMFRunTag () | |
Private Member Functions | |
LMFUnique * | createObject () const |
std::string | fetchAllSql (Statement *stmt) const |
std::string | fetchIdSql (Statement *stmt) |
void | getParameters (ResultSet *rset) |
std::string | setByIDSql (Statement *stmt, int id) |
Friends | |
class | LMFRunIOV |
Tag for LMF Run
Definition at line 16 of file LMFRunTag.h.
Reimplemented from LMFUnique.
Definition at line 18 of file LMFRunTag.h.
LMFRunTag::LMFRunTag | ( | ) |
Definition at line 6 of file LMFRunTag.cc.
References LMFUnique::m_intFields, LMFUnique::m_stringFields, and LMFUnique::setClassName().
Referenced by createObject().
: LMFUnique() { setClassName("LMFRunTag"); m_stringFields["gen_tag"] = "default"; m_intFields["version"] = 1; }
LMFRunTag::LMFRunTag | ( | oracle::occi::Environment * | env, |
oracle::occi::Connection * | conn | ||
) |
Definition at line 13 of file LMFRunTag.cc.
References LMFUnique::m_intFields, LMFUnique::m_stringFields, and LMFUnique::setClassName().
: LMFUnique(env, conn) { setClassName("LMFRunTag"); m_stringFields["gen_tag"] = "default"; m_intFields["version"] = 1; }
LMFRunTag::LMFRunTag | ( | EcalDBConnection * | c | ) |
Definition at line 21 of file LMFRunTag.cc.
References LMFUnique::m_intFields, LMFUnique::m_stringFields, and LMFUnique::setClassName().
: LMFUnique(c) { setClassName("LMFRunTag"); m_stringFields["gen_tag"] = "default"; m_intFields["version"] = 1; }
LMFRunTag::~LMFRunTag | ( | ) |
Definition at line 27 of file LMFRunTag.cc.
{ }
LMFUnique * LMFRunTag::createObject | ( | ) | const [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 74 of file LMFRunTag.cc.
References LMFRunTag(), IDBObject::m_conn, IDBObject::m_env, IDBObject::setConnection(), and matplotRender::t.
std::string LMFRunTag::fetchAllSql | ( | Statement * | stmt | ) | const [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 80 of file LMFRunTag.cc.
{ std::string sql = "SELECT TAG_ID FROM LMF_RUN_TAG"; stmt->setSQL(sql); return sql; }
std::string LMFRunTag::fetchIdSql | ( | Statement * | stmt | ) | [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 51 of file LMFRunTag.cc.
References getGeneralTag(), and getVersion().
{ std::string sql = "SELECT tag_id FROM lmf_run_tag WHERE " "gen_tag = :1 AND version = :2"; stmt->setSQL(sql); stmt->setString(1, getGeneralTag()); stmt->setInt(2, getVersion()); return sql; }
string LMFRunTag::getGeneralTag | ( | ) | const |
Definition at line 31 of file LMFRunTag.cc.
References LMFUnique::getString().
Referenced by fetchIdSql(), isValid(), operator!=(), and operator==().
{ return getString("gen_tag"); }
void LMFRunTag::getParameters | ( | ResultSet * | rset | ) | [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 69 of file LMFRunTag.cc.
References LMFUnique::setInt(), and LMFUnique::setString().
int LMFRunTag::getVersion | ( | ) | const |
Definition at line 47 of file LMFRunTag.cc.
References LMFUnique::getInt().
Referenced by fetchIdSql(), isValid(), operator!=(), and operator==().
{ return getInt("version"); }
bool LMFRunTag::isValid | ( | void | ) |
Definition at line 86 of file LMFRunTag.cc.
References getGeneralTag(), getVersion(), and runTheMatrix::ret.
{ bool ret = true; if (getVersion() <= 0) { ret = false; } if (getGeneralTag().length() <= 0) { ret = false; } return ret; }
bool LMFRunTag::operator!= | ( | const LMFRunTag & | t | ) | const [inline] |
Definition at line 46 of file LMFRunTag.h.
References getGeneralTag(), and getVersion().
{ return ((getGeneralTag() != t.getGeneralTag()) || (getVersion() != t.getVersion())); }
bool LMFRunTag::operator== | ( | const LMFRunTag & | t | ) | const [inline] |
Definition at line 42 of file LMFRunTag.h.
References getGeneralTag(), and getVersion().
{ return ((getGeneralTag() == t.getGeneralTag()) && (getVersion() == t.getVersion())); }
LMFRunTag& LMFRunTag::set | ( | const std::string & | tag, |
int | vers | ||
) | [inline] |
Definition at line 33 of file LMFRunTag.h.
References setGeneralTag(), setVersion(), and GlobalPosition_Frontier_DevDB_cff::tag.
{ setGeneralTag(tag); setVersion(vers); return *this; }
std::string LMFRunTag::setByIDSql | ( | Statement * | stmt, |
int | id | ||
) | [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 60 of file LMFRunTag.cc.
{ std::string sql = "SELECT gen_tag, version FROM lmf_run_tag " "WHERE tag_id = :1"; stmt->setSQL(sql); stmt->setInt(1, id); return sql; }
LMFRunTag & LMFRunTag::setVersion | ( | int | v | ) |
friend class LMFRunIOV [friend] |
Definition at line 19 of file LMFRunTag.h.