OSB_DB::NetworkElementGw Class Reference

List of all members.

Detailed Description

Database-gateway class for NetworkElement.

Definition at line 169 of file network-gw.h.

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::NetworkElementGw::checkObjVs ( const Session session,
const OSB_LIB::NetworkElement element 
) [private]

Check the current object version of network element.

Parameters:
session Database session to use.
element Object where the object version is to be checked.
Returns:
Result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted

long OSB_DB::NetworkElementGw::fetch ( const Session session,
const OSB_LIB::Network::Oid netId,
OSB_LIB::NetworkElements elements 
)

Read network elements based on a network id.

It will also retrieve trunk group list for every element.

Parameters:
session Database session to use.
netId Object id of network.
elements List of network elements to read for.
Returns:
Number of objects populated.

bool OSB_DB::NetworkElementGw::fetch ( const Session session,
OSB_LIB::NetworkElement element 
)

Read a network element from the database.

The function (re)reads an existing network element from the database base on the object id in element. It populates data members if a matching row is found. It will also retrieve trunk group list.

Parameters:
session Database session to use.
element Network element to read.
Returns:
True if the network element was read from the database, else false. In the latter case the `element' remains unchanged.

std::auto_ptr<OSB_LIB::NumberAnalyzer> OSB_DB::NetworkElementGw::getRelatedNumAnalyzer ( const Session session,
OSB_LIB::NetworkElement nwElement 
) [private]

Get the number analyzer assigned to a network element.

This function will search through the database table and get the number analyzer assigned to the passed in network element object.

Parameters:
session Database session to use.
nwElement Network element that owns the number analyzer.
Returns:
An auto pointer that owns the number analyzer retrieved or 0.

bool OSB_DB::NetworkElementGw::insert ( const Session session,
OSB_LIB::NetworkElement element 
) [private]

Insert a network element to the database.

Before the function call, the network element object to be added must have all its data members set except oid and objVs. After the function completed successfully, oid and objVs will be set.

Parameters:
session Database session to use.
element Ref to network element to be inserted.
Exceptions:
OsbException 
  • invalid argument length
  • name of element not unique within network.
Returns:
True if the network element was inserted into the database.

bool OSB_DB::NetworkElementGw::remove ( const Session session,
OSB_LIB::NetworkElement element 
) [private]

Delete a network element from the database.

Object id of the network element passed in will be unset.

Parameters:
session Database session to use.
element Network element to be deleted.
Exceptions:
OsbException 
  • object version conflict.
Returns:
True if the network element was deleted from the database.

bool OSB_DB::NetworkElementGw::update ( const Session session,
OSB_LIB::NetworkElement element 
) [private]

Update a network element to the database.

ObjVs will be set after the successful update.

Parameters:
session Database session to use.
element Ref to network element to be updated.
Exceptions:
OsbException 
  • invalid argument length
  • object version conflict
  • name of element not unique within network.
Returns:
True if the network element was updated into the database.


Friends And Related Function Documentation

friend class OSB_LIB::NetworkElement [friend]

Allow accessing insert, update and delete.

Definition at line 171 of file network-gw.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:08:57 2006 for OSB Library by  doxygen 1.4.7