#include <FEConfigCokeInfo.h>
Definition at line 11 of file FEConfigCokeInfo.h.
FEConfigCokeInfo::FEConfigCokeInfo |
( |
| ) |
|
FEConfigCokeInfo::~FEConfigCokeInfo |
( |
| ) |
|
|
override |
void FEConfigCokeInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 103 of file FEConfigCokeInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, Exception, and mps_fire::result.
107 throw(std::runtime_error(
"FEConfigCokeInfo::fetchData(): no Id defined for this FEConfigCokeInfo "));
113 m_readStmt->setSQL(
"SELECT * FROM " +
getTable() +
" where ( coke_conf_id= :1 or (tag=:2 AND version=:3 ) )");
123 result->
setId(rset->getInt(1));
127 Date dbdate = rset->getDate(4);
131 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::fetchData(): " << e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getTable() override
void setDBTime(const Tm &x)
void checkConnection() const noexcept(false)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
std::string getConfigTag()
int FEConfigCokeInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 158 of file FEConfigCokeInfo.cc.
References alignCSCRings::e, and Exception.
168 stmt->setSQL(
"SELECT coke_conf_id FROM " +
getTable() +
" WHERE tag=:1 and version=:2 ");
173 ResultSet* rset = stmt->executeQuery();
176 m_ID = rset->getInt(1);
180 m_conn->terminateStatement(stmt);
182 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::fetchID: " << e.getMessage();
oracle::occi::Connection * m_conn
std::string getTable() override
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
std::string getConfigTag()
Definition at line 135 of file FEConfigCokeInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, Exception, and mps_fire::result.
141 m_readStmt->setSQL(
"SELECT * FROM " +
getTable() +
" where coke_conf_id = ( select max( coke_conf_id) from " +
147 result->
setId(rset->getInt(1));
150 Date dbdate = rset->getDate(4);
154 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::fetchData(): " << e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getTable() override
void setDBTime(const Tm &x)
void checkConnection() const noexcept(false)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
int FEConfigCokeInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
Definition at line 29 of file FEConfigCokeInfo.cc.
References alignCSCRings::e, Exception, and mps_fire::result.
35 m_readStmt->setSQL(
"select FE_CONFIG_COKE_SQ.NextVal from DUAL ");
37 while (rset->next()) {
38 result = rset->getInt(1);
45 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::fetchNextId(): " << e.getMessage();
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
Tm FEConfigCokeInfo::getDBTime |
( |
| ) |
const |
|
inline |
int FEConfigCokeInfo::getId |
( |
void |
| ) |
const |
|
inline |
int FEConfigCokeInfo::getID |
( |
| ) |
|
|
inline |
std::string FEConfigCokeInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
int FEConfigCokeInfo::getVersion |
( |
| ) |
const |
|
inline |
void FEConfigCokeInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 49 of file FEConfigCokeInfo.cc.
References alignCSCRings::e, Exception, and getId().
60 " ( coke_conf_id, tag, version) "
61 " VALUES ( :1, :2, :3 ) ");
67 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::prepareWrite(): " << e.getMessage();
oracle::occi::Connection * m_conn
std::string getTable() override
void checkConnection() const noexcept(false)
int fetchNextId() noexcept(false)
oracle::occi::SQLException SQLException
void FEConfigCokeInfo::setByID |
( |
int |
id | ) |
|
|
noexcept |
Definition at line 188 of file FEConfigCokeInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, and Exception.
196 stmt->setSQL(
"SELECT * FROM " +
getTable() +
" WHERE coke_conf_id = :1");
199 ResultSet* rset = stmt->executeQuery();
201 this->
setId(rset->getInt(1));
205 Date dbdate = rset->getDate(4);
208 throw(std::runtime_error(
"FEConfigCokeInfo::setByID: Given config_id is not in the database"));
211 m_conn->terminateStatement(stmt);
213 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::setByID: " << e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getTable() override
void setDBTime(const Tm &x)
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
void FEConfigCokeInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void FEConfigCokeInfo::setId |
( |
int |
id | ) |
|
|
inline |
void FEConfigCokeInfo::setID |
( |
int |
id | ) |
|
|
inline |
void FEConfigCokeInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 71 of file FEConfigCokeInfo.cc.
75 for (std::map<std::string, std::string>::const_iterator ci = my_keys_map.begin(); ci != my_keys_map.end(); ci++) {
76 if (ci->first ==
"VERSION")
78 if (ci->first ==
"TAG")
void setConfigTag(std::string x)
void FEConfigCokeInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void FEConfigCokeInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 83 of file FEConfigCokeInfo.cc.
References alignCSCRings::e, and Exception.
95 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::writeDB(): " << e.getMessage();
99 throw(std::runtime_error(
"FEConfigCokeInfo::writeDB: Failed to write"));
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
std::string getConfigTag()
void checkPrepare() noexcept(false)
Tm FEConfigCokeInfo::m_db_time |
|
private |
int FEConfigCokeInfo::m_ID |
|
private |
int FEConfigCokeInfo::m_version |
|
private |