37 this->checkConnection();
40 m_writeStmt = m_conn->createStatement();
41 m_writeStmt->setSQL(
"INSERT INTO "+getTable()+
" (rec_id, fed_id, tt_id, gol_id, gol_current, pll_current, status ) " 42 "VALUES (:1, :2, :3, :4, :5 , :6, :7)");
44 throw(std::runtime_error(
"ODGolBiasCurrentDat::prepareWrite(): "+e.getMessage()));
53 this->checkConnection();
56 m_writeStmt->setInt(1, item->getId());
57 m_writeStmt->setInt(2, item->getFedId() );
58 m_writeStmt->setInt(3, item->getTTId() );
59 m_writeStmt->setInt(4, item->getGolId() );
60 m_writeStmt->setInt(5, item->getCurrent() );
61 m_writeStmt->setInt(6, item->getPLLCurrent() );
62 m_writeStmt->setInt(7, item->getStatus() );
65 m_writeStmt->executeUpdate();
67 throw(std::runtime_error(
"ODGolBiasCurrentDat::writeDB(): "+e.getMessage()));
76 this->checkConnection();
78 iov->setConnection(m_env, m_conn);
79 int iovID = iov->fetchID();
86 m_readStmt->setSQL(
"SELECT * FROM " + getTable() +
" WHERE rec_id = :rec_id order by fed_id, tt_id, gol_id ");
87 m_readStmt->setInt(1, iovID);
88 ResultSet* rset = m_readStmt->executeQuery();
107 throw(std::runtime_error(
"ODGolBiasCurrentDat::fetchData(): "+e.getMessage()));
116 this->checkConnection();
118 int iovID = iov->fetchID();
119 if (!iovID) {
throw(std::runtime_error(
"ODDelays::writeArrayDB: ODFEDelaysInfo not in DB")); }
122 int nrows=
data.size();
123 int*
ids=
new int[nrows];
124 int*
xx=
new int[nrows];
125 int*
yy=
new int[nrows];
126 int*
zz=
new int[nrows];
127 int* ww=
new int[nrows];
128 int*
kk=
new int[nrows];
129 int* st=
new int[nrows];
133 ub2* ids_len=
new ub2[nrows];
134 ub2* x_len=
new ub2[nrows];
135 ub2* y_len=
new ub2[nrows];
136 ub2* z_len=
new ub2[nrows];
137 ub2* w_len=
new ub2[nrows];
138 ub2* k_len=
new ub2[nrows];
139 ub2* st_len=
new ub2[nrows];
168 m_writeStmt->setDataBuffer(1, (dvoid*)ids, OCCIINT,
sizeof(ids[0]),ids_len);
169 m_writeStmt->setDataBuffer(2, (dvoid*)xx, OCCIINT ,
sizeof(xx[0]), x_len );
170 m_writeStmt->setDataBuffer(3, (dvoid*)yy, OCCIINT ,
sizeof(yy[0]), y_len );
171 m_writeStmt->setDataBuffer(4, (dvoid*)zz, OCCIINT ,
sizeof(zz[0]), z_len );
172 m_writeStmt->setDataBuffer(5, (dvoid*)ww, OCCIINT ,
sizeof(ww[0]), w_len );
173 m_writeStmt->setDataBuffer(6, (dvoid*)kk, OCCIINT ,
sizeof(kk[0]), k_len );
174 m_writeStmt->setDataBuffer(7, (dvoid*)st, OCCIINT ,
sizeof(st[0]), st_len );
177 m_writeStmt->executeArrayUpdate(nrows);
197 throw(std::runtime_error(
"ODGolBiasCurrentDat::writeArrayDB(): "+e.getMessage()));
void setPLLCurrent(int x)
void fetchData(std::vector< ODGolBiasCurrentDat > *fillMap, ODGolBiasCurrentInfo *iov) noexcept(false)
void prepareWrite() noexcept(false)
void writeDB(const ODGolBiasCurrentDat *item, ODGolBiasCurrentInfo *iov) noexcept(false)
int getPLLCurrent() const
char data[epos_bytes_allocation]
oracle::occi::SQLException SQLException
void writeArrayDB(const std::vector< ODGolBiasCurrentDat > &data, ODGolBiasCurrentInfo *iov) noexcept(false)