4 using namespace oracle::occi;
11 m_className =
"LMFIOV";
24 m_className =
"LMFIOV";
84 std::string sql =
"SELECT IOV_ID FROM LMF_IOV "
85 "WHERE IOV_START = :1 AND IOV_STOP = :2 AND "
86 "VMIN = :3 AND VMIN = :4";
89 stmt->setDate(1, dm.
tmToDate(m_iov_start));
90 stmt->setDate(2, dm.
tmToDate(m_iov_stop));
91 stmt->setInt(3, m_vmin);
92 stmt->setInt(4, m_vmax);
98 std::string sql =
"SELECT IOV_START, IOV_STOP, VMIN, VMAX FROM LMF_IOV "
106 Date d = rset->getDate(1);
109 d = rset->getDate(2);
111 m_vmin = rset->getInt(3);
112 m_vmax = rset->getInt(4);
122 cout <<
"################# LMFIOV ######################" << endl;
123 cout <<
"id : " << m_ID << endl;
124 cout <<
"Start: " << m_iov_start.str() << endl;
125 cout <<
"Stop : " << m_iov_stop.str() << endl;
126 cout <<
"Vers.: " << m_vmin <<
" - " << m_vmax << endl;
127 cout <<
"################# LMFIOV ######################" << endl;
133 std::string seqName = sequencePostfix(m_iov_start);
134 std::string sql =
"INSERT INTO LMF_IOV (IOV_ID, IOV_START, IOV_STOP, "
135 "VMIN, VMAX) VALUES "
136 "(lmf_iov_" + seqName +
"_sq.NextVal, :1, :2, :3, :4)";
139 stmt->setDate(1, dm.
tmToDate(m_iov_start));
140 stmt->setDate(2, dm.
tmToDate(m_iov_stop));
141 stmt->setInt(3, m_vmin);
142 stmt->setInt(4, m_vmax);
void getParameters(ResultSet *rset)
LMFIOV & setVmin(int vmin)
LMFIOV & setStop(const Tm &stop)
oracle::occi::ResultSet ResultSet
LMFIOV & setVersions(int vmin, int vmax)
oracle::occi::Environment * getEnv() const
oracle::occi::Connection * getConn() const
LMFIOV & setVmax(int vmax)
oracle::occi::Statement Statement
LMFIOV & setStart(const Tm &start)
std::string setByIDSql(Statement *stmt, int id)
oracle::occi::Date tmToDate(const Tm &inTm) const
LMFIOV & setIOV(const Tm &start, const Tm &stop)
LMFUnique * createObject() const
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
std::string writeDBSql(Statement *stmt)
std::string fetchIdSql(Statement *stmt)
Tm dateToTm(oracle::occi::Date &date) const