#include <FEConfigSpikeInfo.h>
Definition at line 11 of file FEConfigSpikeInfo.h.
FEConfigSpikeInfo::FEConfigSpikeInfo |
( |
| ) |
|
FEConfigSpikeInfo::~FEConfigSpikeInfo |
( |
| ) |
|
void FEConfigSpikeInfo::clear |
( |
void |
| ) |
|
|
private |
void FEConfigSpikeInfo::fetchData |
( |
FEConfigSpikeInfo * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 125 of file FEConfigSpikeInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, and query::result.
131 throw(std::runtime_error(
"FEConfigSpikeInfo::fetchData(): no Id defined for this FEConfigSpikeInfo "));
138 " where ( spi_conf_id= :1 or (tag=:2 AND version=:3 ) )" );
148 result->
setId(rset->getInt(1));
151 Date dbdate = rset->getDate(4);
155 throw(std::runtime_error(
"FEConfigSpikeInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
std::string getConfigTag()
void setDBTime(const Tm &x)
void checkConnection() const
int FEConfigSpikeInfo::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 184 of file FEConfigSpikeInfo.cc.
References alignCSCRings::e.
195 stmt->setSQL(
"SELECT spi_conf_id FROM "+
getTable()+
196 " WHERE tag=:1 and version=:2 " );
204 m_ID = rset->getInt(1);
208 m_conn->terminateStatement(stmt);
210 throw(std::runtime_error(
"FEConfigSpikeInfo::fetchID: "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
std::string getConfigTag()
void checkConnection() const
void FEConfigSpikeInfo::fetchLastData |
( |
FEConfigSpikeInfo * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 159 of file FEConfigSpikeInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, and query::result.
168 " where spi_conf_id = ( select max( spi_conf_id) from "+
getTable() +
" ) " );
173 result->
setId(rset->getInt(1));
176 Date dbdate = rset->getDate(4);
180 throw(std::runtime_error(
"FEConfigSpikeInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
void setDBTime(const Tm &x)
void checkConnection() const
int FEConfigSpikeInfo::fetchNextId |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 37 of file FEConfigSpikeInfo.cc.
References alignCSCRings::e, and query::result.
44 m_readStmt->setSQL(
"select FE_CONFIG_SPI_SQ.NextVal from DUAL ");
46 while (rset->next ()){
47 result= rset->getInt(1);
54 throw(std::runtime_error(
"FEConfigSpikeInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void checkConnection() const
Tm FEConfigSpikeInfo::getDBTime |
( |
| ) |
const |
|
inline |
int FEConfigSpikeInfo::getId |
( |
| ) |
const |
|
inline |
int FEConfigSpikeInfo::getID |
( |
| ) |
|
|
inline |
std::string FEConfigSpikeInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
int FEConfigSpikeInfo::getVersion |
( |
| ) |
const |
|
inline |
void FEConfigSpikeInfo::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 59 of file FEConfigSpikeInfo.cc.
References alignCSCRings::e, and getId().
72 " VALUES ( :1, :2, :3 ) " );
78 throw(std::runtime_error(
"FEConfigSpikeInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void FEConfigSpikeInfo::setByID |
( |
int |
id | ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 218 of file FEConfigSpikeInfo.cc.
References DateHandler::dateToTm(), cuy::dh, and alignCSCRings::e.
228 stmt->setSQL(
"SELECT * FROM "+
getTable()+
" WHERE spi_conf_id = :1");
233 this->
setId(rset->getInt(1));
236 Date dbdate = rset->getDate(4);
239 throw(std::runtime_error(
"FEConfigSpikeInfo::setByID: Given spi_conf_id is not in the database"));
242 m_conn->terminateStatement(stmt);
244 throw(std::runtime_error(
"FEConfigSpikeInfo::setByID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
void setDBTime(const Tm &x)
void checkConnection() const
void FEConfigSpikeInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void FEConfigSpikeInfo::setId |
( |
int |
id | ) |
|
|
inline |
void FEConfigSpikeInfo::setID |
( |
int |
id | ) |
|
|
inline |
void FEConfigSpikeInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 83 of file FEConfigSpikeInfo.cc.
88 for( std::map<std::string, std::string >::const_iterator ci=
89 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
91 if(ci->first==
"VERSION")
setVersion(atoi(ci->second.c_str()) );
void setConfigTag(std::string x)
void FEConfigSpikeInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void FEConfigSpikeInfo::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 98 of file FEConfigSpikeInfo.cc.
References alignCSCRings::e.
114 throw(std::runtime_error(
"FEConfigSpikeInfo::writeDB(): "+e.getMessage()));
118 throw(std::runtime_error(
"FEConfigSpikeInfo::writeDB: Failed to write"));
oracle::occi::SQLException SQLException
std::string getConfigTag()
void checkConnection() const
Tm FEConfigSpikeInfo::m_db_time |
|
private |
int FEConfigSpikeInfo::m_ID |
|
private |
int FEConfigSpikeInfo::m_version |
|
private |