7 namespace persistency {
10 m_session( &session ){
14 m_session( rhs.m_session ){
40 m_transaction( *m_session ){
44 m_session( sessionImpl ),
45 m_transaction( *m_session ){
49 m_session( rhs.m_session ),
50 m_transaction( rhs.m_transaction ){
73 return m_session->transaction->iovDbExists;
84 proxy.
load( tag, full );
90 return m_session->iovSchema().tagTable().select( tag );
102 if(
m_session->iovSchema().tagTable().select( tag ) )
103 throwException(
"The specified tag \""+tag+
"\" already exist in the database.",
"Session::createIov");
111 if(
m_session->iovSchema().tagTable().select( tag ) )
112 throwException(
"The specified tag \""+tag+
"\" already exist in the database.",
"Session::createIovForPayload");
114 if( !
m_session->iovSchema().payloadTable().getType( payloadHash, payloadType ) )
115 throwException(
"The specified payloadId \""+payloadHash+
"\" does not exist in the database.",
"Session::createIovForPayload");
129 if(
m_session->gtSchema().gtTable().select( name ) )
130 throwException(
"The specified Global Tag \""+name+
"\" already exist in the database.",
"Session::createGlobalTag");
152 proxy.
load( name, preFix, postFix );
158 const boost::posix_time::ptime& creationTime ){
160 return m_session->iovSchema().payloadTable().insertIfNew( payloadObjectType, payloadData, creationTime );
167 return m_session->iovSchema().payloadTable().select( payloadHash, payloadType, payloadData );
175 if(!
m_session->iovSchema().tagMigrationTable().exists() )
m_session->iovSchema().tagMigrationTable().create();
177 return m_session->iovSchema().tagMigrationTable().select( sourceAccount, sourceTag, destTag );
181 if(!
m_session->iovSchema().tagMigrationTable().exists() )
m_session->iovSchema().tagMigrationTable().create();
182 m_session->iovSchema().tagMigrationTable().insert( sourceAccount, sourceTag, destTag,
183 boost::posix_time::microsec_clock::universal_time() );
200 m_transaction(transaction),m_status(
true){
GTEditor editGlobalTag(const std::string &name)
Transaction(SessionImpl &session)
void load(const std::string &tag, bool full=false)
bool fetchPayloadData(const cond::Hash &payloadHash, std::string &payloadType, cond::Binary &payloadData)
void start(bool readOnly=true)
void addToMigrationLog(const std::string &sourceAccount, const std::string &sourceTag, const std::string &destinationTag)
void load(const std::string &tag)
Transaction & m_transaction
TransactionScope(Transaction &transaction)
Transaction & transaction()
IOVProxy readIov(const std::string &tag, bool full=false)
Transaction & operator=(const Transaction &rhs)
void load(const std::string >Name, const std::string &preFix="", const std::string &postFix="")
coral::ISchema & nominalSchema()
void start(bool readOnly=true)
std::string connectionString()
IOVEditor editIov(const std::string &tag)
void startTransaction(bool readOnly=true)
IOVEditor createIovForPayload(const Hash &payloadHash, const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::OFFLINE)
bool checkMigrationLog(const std::string &sourceAccount, const std::string &sourceTag, std::string &destinationTag)
bool existsIov(const std::string &tag)
coral::ISessionProxy & coralSession()
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::OFFLINE)
bool isTransactionActive(bool deep=true) const
GTEditor createGlobalTag(const std::string &name)
void rollbackTransaction()
Session & operator=(const Session &rhs)
GTProxy readGlobalTag(const std::string &name)
void load(const std::string >Name)
Transaction m_transaction
void throwException(const std::string &message, const std::string &methodName)
std::shared_ptr< SessionImpl > m_session
cond::Hash storePayloadData(const std::string &payloadObjectType, const cond::Binary &payloadData, const boost::posix_time::ptime &creationTime)