OSB_DB::ConnectionPtGw Struct Reference

List of all members.

Detailed Description

Database interface for ConnectionPt.

Definition at line 58 of file connectionpt-gw.h.

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

bool OSB_DB::ConnectionPtGw::allCgisValid ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Check if all CGIs are still valid.

This function will compare the release period of the CGI and configured connection point. If the released period of the configured connection point does not cover the whole released period of all the CGI refered to it, error will be push into the "errors" container.

Parameters:
session Database session.
oid Object id of the connection point to be checked.
Returns:
true if all CGIs are valid else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::ConnectionPtGw::allChildReleasedPeriodCovered ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Check if all child CPs' released periods are covered.

This function will compare the release period of the parent and child connection point. If the released period of the parent connection point does not cover the whole released period of all the child connection points refered to it, this function will return false.

Parameters:
session Database session.
oid Object id of the connection point to be checked.
Returns:
true if all child released period has been covered else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::ConnectionPtGw::allE164sValid ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Check if all E164s are still valid.

This function will compare the release period of the E164 and configured connection point. If the released period of the configured connection point does not cover the whole released period of all the E164 refered to it, error will be push into the "errors" container.

Parameters:
session Database session.
oid Object id of the connection point to be checked.
Returns:
true if all E164s are valid else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::ConnectionPtGw::allTzConfigReleasedPeriodCovered ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Check if all tariff zone configurations' released periods are covered.

This function will compare the release period of the connection point and all dependent tariff zone configurations. If the released the connection point does not cover the whole released period of all all dependent tariff zone configurations, function will return false.

Parameters:
session Database session.
oid Object id of the connection point to be checked.
Returns:
true if all child released period has been covered else false.
Exceptions:
OsbException for any database errors.

OSB_LIB::ObjectStatus OSB_DB::ConnectionPtGw::checkObjVs ( const Session session,
const OSB_LIB::ConnectionPt cp 
) [private]

Check the current object version.

Parameters:
session Database session.
cp Connection point to verify.
Returns:
result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::delConnectionPt ( const Session session,
OSB_LIB::ConnectionPt cp 
) [private]

Delete a connection point from the database.

This function removes the connection point from the database. Object id of the connection point object passed in will be unset. The application will have to delete the object itself.

Parameters:
session Database session.
cp Unique id of a connection point object.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object has been modified.
  • Database error.

long OSB_DB::ConnectionPtGw::fetch ( const Session session,
OSB_LIB::CpTree cpTree 
)

Load all connection point into a STL container.

This function retrieve all the connection points availabel in database.

Parameters:
session Database session.
cpTree Pointer to connection point master list.
Returns:
Number of objects retrieved.
Exceptions:
OsbException when if there are errors.

bool OSB_DB::ConnectionPtGw::fetch ( const Session session,
OSB_LIB::ConnectionPt cp 
)

Populate a connection point's data members.

This function takes in a connection point object with only its oid set. Base on the oid, this function will populate other data members with data from database.

Parameters:
session Database session.
cp Connection point object to be populated.
Returns:
true if success else false.
Exceptions:
OsbException when if there are errors.

bool OSB_DB::ConnectionPtGw::gracePeriodExpired ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Ensure the grace period has expired.

This function checks whether the connection point to be revoked has past its grace period.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if expired else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::hasReleasedParent ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Ensure at least one parent relationship is released.

This function checks whether at least one parent relationship of the connection point with the given object id has been released.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if at least one parent relationship has been released else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::insConnectionPt ( const Session session,
OSB_LIB::ConnectionPt cp 
) [private]

Add a new connection point.

Before the function call, the connection point object to be added must have all its data members set (description is optional) except oid. After the function completed successfully, oid will be set.

Parameters:
session Database session.
cp New connection point object to be added.
Returns:
true if success else false.
Exceptions:
OsbException if:
  • Name is longer than the maximum number of characters allowed.
  • Description too long.
  • Duplicate name in database.

bool OSB_DB::ConnectionPtGw::isCpUsedByFreezedCgi ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Whether connection point is used by CGI.

This function checks whether a connection point is refered by a freezed CGI.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is referd by a CGI object, else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::isCpUsedByFreezedE164 ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Whether connection point is used by E164.

This function checks whether a connection point is refered by a freezed E164.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is referd by a E164 object, else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::isCpUsedByFreezedTzConfig ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Whether connection point is used by TzConfig.

This function checks whether a connection point is refered by a freezed Tariff zone configuration.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is referd by a TzConfig object, else false.
Exceptions:
OsbException for any database error.

bool OSB_DB::ConnectionPtGw::isCpUsedByReleasedCgi ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Whether connection point is used by CGI.

This function checks whether a connection point is refered by a released CGI.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is referd by a released CGI object, else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::isCpUsedByReleasedE164 ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Whether connection point is used by E164.

This function checks whether a connection point is refered by a released E164.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is referd by a released E164 object, else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::isCpUsedByReleasedTzConfig ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Whether connection point is used by TzConfig.

This function checks whether a connection point is refered by a released Tariff zone configuration.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is referd by a TzConfig object, else false.
Exceptions:
OsbException for any database error.

bool OSB_DB::ConnectionPtGw::isFreezedParent ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Is this a parent connection point.

This function checks whether the connection point with the given object id is the parent of other freezed connection point.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is the parent of other freezed connection point else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::isReleasedParent ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Is this a parent connection point.

This function checks whether the connection point with the given object id is the parent of other released connection point.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if it is the parent of other released connection point else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::noParentConflict ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Ensure no conflict to the parent relationship.

This function will ensure that no released parent relationships of the connection point with the given objec id, have the same release date.

Parameters:
session Database.
oid Object id of the connection point to be checked.
Returns:
true if no duplicate else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::parentCoverWholeChildReleasedPeriod ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid,
OSB_LIB::OsbErrors errors 
) [private]

Check if the parent CP does cover the whole child CP's released period.

This function will compare the release period of the parent and child connection point. If the released period of the parent connection point does not cover the whole released period of the child connection point, error will be push into the "errors" container.

Parameters:
session Database session.
oid Object id of the connection point to be checked.
errors Container of errors encountered.
Returns:
true if the parent covers the whole release period of the connection point, else false.

void OSB_DB::ConnectionPtGw::revokeAllParent ( const Session session,
const OSB_LIB::ConnectionPt::Oid oid 
) [private]

Revoke all parent relationship of a connection point.

This function will revoke all released parent relationship of a connection point with the given object id.

Parameters:
session Database.
oid Object id of the connection point where its parent relationships are to be revoked.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::ConnectionPtGw::updConnectionPt ( const Session session,
OSB_LIB::ConnectionPt cp 
) [private]

Update a connection point object.

This function overwrites the connection point object in the database that share the same object id with the new object passed in.

All dependent objects' release period must still be valid if the connection point's release period has been changed.

Parameters:
session Database session.
cp Connection point object to be updated.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Name too long.
  • Description too long.
  • Duplicate name.
  • Object not found.
  • Object has been modified.
  • Database error.
  • Conflict with the dependent objects' released periods.

void OSB_DB::ConnectionPtGw::updStatus ( const Session session,
OSB_LIB::ConnectionPt cp 
) [private]

Change the status of a connection point.

This function will change the status of a connection point with the given object id based on the input status.

Parameters:
session Database session to use.
cp Connection point to update, its new status must be set.


Friends And Related Function Documentation

friend class OSB_LIB::ConnectionPt [friend]

Connection point needs to call the private member functions.

Definition at line 62 of file connectionpt-gw.h.


The documentation for this struct was generated from the following file:
Generated on Sat Sep 2 14:09:02 2006 for OSB Library by  doxygen 1.4.7