Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbObject Class Reference

The transient interface to a condition object. More...

#include <CdbObject.hh>

Inheritance diagram for CdbObject:

CdbBdbObject CdbRooObject CdbRooDbObject CdbRooRoObject List of all members.

Public Member Functions

const CdbConditionPtrparent () const
 Return a smart pointer to the parent condition object.

const BdbTimebeginOriginal () const
 The beginning of the "original" validity interval of an object.

const BdbTimeendOriginal () const
 The end of the "original" validity interval of an object.

const BdbTimebegin () const
 The beginning of the "visible" validity interval of an object.

const BdbTimeend () const
 The end of the "visible" validity interval of an object.

const BdbTimebeginDuration () const
 The beginning of the "duration" interval of an object at the insertion dimension.

const BdbTimeendDuration () const
 The end of the "duration" interval of an object at the insertion dimension.

const BdbTimeinserted () const
 The insertion time of an object.

virtual std::string id () const=0
 An object identifier.

virtual std::string legacyId () const=0
 A 'legacy' object identifier.

virtual std::string type () const=0
 A persistent type name.


Static Public Member Functions

CdbStatus instance (CdbObjectPtr &theObjectPtr, const char *theFullPath, const BdbTime &theValidityTime, const CdbStateId &theStateId, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 The static locator for a condition object.

template<class T> CdbStatus transient (T *&theTransientPtr, const CdbObjectPtr &theObjectPtr)
 Convert into a transient form.


Protected Member Functions

 CdbObject (const CdbConditionPtr &theConditionPtr, const BdbTime &theBeginOriginalValidity, const BdbTime &theEndOriginalValidity, const BdbTime &theBeginValidity, const BdbTime &theEndValidity, const BdbTime &theBeginDuration, const BdbTime &theEndDuration, const BdbTime &theInsertionTime)
 The normal constructor.

virtual ~CdbObject ()
 The destructor.


Friends

class CdbCPtrBase< CdbObject >

Detailed Description

The transient interface to a condition object.

More details to come...

Definition at line 22 of file CdbObject.hh.


Constructor & Destructor Documentation

CdbObject::CdbObject const CdbConditionPtr   theConditionPtr,
const BdbTime   theBeginOriginalValidity,
const BdbTime   theEndOriginalValidity,
const BdbTime   theBeginValidity,
const BdbTime   theEndValidity,
const BdbTime   theBeginDuration,
const BdbTime   theEndDuration,
const BdbTime   theInsertionTime
[protected]
 

The normal constructor.

Initialize context with specified parameters.

See also:
CdbCondition

CdbConditionPtr

BdbTime

Parameters:
theConditionPtr  the smart pointer providing a back back link to the parent condition object
theBeginOriginalValidity  a point where the object's 'original' validity begins from
theEndOriginalValidity  ... and finishes (exclusing) at
theBeginValidity  a point where the object's 'visible' validity begins from
theEndValidity  ... and finishes (exclusing) at
theBeginDuration  a point where the object's duration at insertin time begins from
theEndDuration  ... and finishes (exclusing) at
theInsertionTime  the time when an object was inserted

Definition at line 81 of file CdbObject.cc.

CdbObject::~CdbObject   [protected, virtual]
 

The destructor.

More details...

Definition at line 99 of file CdbObject.cc.


Member Function Documentation

const BdbTime & CdbObject::begin   const
 

The beginning of the "visible" validity interval of an object.

NOTE: that the difference between the "visible" validity interval of an object and the validity interval it was originally stored with in the database. The "visible" validity interval is how the object was seen in the database when iy was fetched from it at specific revision level. This interval may get shorten (or even completelly overshadowed) as new objects are stored in a condition. Meanwhile the original (stored) validity never changes.

See also:
BdbTime

Definition at line 122 of file CdbObject.cc.

const BdbTime & CdbObject::beginDuration   const
 

The beginning of the "duration" interval of an object at the insertion dimension.

The "duration" interval is

See also:
BdbTime

Definition at line 134 of file CdbObject.cc.

const BdbTime & CdbObject::beginOriginal   const
 

The beginning of the "original" validity interval of an object.

See also:
BdbTime

Definition at line 110 of file CdbObject.cc.

const BdbTime & CdbObject::end   const
 

The end of the "visible" validity interval of an object.

See also:
CdbObject::begin()

Definition at line 128 of file CdbObject.cc.

const BdbTime & CdbObject::endDuration   const
 

The end of the "duration" interval of an object at the insertion dimension.

See also:
CdbObject::beginDuration()

Definition at line 140 of file CdbObject.cc.

const BdbTime & CdbObject::endOriginal   const
 

The end of the "original" validity interval of an object.

See also:
CdbObject::beginOriginal()

Definition at line 116 of file CdbObject.cc.

virtual std::string CdbObject::id   const [pure virtual]
 

An object identifier.

The contents and the semantic of the string is defined by the underlying persistent technology.

The method has to be implemented by a subclass.

Implemented in CdbBdbObject, CdbRooRoObject, and CdbRooDbObject.

Referenced by transient().

const BdbTime & CdbObject::inserted   const
 

The insertion time of an object.

This is an actual time when an object was stored in the database.

See also:
BdbTime

Definition at line 146 of file CdbObject.cc.

CdbStatus CdbObject::instance CdbObjectPtr   theObjectPtr,
const char *    theFullPath,
const BdbTime   theValidityTime,
const CdbStateId   theStateId,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

The static locator for a condition object.

This locator uses the "state identifier" to resolve the right instance of the condition object in the scope of a database.

The database itself as well as the top-level API object are two optional parameters of this method. If either (or both) of them are not specified then the corresponding default values will be used.

See also:
CdbObjectPtr

BdbTime

CdbStateId

Returns:
the completion status of the operation
Parameters:
theStateId  NOTE: the view identifier is encoded here
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 21 of file CdbObject.cc.

References CdbStatus::Error, CdbCondition::instance(), CdbStateId::isValid(), CdbStateId::modificationTime(), CdbStatus::Success, and CdbStateId::viewId().

virtual std::string CdbObject::legacyId   const [pure virtual]
 

A 'legacy' object identifier.

The contents and the semantic of the string is defined by the underlying persistent technology.

The method has to be implemented by a subclass.

Implemented in CdbBdbObject, CdbRooRoObject, and CdbRooDbObject.

const CdbConditionPtr & CdbObject::parent   const
 

Return a smart pointer to the parent condition object.

See also:
CdbCondition

CdbConditionPtr

Definition at line 104 of file CdbObject.cc.

template<class T>
CdbStatus CdbObject::transient T *&    theTransientPtr,
const CdbObjectPtr   theObjectPtr
[inline, static]
 

Convert into a transient form.

The method will try to find and use a "persistnet-to-transient" translator to produce a transient object of the specified (by the pointer) type. The translator is supposed to be registered with the top-level CDB API object of the current "technology" and "implementation".

See also:
Cdb::registerTranslator()

Cdb::convertToTransient()

Definition at line 109 of file CdbObject.hh.

References id(), CdbStatus::IllegalParameters, and CdbStatus::Success.

Referenced by CdbEnvProxy< T >::redefinedFaultHandler(), and CdbPayloadUtils::transient().

virtual std::string CdbObject::type   const [pure virtual]
 

A persistent type name.

The contents and the semantic of the string is defined by the underlying persistent technology.

The method has to be implemented by a subclass.

Implemented in CdbBdbObject, CdbRooRoObject, and CdbRooDbObject.


Friends And Related Function Documentation

friend class CdbCPtrBase< CdbObject > [friend]
 

Definition at line 24 of file CdbObject.hh.


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:23 2005 for CDB by doxygen1.3-rc3