1 #ifndef CondCore_CondDB_Session_h
2 #define CondCore_CondDB_Session_h
25 #include <boost/shared_ptr.hpp>
36 namespace persistency {
38 class SessionConfiguration;
47 void start(
bool readOnly=
true );
65 explicit Session(
const std::shared_ptr<SessionImpl>& sessionImpl );
102 template <
typename T>
117 const boost::posix_time::ptime& creationTime = boost::posix_time::microsec_clock::universal_time() );
167 throwException(
"Payload with id="+payloadHash+
" has not been found in the database.",
168 "Session::fetchPayload" );
169 return deserialize<T>( payloadType, payloadData,
isOraSession() );
178 void start(
bool readOnly=
true );
GTEditor editGlobalTag(const std::string &name)
Transaction(SessionImpl &session)
bool fetchPayloadData(const cond::Hash &payloadHash, std::string &payloadType, cond::Binary &payloadData)
boost::shared_ptr< T > fetchPayload(const cond::Hash &payloadHash)
void start(bool readOnly=true)
void addToMigrationLog(const std::string &sourceAccount, const std::string &sourceTag, const std::string &destinationTag)
Transaction & m_transaction
TransactionScope(Transaction &transaction)
Transaction & transaction()
std::string demangledName(const std::type_info &typeInfo)
IOVProxy readIov(const std::string &tag, bool full=false)
Transaction & operator=(const Transaction &rhs)
coral::ISchema & nominalSchema()
void start(bool readOnly=true)
std::string connectionString()
IOVEditor editIov(const std::string &tag)
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)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
coral::ISessionProxy & coralSession()
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::OFFLINE)
Binary serialize(const T &payload, bool packingOnly=false)
GTEditor createGlobalTag(const std::string &name)
Session & operator=(const Session &rhs)
GTProxy readGlobalTag(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)