1 #ifndef COND_DBCommon_DbSession_h
2 #define COND_DBCommon_DbSession_h
7 #include <boost/shared_ptr.hpp>
18 class IConnectionService;
69 coral::ISchema&
schema(
const std::string& schemaName);
75 bool importMapping(
const std::string& sourceConnectionString,
76 const std::string& contName );
80 template <
typename T> boost::shared_ptr<T>
getTypedObject(
const std::string& objectId );
82 template <
typename T> std::string
storeObject(
const T*
object,
const std::string& containerName );
84 template <
typename T>
bool updateObject(
const T*
object,
const std::string& objectId );
109 std::string
className(
const std::string& poolToken );
132 const std::string& containerName ){
143 const std::string& objectId ){
PoolTokenParser(ora::Database &db)
boost::shared_ptr< SessionImpl > m_implementation
const std::string & connectionString() const
std::string write(const ora::OId &oid)
bool deleteObject(const std::string &objectId)
std::string classNameForItem(const std::string &objectId)
OId insert(const std::string &containerName, const T &data)
DbTransaction & transaction()
void open(const std::string &connectionString, bool readOnly=false)
const std::string & blobStreamingService() const
void openReadOnly(const std::string &connectionString, const std::string &id)
bool deleteMapping(const std::string &mappingVersion)
coral::ISchema & schema(const std::string &schemaName)
static const char * CHANGE_SCHEMA_VERSION
static const char * COND_SCHEMA_VERSION
ora::OId parse(const std::string &poolToken)
bool isTransactional() const
bool importMapping(const std::string &sourceConnectionString, const std::string &contName)
DbSession & operator=(const DbSession &rhs)
boost::shared_ptr< T > fetch(const OId &oid)
std::string storeObject(const T *object, const std::string &containerName)
PoolTokenWriter(ora::Database &db)
std::string className(const std::string &poolToken)
coral::ISchema & nominalSchema()
std::string toString() const
std::string importObject(cond::DbSession &fromDatabase, const std::string &objectId)
void update(const OId &oid, const T &data)
ora::Object getObject(const std::string &objectId)
bool fromString(const std::string &s)
bool updateObject(const T *object, const std::string &objectId)
boost::shared_ptr< T > getTypedObject(const std::string &objectId)
ora::Database & storage()
const DbConnection & connection() const