13 m_writeStmt =
nullptr;
26 this->checkConnection();
29 m_writeStmt = m_conn->createStatement();
30 m_writeStmt->setSQL(
"INSERT INTO " + getTable() +
31 " (rec_id, fed_id, tr_id, tt_id, time_corr, STATUS ) " 32 "VALUES (:1, :2, :3, :4, :5 , :6 )");
34 throw(std::runtime_error(
"ODTowersToByPassDat::prepareWrite(): " +
e.getMessage()));
39 this->checkConnection();
42 m_writeStmt->setInt(1,
item->getId());
43 m_writeStmt->setInt(2,
item->getFedId());
44 m_writeStmt->setInt(3,
item->getTrId());
45 m_writeStmt->setInt(4,
item->getTTId());
46 m_writeStmt->setInt(5,
item->getTimeCorr());
47 m_writeStmt->setInt(6,
item->getStatus());
49 m_writeStmt->executeUpdate();
51 throw(std::runtime_error(
"ODTowersToByPassDat::writeDB(): " +
e.getMessage()));
56 this->checkConnection();
58 iov->setConnection(m_env, m_conn);
59 int iovID = iov->fetchID();
66 m_readStmt->setSQL(
"SELECT * FROM " + getTable() +
" WHERE rec_id = :rec_id order by fed_id, tr_id, tt_id ");
67 m_readStmt->setInt(1, iovID);
68 ResultSet* rset = m_readStmt->executeQuery();
72 while (rset->next()) {
84 throw(std::runtime_error(
"ODTowersToByPassDat::fetchData(): " +
e.getMessage()));
92 this->checkConnection();
94 int iovID = iov->fetchID();
96 throw(std::runtime_error(
"ODDelays::writeArrayDB: ODFEDelaysInfo not in DB"));
99 int nrows =
data.size();
100 int* ids =
new int[nrows];
101 int*
xx =
new int[nrows];
102 int*
yy =
new int[nrows];
103 int*
zz =
new int[nrows];
104 int*
ww =
new int[nrows];
105 int* st =
new int[nrows];
107 ub2* ids_len =
new ub2[nrows];
108 ub2* x_len =
new ub2[nrows];
109 ub2* y_len =
new ub2[nrows];
110 ub2* z_len =
new ub2[nrows];
111 ub2* w_len =
new ub2[nrows];
112 ub2* st_len =
new ub2[nrows];
134 m_writeStmt->setDataBuffer(1, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
135 m_writeStmt->setDataBuffer(2, (dvoid*)
xx, OCCIINT,
sizeof(
xx[0]), x_len);
136 m_writeStmt->setDataBuffer(3, (dvoid*)
yy, OCCIINT,
sizeof(
yy[0]), y_len);
137 m_writeStmt->setDataBuffer(4, (dvoid*)
zz, OCCIINT,
sizeof(
zz[0]), z_len);
138 m_writeStmt->setDataBuffer(5, (dvoid*)
ww, OCCIINT,
sizeof(
ww[0]), w_len);
139 m_writeStmt->setDataBuffer(6, (dvoid*)st, OCCIINT,
sizeof(st[0]), st_len);
141 m_writeStmt->executeArrayUpdate(nrows);
158 throw(std::runtime_error(
"ODTowersToByPassDat::writeArrayDB(): " +
e.getMessage()));
void prepareWrite() noexcept(false) override
void writeDB(const ODTowersToByPassDat *item, ODTowersToByPassInfo *iov) noexcept(false)
void fetchData(std::vector< ODTowersToByPassDat > *fillMap, ODTowersToByPassInfo *iov) noexcept(false)
void writeArrayDB(const std::vector< ODTowersToByPassDat > &data, ODTowersToByPassInfo *iov) noexcept(false)
void setTimeCorr(int dac)
char data[epos_bytes_allocation]
oracle::occi::SQLException SQLException
~ODTowersToByPassDat() override