25 unique_ptr<coral::IQuery>
q(m_session.nominalSchema().tableHandle(
"L1_BUNCH_GROUP_SET").newQuery());
26 q->setRowCacheSize( 5 );
30 bindList.extend<
int>(
"bgsId");
31 bindList[0].data<
int>() = (
int)
data.id();
32 q->setCondition(
"L1BGS_ID = :bgsId", bindList );
36 attList.extend<std::string>(
"L1BGS_NAME" );
37 attList.extend<
int>(
"L1BGS_VERSION" );
38 attList.extend<std::string>(
"L1BGS_COMMENT" );
41 coral::ICursor&
cursor =
q->execute();
46 throw std::runtime_error(
"BunchGroupSetLoader >> BunchGroupSet not available" );
50 string name =
row[
"L1BGS_NAME"].data<std::string>();
51 int version =
row[
"L1BGS_VERSION"].data<
int>();
52 string comment =
row[
"L1BGS_COMMENT"].data<std::string>();
57 throw std::runtime_error(
"BunchGroupSetLoader >> BunchGroupSet not available" );
68 unique_ptr<coral::IQuery>
q( m_session.nominalSchema().tableHandle(
"L1_BGS_TO_BG").newQuery() );
69 q->setRowCacheSize( 5 );
73 bindList.extend<
int>(
"bgsId");
74 bindList[0].data<
int>() = (
int)
data.id();
75 q->setCondition(
"L1BGS2BG_BUNCH_GROUP_SET_ID = :bgsId ", bindList );
79 attList.extend<
long>(
"L1BGS2BG_BUNCH_GROUP_ID" );
80 attList.extend<
long>(
"L1BGS2BG_INTERNAL_NUMBER" );
82 attList.extend<
string>(
"L1BGS2BG_BUNCH_GROUP_NAME" );
86 q->addToOrderList(
"L1BGS2BG_INTERNAL_NUMBER" );
88 coral::ICursor&
cursor =
q->execute();
95 bg.setId(
row[
"L1BGS2BG_BUNCH_GROUP_ID"].data<long>());
96 bg.setInternalNumber(
row[
"L1BGS2BG_INTERNAL_NUMBER"].data<long>() );
98 bg.setName(
row[
"L1BGS2BG_BUNCH_GROUP_NAME"].data<string>() );
100 if ( !bgldr.
load(
bg ) ) {
103 throw std::runtime_error(
"BunchGroupSetLoader: Error loading BunchGroup" );
112 catch(
const coral::Exception&
e ) {
114 m_session.transaction().rollback();