13 m_writeStmt =
nullptr;
25 this->checkConnection();
28 m_writeStmt = m_conn->createStatement();
29 m_writeStmt->setSQL(
"INSERT INTO " + getTable() +
30 " (rec_id, tcc_id, fed_id, tt_id, status ) " 31 "VALUES (:1, :2, :3, :4, :5 )");
33 throw(std::runtime_error(
"FEConfigBadTTDat::prepareWrite(): " +
e.getMessage()));
38 this->checkConnection();
41 m_writeStmt->setInt(1,
item->getId());
42 m_writeStmt->setInt(2,
item->getTCCId());
43 m_writeStmt->setInt(3,
item->getFedId());
44 m_writeStmt->setInt(4,
item->getTTId());
45 m_writeStmt->setInt(5,
item->getStatus());
47 m_writeStmt->executeUpdate();
49 throw(std::runtime_error(
"FEConfigBadTTDat::writeDB(): " +
e.getMessage()));
54 this->checkConnection();
56 iov->setConnection(m_env, m_conn);
57 int iovID = iov->fetchID();
64 m_readStmt->setSQL(
"SELECT * FROM " + getTable() +
" WHERE rec_id = :rec_id order by tcc_id, fed_id, tt_id ");
65 m_readStmt->setInt(1, iovID);
66 ResultSet* rset = m_readStmt->executeQuery();
70 while (rset->next()) {
80 throw(std::runtime_error(
"FEConfigBadTTDat::fetchData(): " +
e.getMessage()));
87 this->checkConnection();
89 int iovID = iov->fetchID();
91 throw(std::runtime_error(
"FEConfigDelays::writeArrayDB: FEConfigBadTTInfo not in DB"));
94 int nrows =
data.size();
95 int* ids =
new int[nrows];
96 int*
xx =
new int[nrows];
97 int*
yy =
new int[nrows];
98 int*
zz =
new int[nrows];
99 int* st =
new int[nrows];
101 ub2* ids_len =
new ub2[nrows];
102 ub2* x_len =
new ub2[nrows];
103 ub2* y_len =
new ub2[nrows];
104 ub2* z_len =
new ub2[nrows];
105 ub2* st_len =
new ub2[nrows];
125 m_writeStmt->setDataBuffer(1, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
126 m_writeStmt->setDataBuffer(2, (dvoid*)
xx, OCCIINT,
sizeof(
xx[0]), x_len);
127 m_writeStmt->setDataBuffer(3, (dvoid*)
yy, OCCIINT,
sizeof(
yy[0]), y_len);
128 m_writeStmt->setDataBuffer(4, (dvoid*)
zz, OCCIINT,
sizeof(
zz[0]), z_len);
129 m_writeStmt->setDataBuffer(5, (dvoid*)st, OCCIINT,
sizeof(st[0]), st_len);
131 m_writeStmt->executeArrayUpdate(nrows);
146 throw(std::runtime_error(
"FEConfigBadTTDat::writeArrayDB(): " +
e.getMessage()));
void prepareWrite() noexcept(false) override
void fetchData(std::vector< FEConfigBadTTDat > *fillMap, FEConfigBadTTInfo *iov) noexcept(false)
~FEConfigBadTTDat() override
void writeDB(const FEConfigBadTTDat *item, FEConfigBadTTInfo *iov) noexcept(false)
char data[epos_bytes_allocation]
oracle::occi::SQLException SQLException
void writeArrayDB(const std::vector< FEConfigBadTTDat > &data, FEConfigBadTTInfo *iov) noexcept(false)