#include <ODGolBiasCurrentInfo.h>
Definition at line 9 of file ODGolBiasCurrentInfo.h.
ODGolBiasCurrentInfo::ODGolBiasCurrentInfo |
( |
| ) |
|
ODGolBiasCurrentInfo::~ODGolBiasCurrentInfo |
( |
| ) |
|
void ODGolBiasCurrentInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 130 of file ODGolBiasCurrentInfo.cc.
References alignCSCRings::e, and query::result.
136 throw(std::runtime_error(
"ODGolBiasCurrentInfo::fetchData(): no Id defined for this ODGolBiasCurrentInfo "));
142 if(result->
getId()!=0) {
144 " where rec_id = :1 ");
151 " and version = :version " );
157 " WHERE tag = :1 and version= (select max(version) from "+
getTable() +
" where tag=:2) " );
164 throw(std::runtime_error(
"ODGolBiasCurrentInfo::fetchData(): no Id defined for this record "));
174 result->
setId(rset->getInt(1));
179 throw(std::runtime_error(
"ODGolBiasCurrentInfo::fetchData(): "+e.getMessage()));
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
std::string getConfigTag()
void checkConnection() const
int ODGolBiasCurrentInfo::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 183 of file ODGolBiasCurrentInfo.cc.
References alignCSCRings::e.
194 stmt->setSQL(
"SELECT rec_id FROM "+
getTable()+
195 " WHERE tag=:1 and version=:2 " );
203 m_ID = rset->getInt(1);
207 m_conn->terminateStatement(stmt);
209 throw(std::runtime_error(
"ODGolBiasCurrentInfo::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
int ODGolBiasCurrentInfo::fetchNextId |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 36 of file ODGolBiasCurrentInfo.cc.
References alignCSCRings::e, and query::result.
43 m_readStmt->setSQL(
"select COND2CONF_INFO_SQ.NextVal from DUAL ");
45 while (rset->next ()){
46 result= rset->getInt(1);
53 throw(std::runtime_error(
"ODGolBiasCurrentInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void checkConnection() const
int ODGolBiasCurrentInfo::getId |
( |
| ) |
const |
|
inline |
std::string ODGolBiasCurrentInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
int ODGolBiasCurrentInfo::getVersion |
( |
| ) |
const |
|
inline |
void ODGolBiasCurrentInfo::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 58 of file ODGolBiasCurrentInfo.cc.
References alignCSCRings::e, and getId().
71 " VALUES ( :1, :2, :3 ) " );
77 throw(std::runtime_error(
"ODGolBiasCurrentInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void ODGolBiasCurrentInfo::setId |
( |
int |
id | ) |
|
|
inline |
void ODGolBiasCurrentInfo::setParameters |
( |
std::map< std::string, std::string > |
my_keys_map | ) |
|
Definition at line 82 of file ODGolBiasCurrentInfo.cc.
87 for( std::map<std::string, std::string >::iterator ci=
88 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
90 if(ci->first==
"VERSION")
setVersion(atoi(ci->second.c_str()) );
void setConfigTag(std::string x)
void ODGolBiasCurrentInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void ODGolBiasCurrentInfo::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 97 of file ODGolBiasCurrentInfo.cc.
References gather_cfg::cout, and alignCSCRings::e.
113 throw(std::runtime_error(
"ODGolBiasCurrentInfo::writeDB(): "+e.getMessage()));
117 throw(std::runtime_error(
"ODGolBiasCurrentInfo::writeDB: Failed to write"));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void fetchData(ODGolBiasCurrentInfo *result)
std::string getConfigTag()
void checkConnection() const
int ODGolBiasCurrentInfo::m_ID |
|
private |
int ODGolBiasCurrentInfo::m_version |
|
private |