OW_NAMESPACE::AssocDb2 Class Reference

#include <OW_AssocDb2.hpp>

Collaboration diagram for OW_NAMESPACE::AssocDb2:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AssocDb2 (ServiceEnvironmentIFCRef env)
 Create a new AssocDb object.
 ~AssocDb2 ()
 Destroy this AssocDb object.
void open (const String &fileName,::DB_ENV *env,::DB_TXN *txn)
 Open this AssocDb object up for business.
void close ()
 Close this AssocDb object.
bool hasAssocEntries (const String &ns, const CIMObjectPath &instanceName)
void addEntry (const CIMObjectPath &objectName, const String &assocClassName, const String &resultClass, const String &role, const String &resultRole, const CIMObjectPath &associatedObject, const CIMObjectPath &assocClassPath)
 Add an AssocDbEntry& to the database.
void addEntries (const String &ns, const CIMInstance &assocInstance)
 Add all entries to the database that are reference by the given association.
void addEntries (const String &ns, const CIMClass &assocClass)
void deleteEntry (const CIMObjectPath &objectName, const String &assocClassName, const String &resultClass, const String &role, const String &resultRole, const CIMObjectPath &associatedObject, const CIMObjectPath &assocClassPath)
 Remove an AssocDbEntry& from the database.
void deleteEntries (const String &ns, const CIMInstance &assocInstance)
 Remove all entries from the database that are reference by the given association.
void deleteEntries (const String &ns, const CIMClass &assocClass)
void getAllEntries (const CIMObjectPath &objectName, const SortedVectorSet< String > *passocClasses, const SortedVectorSet< String > *presultClasses, const String &role, const String &resultRole, AssocDbEntry2ResultHandlerIFC &result)
 Get all of the AssocDbEntries that fit the given criterion.

Private Member Functions

AssocDbEntry2 findEntry (const String &objectKey)
void deleteEntry (const AssocDbEntry2 &entry)
void addEntry (const AssocDbEntry2 &entry)
void addOrDeleteEntries (const String &ns, const CIMInstance &assocInstance, bool add)
void addOrDeleteEntries (const String &ns, const CIMClass &assocClass, bool add)

Private Attributes

ServiceEnvironmentIFCRef m_env
dbDatabase m_db

Detailed Description

Definition at line 112 of file OW_AssocDb2.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::AssocDb2::AssocDb2 ServiceEnvironmentIFCRef  env  ) 
 

Create a new AssocDb object.

Definition at line 327 of file OW_AssocDb2.cpp.

OW_NAMESPACE::AssocDb2::~AssocDb2  ) 
 

Destroy this AssocDb object.

Definition at line 332 of file OW_AssocDb2.cpp.

References close().


Member Function Documentation

void OW_NAMESPACE::AssocDb2::addEntries const String ns,
const CIMClass assocClass
 

Definition at line 230 of file OW_AssocDb2.cpp.

References addOrDeleteEntries(), and ns.

void OW_NAMESPACE::AssocDb2::addEntries const String ns,
const CIMInstance assocInstance
 

Add all entries to the database that are reference by the given association.

Parameters:
assocKey The key to the association instance.
assocInstance The instance of the association referenced by assocKey

Definition at line 150 of file OW_AssocDb2.cpp.

References addOrDeleteEntries(), and ns.

Referenced by OW_NAMESPACE::CIMRepository2::createClass().

void OW_NAMESPACE::AssocDb2::addEntry const AssocDbEntry2 entry  )  [private]
 

Definition at line 441 of file OW_AssocDb2.cpp.

void OW_NAMESPACE::AssocDb2::addEntry const CIMObjectPath objectName,
const String assocClassName,
const String resultClass,
const String role,
const String resultRole,
const CIMObjectPath associatedObject,
const CIMObjectPath assocClassPath
 

Add an AssocDbEntry& to the database.

Parameters:
newEntry The AssocDbEntry to add to the database.

Definition at line 468 of file OW_AssocDb2.cpp.

References deleteEntry(), findEntry(), OW_NAMESPACE::AssocDbEntry2::entry::m_assocClass, OW_NAMESPACE::AssocDbEntry2::entry::m_associatedObject, OW_NAMESPACE::AssocDbEntry2::entry::m_associationPath, OW_NAMESPACE::AssocDbEntry2::m_entries, OW_NAMESPACE::AssocDbEntry2::entry::m_resultClass, OW_NAMESPACE::AssocDbEntry2::makeKey(), and OW_NAMESPACE::Array< T >::push_back().

Referenced by addOrDeleteEntries().

void OW_NAMESPACE::AssocDb2::addOrDeleteEntries const String ns,
const CIMClass assocClass,
bool  add
[private]
 

Definition at line 242 of file OW_AssocDb2.cpp.

References addEntry(), deleteEntry(), OW_NAMESPACE::CIMClass::getAllProperties(), OW_NAMESPACE::CIMProperty::getDataType(), OW_NAMESPACE::CIMProperty::getName(), OW_NAMESPACE::CIMClass::getName(), OW_NAMESPACE::CIMDataType::getRefClassName(), OW_NAMESPACE::CIMDataType::getType(), i, ns, OW_NAMESPACE::CIMDataType::REFERENCE, and OW_NAMESPACE::Array< T >::size().

void OW_NAMESPACE::AssocDb2::addOrDeleteEntries const String ns,
const CIMInstance assocInstance,
bool  add
[private]
 

Definition at line 162 of file OW_AssocDb2.cpp.

References OW_NAMESPACE::CIMNULL, OW_NAMESPACE::CIMInstance::getClassName(), OW_NAMESPACE::CIMInstance::getProperties(), OW_NAMESPACE::CIMValue::getType(), i, ns, OW_NAMESPACE::CIMDataType::REFERENCE, OW_NAMESPACE::CIMObjectPath::setKeys(), and OW_NAMESPACE::Array< T >::size().

Referenced by addEntries(), and deleteEntries().

void OW_NAMESPACE::AssocDb2::close  ) 
 

Close this AssocDb object.

Definition at line 351 of file OW_AssocDb2.cpp.

References OW_NAMESPACE::dbDatabase::close(), and m_db.

Referenced by OW_NAMESPACE::CIMRepository2::close(), and ~AssocDb2().

void OW_NAMESPACE::AssocDb2::deleteEntries const String ns,
const CIMClass assocClass
 

Definition at line 236 of file OW_AssocDb2.cpp.

References addOrDeleteEntries(), and ns.

void OW_NAMESPACE::AssocDb2::deleteEntries const String ns,
const CIMInstance assocInstance
 

Remove all entries from the database that are reference by the given association.

Parameters:
assocKey The key to the association instance.
assocInstance The instance of the association referenced by assocKey

Definition at line 156 of file OW_AssocDb2.cpp.

References addOrDeleteEntries(), and ns.

void OW_NAMESPACE::AssocDb2::deleteEntry const AssocDbEntry2 entry  )  [private]
 

Definition at line 416 of file OW_AssocDb2.cpp.

void OW_NAMESPACE::AssocDb2::deleteEntry const CIMObjectPath objectName,
const String assocClassName,
const String resultClass,
const String role,
const String resultRole,
const CIMObjectPath associatedObject,
const CIMObjectPath assocClassPath
 

Remove an AssocDbEntry& from the database.

Parameters:
entryToDelete The AssocDbEntry to delete from the database.

Definition at line 370 of file OW_AssocDb2.cpp.

Referenced by addEntry(), and addOrDeleteEntries().

AssocDbEntry2 OW_NAMESPACE::AssocDb2::findEntry const String objectKey  )  [private]
 

Definition at line 358 of file OW_AssocDb2.cpp.

Referenced by addEntry(), and hasAssocEntries().

void OW_NAMESPACE::AssocDb2::getAllEntries const CIMObjectPath objectName,
const SortedVectorSet< String > *  passocClasses,
const SortedVectorSet< String > *  presultClasses,
const String role,
const String resultRole,
AssocDbEntry2ResultHandlerIFC result
 

Get all of the AssocDbEntries that fit the given criterion.

Parameters:
objectName The target object that all entries must have.
assocClasses If specified, the association class name from all entries must be found in this array.
propertyName All entries must have this property name.
Returns:
An AssocDbEntryArray that contains all of the entries that meet the given criterion.

Definition at line 299 of file OW_AssocDb2.cpp.

References OW_NAMESPACE::SortedVectorSet< T, Compare >::size().

Referenced by OW_NAMESPACE::CIMRepository2::_staticAssociatorNames(), OW_NAMESPACE::CIMRepository2::_staticAssociators(), OW_NAMESPACE::CIMRepository2::_staticAssociatorsClass(), OW_NAMESPACE::CIMRepository2::_staticReferenceNames(), OW_NAMESPACE::CIMRepository2::_staticReferences(), and OW_NAMESPACE::CIMRepository2::_staticReferencesClass().

bool OW_NAMESPACE::AssocDb2::hasAssocEntries const String ns,
const CIMObjectPath instanceName
 

Returns:
true if there are association entries in the association database for the given target object.

Definition at line 141 of file OW_AssocDb2.cpp.

References findEntry(), ns, OW_NAMESPACE::CIMObjectPath::setNameSpace(), and OW_NAMESPACE::CIMObjectPath::toString().

void OW_NAMESPACE::AssocDb2::open const String fileName,
::DB_ENV *  env,
::DB_TXN *  txn
 

Open this AssocDb object up for business.

Definition at line 345 of file OW_AssocDb2.cpp.

References OW_NAMESPACE::String::c_str(), m_db, name, and OW_NAMESPACE::dbDatabase::open().


Member Data Documentation

dbDatabase OW_NAMESPACE::AssocDb2::m_db [private]
 

Definition at line 197 of file OW_AssocDb2.hpp.

Referenced by close(), and open().

ServiceEnvironmentIFCRef OW_NAMESPACE::AssocDb2::m_env [private]
 

Definition at line 196 of file OW_AssocDb2.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:16:44 2006 for openwbem by  doxygen 1.4.6