14 m_writeStmt =
nullptr;
36 this->checkConnection();
39 m_writeStmt = m_conn->createStatement();
40 m_writeStmt->setSQL(
"INSERT INTO "+getTable()+
" (rec_id, tcc_id,fed_id, tt_id, CRY_id, status ) " 41 "VALUES (:1, :2, :3, :4, :5 ,:6 )");
43 throw(std::runtime_error(
"FEConfigBadXTDat::prepareWrite(): "+e.getMessage()));
52 this->checkConnection();
55 m_writeStmt->setInt(1, item->getId());
56 m_writeStmt->setInt(2, item->getTCCId() );
57 m_writeStmt->setInt(3, item->getFedId());
58 m_writeStmt->setInt(4, item->getTTId() );
59 m_writeStmt->setInt(5, item->getXTId() );
60 m_writeStmt->setInt(6, item->getStatus() );
62 m_writeStmt->executeUpdate();
64 throw(std::runtime_error(
"FEConfigBadXTDat::writeDB(): "+e.getMessage()));
73 this->checkConnection();
75 iov->setConnection(m_env, m_conn);
76 int iovID = iov->fetchID();
83 m_readStmt->setSQL(
"SELECT * FROM " + getTable() +
" WHERE rec_id = :rec_id order by tcc_id, fed_id, tt_id , cry_id ");
84 m_readStmt->setInt(1, iovID);
85 ResultSet* rset = m_readStmt->executeQuery();
101 throw(std::runtime_error(
"FEConfigBadXTDat::fetchData(): "+e.getMessage()));
110 this->checkConnection();
112 int iovID = iov->fetchID();
113 if (!iovID) {
throw(std::runtime_error(
"FEConfigDelays::writeArrayDB: FEConfigBadXTInfo not in DB")); }
116 int nrows=
data.size();
117 int* ids=
new int[nrows];
118 int*
xx=
new int[nrows];
119 int*
yy=
new int[nrows];
120 int*
zz=
new int[nrows];
121 int* z1=
new int[nrows];
122 int* st=
new int[nrows];
126 ub2* ids_len=
new ub2[nrows];
127 ub2* x_len=
new ub2[nrows];
128 ub2* y_len=
new ub2[nrows];
129 ub2* z_len=
new ub2[nrows];
130 ub2* z1_len=
new ub2[nrows];
131 ub2* st_len=
new ub2[nrows];
158 m_writeStmt->setDataBuffer(1, (dvoid*)ids, OCCIINT,
sizeof(ids[0]),ids_len);
159 m_writeStmt->setDataBuffer(2, (dvoid*)xx, OCCIINT ,
sizeof(xx[0]), x_len );
160 m_writeStmt->setDataBuffer(3, (dvoid*)yy, OCCIINT ,
sizeof(yy[0]), y_len );
161 m_writeStmt->setDataBuffer(4, (dvoid*)zz, OCCIINT ,
sizeof(zz[0]), z_len );
162 m_writeStmt->setDataBuffer(5, (dvoid*)z1, OCCIINT ,
sizeof(z1[0]), z1_len );
163 m_writeStmt->setDataBuffer(6, (dvoid*)st, OCCIINT ,
sizeof(st[0]), st_len );
165 m_writeStmt->executeArrayUpdate(nrows);
182 throw(std::runtime_error(
"FEConfigBadXTDat::writeArrayDB(): "+e.getMessage()));
void prepareWrite() noexcept(false) override
void writeDB(const FEConfigBadXTDat *item, FEConfigBadXTInfo *iov) noexcept(false)
void fetchData(std::vector< FEConfigBadXTDat > *fillMap, FEConfigBadXTInfo *iov) noexcept(false)
void writeArrayDB(const std::vector< FEConfigBadXTDat > &data, FEConfigBadXTInfo *iov) noexcept(false)
~FEConfigBadXTDat() override
char data[epos_bytes_allocation]
oracle::occi::SQLException SQLException