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

CdbCondition Class Reference

The transient representation for the persistent Condition. More...

#include <CdbCondition.hh>

Inheritance diagram for CdbCondition:

CdbStateControl CdbHistoryProvider CdbCloneable< CdbCondition > CdbBdbSCondition CdbBdbWCondition CdbRooRoCondition CdbSQLApiCondition List of all members.

Public Member Functions

const CdbFolderPtrparent () const
 Return a smart pointer to the parent CdbFolder object.

const CdbDatabasePtrparentDatabase () const
 Return a smart pointer to the parent CdbDatabase object.

const char * name () const
 Obtain the name of the condition in its folder.

virtual std::string description () const=0
 Obtain the condition description.

virtual bool isPartitionable () const=0
 Obtain the condition type.

virtual CdbCompositeName physicalName () const=0
 Obtain the full condition name in the 'physical' namespace.

virtual CdbId physicalId () const=0
 Obtain the full condition identifier in the 'physical' namespace.

virtual BdbTime created () const=0
 Get the condition creation time.

virtual BdbTime registered () const=0
 Get the condition registration time.

virtual BdbTime modified () const=0
 Get the last time when the condition was modified.

virtual CdbStatus findObject (CdbObjectPtr &theObjectPtr, const BdbTime &theValidityTime, const BdbTime &theInsertionTime=BdbTime::plusInfinity)=0
 Find a condition object.

virtual CdbStatus findObject (CdbObjectPtr &theObjectPtr, const CdbRevisionPolicy &thePolicy, const BdbTime &theValidityTime, const BdbTime &theInsertionTime=BdbTime::plusInfinity)=0
 Find a condition object.

virtual CdbStatus objectIterator (CdbObjectItr &theItr, const BdbTime &theBeginValidity=BdbTime::minusInfinity, const BdbTime &theEndValidity=BdbTime::plusInfinity)=0
 An iterator for the objects.

virtual CdbStatus objectIterator (CdbObjectItr &theItr, const CdbRevisionPolicy &thePolicy, const BdbTime &theBeginValidity=BdbTime::minusInfinity, const BdbTime &theEndValidity=BdbTime::plusInfinity)=0
 An iterator for the objects.

virtual CdbStatus originalObjectIterator (CdbObjectItr &theItr, const BdbTime &theBeginInsertion=BdbTime::minusInfinity, const BdbTime &theEndInsertion=BdbTime::plusInfinity, const unsigned short thePartitionId=0)=0
 An iterator for the 'original' objects.

CdbStatus storeObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theBegin, const BdbTime &theEnd)
 Create and store a new condition object in the database.

virtual CdbStatus storeObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theBegin, const BdbTime &theEnd, CdbObjectPtr &theObjectPtr)=0
 Create and store a new condition object in the database.

CdbStatus storeAndTruncateObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theStoreTime, const BdbTime &theTruncateTime)
 Create and store a new condition object in the database.

virtual CdbStatus storeAndTruncateObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theStoreTime, const BdbTime &theTruncateTime, CdbObjectPtr &theObjectPtr)=0
 Create and store a new condition object in the database.

virtual CdbStatus split (const BdbTime &theTime)=0
 Split the validity timeline at specified point.

virtual CdbStatus findRevision (CdbRevisionPtr &thePtr, const BdbTime &theId, unsigned short thePartitionId=0)=0
 Find a revision by its identifier.

virtual CdbStatus findRevision (CdbRevisionPtr &thePtr, const char *theName, unsigned short thePartitionId=0)=0
 Find a revision by its name.

virtual CdbStatus revisionIdIterator (CdbItr< BdbTime > &theItr, unsigned short thePartitionId=0)=0
 An iterator for the known revision identifiers.

virtual CdbStatus revisionNameIterator (CdbItr< const char * > &theItr, unsigned short thePartitionId=0)=0
 An iterator for the known revision names.

virtual CdbStatus createRevision (CdbRevisionPtr &thePtr, const BdbTime &theId, const char *theName, const char *theDescription, unsigned short thePartitionId=0)=0
 Create a new revision.


Static Public Member Functions

CdbStatus instance (CdbConditionPtr &theConditionPtr, const char *theFullPathName, const char *theViewName=0, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 Static locator for a condition.

CdbStatus instance (CdbConditionPtr &theConditionPtr, const char *theFullPathName, const CdbId &theViewId, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 Static locator for a condition.

CdbStatus instance (CdbConditionPtr &theConditionPtr, const CdbId &thePhysicalAddress, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 Static locator for a condition.

CdbStatus instance (CdbConditionPtr &theConditionPtr, const CdbCompositeName &thePhysicalName, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 Static locator for a condition.

CdbStatus instanceFromAny (CdbConditionPtr &theConditionPtr, const char *theConditionName, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 Static locator for a condition.

std::string fullPathName (const CdbConditionPtr &theConditionPtr)
 Calculate the full path for the condition.


Protected Member Functions

 CdbCondition (const CdbFolderPtr &theFolderPtr, const CdbDatabasePtr &theDatabasePtr, const char *theName)
 The normally used constructor will set the internal parameters of an object.

 CdbCondition (const CdbCondition &theCondition)
 The copy constructor.

virtual ~CdbCondition ()
 The destructor.

CdbCondition & operator= (const CdbCondition &theCondition)
 The assignment operator.


Friends

class CdbCPtrBase< CdbCondition >

Detailed Description

The transient representation for the persistent Condition.

Note, that this is an abstract class specifying the interface to the condition. It also maintains the general status of the Condition object as it's seen to its clients through the API.

This class also includes the CdbStateControl, CdbHistoryProvider and CdbCloneable interfaces.

See also:
CdbStateControl

CdbHistoryProvider

Definition at line 46 of file CdbCondition.hh.


Constructor & Destructor Documentation

CdbCondition::CdbCondition const CdbFolderPtr   theFolderPtr,
const CdbDatabasePtr   theDatabasePtr,
const char *    theName
[protected]
 

The normally used constructor will set the internal parameters of an object.

Initialize the context of the CdbCondition with specified set of fixed parameters. This will also validate the internal state of the object.

The condition name must be non 0 pointer.

This API component has two parameters to specify its "parent" API objects. Their values would vary depending on how the Condition API object was created:

  • for conditions found through views the parent folder must be a non zero pointer. The database pointer must always have a non zero value.

  • for conditions located by their 'physical address' or 'physical name' the only valid connection to a hierarchy of API components is through the non zero database pointer. The folder pointer must be zero in this case.

The value of the folder pointer can also be used as flags to determine how the condition was created.

See also:
CdbFolder

CdbFolderPtr

CdbDatabase

CdbDatabasePtr

CdbCompositeName

CdbId

Parameters:
theFolderPtr  the parent folder object (view conditions only)
theDatabasePtr  the parent database object
theName  the name in its folder's namespace

Definition at line 250 of file CdbCondition.cc.

References CdbCPtr< CdbDatabase, CdbAlwaysClosePolicy< CdbDatabase > >::isNull().

CdbCondition::CdbCondition const CdbCondition &    theCondition [protected]
 

The copy constructor.

Details...

Definition at line 261 of file CdbCondition.cc.

CdbCondition::~CdbCondition   [protected, virtual]
 

The destructor.

Is only available for the derived classes and friends to prevent accidental deletion of objects.

Definition at line 267 of file CdbCondition.cc.


Member Function Documentation

virtual BdbTime CdbCondition::created   const [pure virtual]
 

Get the condition creation time.

This is the time when the corresponding 'physical' condition was created. Note the difference of this time between the condition registration time.

See also:
CdbCondition::registered()
Returns:
a value of the creation time.

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::createRevision CdbRevisionPtr   thePtr,
const BdbTime   theId,
const char *    theName,
const char *    theDescription,
unsigned short    thePartitionId = 0
[pure virtual]
 

Create a new revision.

This command if succeeded will create a new revision with specified parameters in a s cope of a condition (and partition for 'PARTTIONABLE' conditions). It will also initialize a smart pointer onto a transient API object representing a newely created revision.

The operation would check if the revision can be created for a condition it (the operation) is being used at.

See also:
CdbRevision

CdbStatus

Returns:
a completion status
Parameters:
thePtr  the smart pointer to be initialized
theId  the revision identifier
theName  the revision name
theDescription  the revision description
thePartitionId  the partition identifier

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual std::string CdbCondition::description   const [pure virtual]
 

Obtain the condition description.

This method is supposed to be implemented by the corresponding subclass.

Returns:
a string with the object's description

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::findObject CdbObjectPtr   theObjectPtr,
const CdbRevisionPolicy   thePolicy,
const BdbTime   theValidityTime,
const BdbTime   theInsertionTime = BdbTime::plusInfinity
[pure virtual]
 

Find a condition object.

Unlike the previous method, this one expects an explicit value of the "revision policy" to be used when looking for a condition object.

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::findObject CdbObjectPtr   theObjectPtr,
const BdbTime   theValidityTime,
const BdbTime   theInsertionTime = BdbTime::plusInfinity
[pure virtual]
 

Find a condition object.

This method will initialize a smart pointer to point onto a transient object representing an object of the CdbObject class. It may also initialize the smart pointer to point onto 0 object in case of failure. The corresponding error status will be returned in this case.

The resulting object will be valid at given validity time point and optional insertion time point, assuming that other parameters of this operation are taken from a view the current condition belongs to.

NOTE: The use or not use of the optional insertion time depends on two factors: (a) the kind of the condition and (b) the current revision policy for thsi condition.

See also:
BdbTime

CdbObject

CdbObjectPtr

CdbRevisionPolicy

CdbStatus

Returns:
the completion status
Parameters:
theObjectPtr  the smart pointer to an object to be initialized
theValidityTime  the point in the validity dimension
theInsertionTime  the point in the insertion time dimension

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::findRevision CdbRevisionPtr   thePtr,
const char *    theName,
unsigned short    thePartitionId = 0
[pure virtual]
 

Find a revision by its name.

This command if succeeded will initialize specified smart pointer to point onto a revision description object with required characteristics.

NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.

See also:
CdbRevision

CdbRevisionPtr

CdbStatus

Returns:
a completion status
Parameters:
thePtr  the smart pointer to be initialized
theName  the revision name
thePartitionId  the partition identifier

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::findRevision CdbRevisionPtr   thePtr,
const BdbTime   theId,
unsigned short    thePartitionId = 0
[pure virtual]
 

Find a revision by its identifier.

This command if succeeded will initialize specified smart pointer to point onto a revision description object with required characteristics.

NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.

See also:
CdbRevision

CdbRevisionPtr

CdbStatus

Returns:
a completion status
Parameters:
thePtr  the smart pointer to be initialized
theId  the revision identifier
thePartitionId  the partition identifier

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

std::string CdbCondition::fullPathName const CdbConditionPtr   theConditionPtr [static]
 

Calculate the full path for the condition.

The path would include all preceeding folders and the specified condition itself.

The method will return an empty path containing "" in case of any problem met while calculating the path.

NOTE: For conditions found via their 'physical' names or addresses the nethod will return that empty path since their (CdbCondition) API objects do not have any parent folders or views.

See also:
class CdbCondition

Definition at line 229 of file CdbCondition.cc.

References CdbCPtr< CdbFolder, CdbAlwaysClosePolicy< CdbFolder > >::isNull(), CdbCPtr< CdbCondition, CdbAlwaysClosePolicy< CdbCondition > >::isNull(), and CdbPathName::toString().

Referenced by CdbRooRoCondition::findObject(), CdbBdbSCondition::findObject(), instance(), CdbRooRoCondition::objectIterator(), and CdbBdbSCondition::storeObject().

CdbStatus CdbCondition::instance CdbConditionPtr   theConditionPtr,
const CdbCompositeName   thePhysicalName,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

Static locator for a condition.

Unlike the previous methods, this one uses "physical name" of a condition.

See also:
CdbCompositeName
Parameters:
theConditionPtr  the smart pointer to be initialized
thePhysicalName  the 'physical name' of a condition
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 153 of file CdbCondition.cc.

References CdbStatus::Error, CdbDatabase::instance(), and CdbStatus::Success.

CdbStatus CdbCondition::instance CdbConditionPtr   theConditionPtr,
const CdbId   thePhysicalAddress,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

Static locator for a condition.

Unlike the previous methods, this one uses "physical address" of a condition.

See also:
CdbId
Parameters:
theConditionPtr  the smart pointer to be initialized
thePhysicalAddress  the 'physical address' of a condition
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 122 of file CdbCondition.cc.

References CdbStatus::Error, CdbDatabase::instance(), and CdbStatus::Success.

CdbStatus CdbCondition::instance CdbConditionPtr   theConditionPtr,
const char *    theFullPathName,
const CdbId   theViewId,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

Static locator for a condition.

Unlike the previous method, this one uses "extended" identifier of a view instead of its name.

See also:
CdbId
Parameters:
theConditionPtr  the smart pointer to be initialized
theFullPathName  the full path name of the condition
theViewId  the view identifier
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 75 of file CdbCondition.cc.

References CdbPathName::beforeLast(), CdbStatus::Error, fullPathName(), CdbFolder::instance(), CdbPathName::isAbsolute(), CdbPathName::isRoot(), CdbPathName::isValid(), CdbPathName::last(), CdbStatus::Success, and CdbPathName::toString().

CdbStatus CdbCondition::instance CdbConditionPtr   theConditionPtr,
const char *    theFullPathName,
const char *    theViewName = 0,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

Static locator for a condition.

Locates specified condition object and returns a smart pointer to the transient object of the current class. This "shortcut" allows to avoid the complicated multi-staged process of the object location, which is useless when the intermediate objects are not needed.

The last parameter (a pointer to the top-level Cdb singleton) is optional. If 0 is passed then a default instance is used.

Note, that if specified object is not found then a smart pointer is initialized to point to 0.

See also:
Cdb

CdbConditionPtr

CdbStatus

Returns:
a completion status
Parameters:
theConditionPtr  the smart pointer to be initialized
theFullPathName  the full path name of the condition
theViewName  the view name
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 28 of file CdbCondition.cc.

References CdbPathName::beforeLast(), CdbStatus::Error, fullPathName(), CdbFolder::instance(), CdbPathName::isAbsolute(), CdbPathName::isRoot(), CdbPathName::isValid(), CdbPathName::last(), CdbStatus::Success, and CdbPathName::toString().

Referenced by CdbObject::instance(), instanceFromAny(), main(), CdbBdbLoadList::storeObjects(), CdbRooProxyCache::updateCache(), CdbProxyCache::updateCache(), and CdbBdbProxyCache::updateCache().

CdbStatus CdbCondition::instanceFromAny CdbConditionPtr   theConditionPtr,
const char *    theConditionName,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

Static locator for a condition.

The method is able to deal with multiple formats of the condition name, including the above mentioned:

- a full path to the condition in a view: "/emc/EmcFooClassP" - a 'physical' address of the condition in the Distributed CDB: "0::112" - a 'physical' name of the condition in the Distributed CDB: "MASTER::EmcFooClassP"

See also:
CdbCompositeName
Parameters:
theConditionPtr  the smart pointer to be initialized
theConditionName  the 'any' name of a condition
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 184 of file CdbCondition.cc.

References instance(), CdbCompositeName::isValid(), physicalName(), and CdbId::translate().

Referenced by main().

virtual bool CdbCondition::isPartitionable   const [pure virtual]
 

Obtain the condition type.

This method is supposed to be implemented by the corresponding subclass.

Returns:
TRUE for 'partitionable conditions and FALSE for 'regular' ones.

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual BdbTime CdbCondition::modified   const [pure virtual]
 

Get the last time when the condition was modified.

This method is supposed to be implemented by the corresponding subclass.

Returns:
a value of the modification time.

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

const char * CdbCondition::name   const
 

Obtain the name of the condition in its folder.

It's guaranteed that a non 0 pointer will be returned.

Returns:
a const pointer onto to the object's name

Definition at line 294 of file CdbCondition.cc.

Referenced by CdbBdbWCondition::clone(), CdbBdbSCondition::createRevision(), CdbSQLApiCondition::findObject(), CdbRooRoCondition::findObject(), CdbBdbWCondition::findObject(), CdbBdbSCondition::findObject(), CdbBdbWCondition::findRevision(), CdbBdbWCondition::hint(), CdbRooRoCondition::modified(), CdbSQLApiCondition::objectIterator(), CdbRooRoCondition::objectIterator(), CdbBdbWCondition::objectIterator(), CdbBdbSCondition::objectIterator(), CdbSQLApiCondition::originalObjectIterator(), CdbRooRoCondition::originalObjectIterator(), CdbBdbSCondition::originalObjectIterator(), CdbBdbWCondition::physicalName(), CdbBdbWCondition::split(), CdbBdbWCondition::storeAndTruncateObject(), CdbSQLApiCondition::storeObject(), CdbBdbWCondition::storeObject(), and CdbBdbSCondition::storeObject().

virtual CdbStatus CdbCondition::objectIterator CdbObjectItr   theItr,
const CdbRevisionPolicy   thePolicy,
const BdbTime   theBeginValidity = BdbTime::minusInfinity,
const BdbTime   theEndValidity = BdbTime::plusInfinity
[pure virtual]
 

An iterator for the objects.

Unlike the previous method, this one expects an explicit value of the "revision policy" to be used when looking for condition objects.

Note, that for partitionable conditions the specified validity interval would be reduced to the width of the specified (by the policy) partition. No error status would be reported if these intervals won't intersect.

Parameters:
theItr  the iterator to be initialized
thePolicy  the policy to be used to iterate for objects
theBeginValidity  the begin point for iteration
theEndValidity  the end point for iteration

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::objectIterator CdbObjectItr   theItr,
const BdbTime   theBeginValidity = BdbTime::minusInfinity,
const BdbTime   theEndValidity = BdbTime::plusInfinity
[pure virtual]
 

An iterator for the objects.

Initializes an iterator to find all Objects at a given scope of a condition. The iterator when advanced will return an CdbObjectPtr smart pointer. It may also initialize the iterator to be in the non-valid state in case of failure. he corresponding error status will be returned in this case.

The scope is defined by an interval at the validity dimension and the current configuration of a view.

See also:
BdbTime

CdbObject

CdbObjectPtr

CdbStatus

Returns:
the completion status
Parameters:
theItr  the iterator to be initialized
theBeginValidity  the begin point for iteration
theEndValidity  the end point for iteration

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

CdbCondition & CdbCondition::operator= const CdbCondition &    theCondition [protected]
 

The assignment operator.

Details...

Definition at line 271 of file CdbCondition.cc.

References _myName, _myParent, and _myParentDatabase.

virtual CdbStatus CdbCondition::originalObjectIterator CdbObjectItr   theItr,
const BdbTime   theBeginInsertion = BdbTime::minusInfinity,
const BdbTime   theEndInsertion = BdbTime::plusInfinity,
const unsigned short    thePartitionId = 0
[pure virtual]
 

An iterator for the 'original' objects.

Initializes an iterator to find all Objects at a given scope of a condition. The iterator when advanced will return an CdbObjectPtr smart pointer. It may also initialize the iterator to be in the non-valid state in case of failure. he corresponding error status will be returned in this case.

The scope is defined by an interval at the insertion dimension, a partition identifier and the corresponding 'physical' condition as it's defined by the current configuration of a view.

See also:
BdbTime

CdbObject

CdbObjectPtr

CdbStatus

Returns:
the completion status
Parameters:
theItr  the iterator to be initialized
theBeginInsertion  the begin point for iteration
theEndInsertion  the end point for iteration
thePartitionId  the partition identifier

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

const CdbFolderPtr & CdbCondition::parent   const
 

Return a smart pointer to the parent CdbFolder object.

This is a folder where this condition is directly connected to. Note, that for conditions found through their 'physical' names or addresses the returned pointer would always be equal to 0.

See also:
CdbFolder

CdbFolderPtr

Returns:
a smart pointer to the parent object

Definition at line 282 of file CdbCondition.cc.

Referenced by CdbBdbWCondition::clone(), CdbRooRoCondition::findObject(), CdbBdbWCondition::findObject(), CdbBdbSCondition::findObject(), CdbBdbWCondition::findRevision(), CdbBdbWCondition::hint(), CdbSQLApiCondition::objectIterator(), CdbRooRoCondition::objectIterator(), CdbBdbWCondition::objectIterator(), CdbBdbSCondition::objectIterator(), CdbSQLApiCondition::originalObjectIterator(), CdbBdbWCondition::split(), CdbBdbWCondition::storeAndTruncateObject(), and CdbBdbWCondition::storeObject().

const CdbDatabasePtr & CdbCondition::parentDatabase   const
 

Return a smart pointer to the parent CdbDatabase object.

This is a database where this condition is directly connected to.

See also:
CdbDatabase

CdbDatabasePtr

Returns:
a smart pointer to the parent object

Definition at line 288 of file CdbCondition.cc.

Referenced by CdbBdbWCondition::clone(), CdbSQLApiCondition::findObject(), and CdbSQLApiCondition::storeObject().

virtual CdbId CdbCondition::physicalId   const [pure virtual]
 

Obtain the full condition identifier in the 'physical' namespace.

This method is supposed to be implemented by the corresponding subclass.

Returns:
a value of the 'physical' identifier.

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbCompositeName CdbCondition::physicalName   const [pure virtual]
 

Obtain the full condition name in the 'physical' namespace.

This method is supposed to be implemented by the corresponding subclass.

Returns:
a value of the composite 'physical' name.

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

Referenced by instanceFromAny().

virtual BdbTime CdbCondition::registered   const [pure virtual]
 

Get the condition registration time.

This is a time when the condition entry was put into the folder (view). Note the difference of this time from the corresponding 'physical' condition creation time.

See also:
CdbCondition::created()
Returns:
a value of the registration time.

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::revisionIdIterator CdbItr< BdbTime > &    theItr,
unsigned short    thePartitionId = 0
[pure virtual]
 

An iterator for the known revision identifiers.

Initializes an iterator to find all revision identifiers at a scope of the current condition/partition. The iterator when advanced will return an object of BdbTime class. These objects can be turned into revision description objects by calling CdbConditionMgr::findRevision() method described above.

The iterator will be set into a "valid" state upon successfull completion.

NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.

See also:
CdbIItr::isValid()

CdbStatus

Returns:
completion status
Parameters:
theItr  an iterator to be initialized
thePartitionId  the partition identifier

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::revisionNameIterator CdbItr< const char * > &    theItr,
unsigned short    thePartitionId = 0
[pure virtual]
 

An iterator for the known revision names.

Initializes an iterator to find all revision names at a scope of the current condition/partition. The iterator when advanced will return (pointers to) strings. These objects can be turned into revision description objects by calling CdbConditionMgr::findRevision() method described above.

The iterator will be set into a "valid" state upon successfull completion.

NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.

See also:
CdbIItr::isValid()

CdbStatus

Returns:
completion status
Parameters:
theItr  an iterator to be initialized
thePartitionId  the partition identifier

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::split const BdbTime   theTime [pure virtual]
 

Split the validity timeline at specified point.

ATTENTION: This is a temporary method for backward compatibility with the old API introduced on a period of migration.

Parameters:
theTime  a point of split

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

virtual CdbStatus CdbCondition::storeAndTruncateObject CdbObjectFactoryBase   theObjectFactory,
const BdbTime   theStoreTime,
const BdbTime   theTruncateTime,
CdbObjectPtr   theObjectPtr
[pure virtual]
 

Create and store a new condition object in the database.

This is an extended form of the previous method returning a smart pointer corresponding to the newely created object.

IMPORTANT: The validity interval of the returned object could be shorter than the original intention if the corresponding restrictions are imposed by the current view.

Parameters:
theObjectFactory  a factory implementing an object creation
theStoreTime  the begin point for a stored object
theTruncateTime  the end point for a stored object
theObjectPtr  the object pointer to be filled out

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

CdbStatus CdbCondition::storeAndTruncateObject CdbObjectFactoryBase   theObjectFactory,
const BdbTime   theStoreTime,
const BdbTime   theTruncateTime
 

Create and store a new condition object in the database.

This method is here for backward compatibility with the corresponding feature of the old Condition/DB.

Parameters:
theObjectFactory  a factory implementing an object creation
theStoreTime  the begin point for a stored object
theTruncateTime  the end point for a stored object

Definition at line 312 of file CdbCondition.cc.

virtual CdbStatus CdbCondition::storeObject CdbObjectFactoryBase   theObjectFactory,
const BdbTime   theBegin,
const BdbTime   theEnd,
CdbObjectPtr   theObjectPtr
[pure virtual]
 

Create and store a new condition object in the database.

This is an extended form of the previous method returning a smart pointer corresponding to the newely created object.

IMPORTANT: The validity interval of the returned object could be shorter than the original intention if the corresponding restrictions are imposed by the current view.

Parameters:
theObjectFactory  a factory implementing an object creation
theBegin  the begin point for a stored object
theEnd  the end point for a stored object
theObjectPtr  the object pointer to be filled out

Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition.

CdbStatus CdbCondition::storeObject CdbObjectFactoryBase   theObjectFactory,
const BdbTime   theBegin,
const BdbTime   theEnd
 

Create and store a new condition object in the database.

The new object is created via a special factory passed by a reference onto its (factory's) base class. It's expected that a client of this API is responsible for preparing these factories creating concrete persistent objects on the base of a particular technology. If the creation and verification of this objects succeeds then a new object is registered in the database with specified interval of validity.

See also:
BdbTime

CdbObject

CdbObjectFactoryBase

CdbStatus

Returns:
the completion status
Parameters:
theObjectFactory  a factory implementing an object creation
theBegin  the begin point for a stored object
theEnd  the end point for a stored object

Definition at line 300 of file CdbCondition.cc.


Friends And Related Function Documentation

friend class CdbCPtrBase< CdbCondition > [friend]
 

Definition at line 50 of file CdbCondition.hh.


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