13 #include <boost/lexical_cast.hpp>
24 unique_ptr<coral::IQuery>
q(m_session.nominalSchema().tableHandle(
"L1_RANDOM").newQuery());
25 q->setRowCacheSize( 5 );
28 bindList.extend<
long>(
"rdId");
29 bindList[0].data<
long>() = rdTarget.
id();
31 q->setCondition(
"L1R_ID = :rdId", bindList );
36 attList.extend<std::string>(
"L1R_NAME" );
37 attList.extend<
int>(
"L1R_VERSION" );
38 attList.extend<
long>(
"L1R_RATE1" );
39 attList.extend<
long>(
"L1R_RATE2" );
41 attList.extend<
string>(
"L1R_CUT0" );
42 attList.extend<
string>(
"L1R_CUT1" );
43 attList.extend<
string>(
"L1R_CUT2" );
44 attList.extend<
string>(
"L1R_CUT3" );
48 coral::ICursor&
cursor =
q->execute();
53 throw std::runtime_error(
"RandomLoader >> Random not available" );
58 std::string
name =
row[
"L1R_NAME"].data<std::string>();
60 long rate1 =
row[
"L1R_RATE1"].data<
long>();
61 long rate2 =
row[
"L1R_RATE2"].data<
long>();
68 string cut0 =
row[
"L1R_CUT0"].data<
string>();
69 string cut1 =
row[
"L1R_CUT1"].data<
string>();
70 string cut2 =
row[
"L1R_CUT2"].data<
string>();
71 string cut3 =
row[
"L1R_CUT3"].data<
string>();
73 rdTarget.
setCut( 0, boost::lexical_cast<uint32_t,string>(
cut0 ) );
74 rdTarget.
setCut( 1, boost::lexical_cast<uint32_t,string>(
cut1 ) );
75 rdTarget.
setCut( 2, boost::lexical_cast<uint32_t,string>( cut2 ) );
76 rdTarget.
setCut( 3, boost::lexical_cast<uint32_t,string>( cut3 ) );
82 throw std::runtime_error(
"RandomLoader >> Random not available" );
88 catch(
const coral::Exception&
e ) {
90 m_session.transaction().rollback();