4#ifndef STORAGESVC_DBCONTAINER_H
5#define STORAGESVC_DBCONTAINER_H
47 if ( © !=
this ) {
61 const std::string&
name()
const;
89 const std::string& nam,
102 const std::string& nam,
This file contains the class definition for the Token class (migrated from POOL).
DbContainer(const DbType &typ=pool::POOL_StorageType)
Constructor with initializing arguments.
StatusCode store(const void *object, const DbTypeInfo *typ)
Access objects by handle directly.
const ITechContainer * info() const
Let the implementation access the internals.
StatusCode close()
Close the container the handle points to.
StatusCode open(DbDatabase &dbH, const std::string &nam, const DbTypeInfo *typ, const DbType &dbtyp, Io::IoFlag mod)
Open the container residing in <file> with given name and access mode.
StatusCode next(Token::OID_t &linkH)
Access objects through select staements.
DbContainer(DbContainerObj *ptr)
Constructor taking transient object.
int refCount() const
Access reference counter.
const Token * token() const
Access the token of the container object.
StatusCode allocate(const void *object, const DbTypeInfo *tinfo, Token::OID_t &oid)
Access objects using pointer and shape.
StatusCode setOption(const DbOption &refOpt)
Pass options to the implementation.
void switchPtr(DbContainerObj *obj)
Assign transient object properly (including reference counting).
StatusCode transAct(Transaction::Action action)
Execute Database Transaction Action.
uint64_t size()
Access to the size of the container.
DbContainer(const DbContainer &c)
Copy constructor.
const std::string & name() const
Name of the container the handle is supposed to point to.
StatusCode checkAccess(DbDatabase &dbH, const std::string &nam, const DbType &dbtyp)
Check if we can access the residing in <file> container for reading with the given type.
Io::IoFlag openMode() const
Mode of the handle (READ,WRITE,...).
DbContainer & operator=(const int)
Assignment operator to reset the handle easily using 0.
const DbTypeInfo * objectShape(const Guid &nam)
Retrieve persistent type information by name.
DbDatabase & containedIn()
Access to the Database the container resides in.
DbContainer & operator=(const DbContainer ©)
Assignment operator.
bool isOpen() const
Check if the container was opened.
StatusCode load(void **ptr, const DbTypeInfo *tinfo, const Token::OID_t &lH)
Select object in the container identified by its handle.
StatusCode getOption(DbOption &refOpt)
Access options.
virtual ~DbContainer()
Standard Destructor.
Description: Handle managing a DbDatabaseObj, a generic Database object.
DbHandleBase< _DataType > Base
const DbContainerObj * ptr() const
Description: Definition an option to be supplied to database objects.
Definition of class DbTypeInfo.
Keeps information about storage technology.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Description: Interface to the technology specific implementation of the Container object.
This class provides a token that identifies in a unique way objects on the persistent storage.
::StatusCode StatusCode
StatusCode definition for legacy code.
static const DbType POOL_StorageType