OSB_DB::E164Gw Struct Reference

List of all members.

Detailed Description

Database interface of E164.

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

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

bool OSB_DB::E164Gw::bothDateInFuture ( const Session session,
const OSB_LIB::E164::Oid oid 
) [private]

Ensure both start and end dates are in future.

This function checks whether both released start date and released end date of a E164 are in the future. For end date, it can be null.

Parameters:
session Database session.
oid Object id of the E164 to be checked.
Returns:
true if both start and end dates are in the future, or the end date is null, else false.
Exceptions:
OsbException for all database errors.

OSB_LIB::ObjectStatus OSB_DB::E164Gw::checkObjVs ( const Session session,
const OSB_LIB::E164 e164 
) [private]

Check the current object version.

Parameters:
session Database session.
e164 E164 object that the object version is to be checked.
Returns:
Result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted
Exceptions:
OsbException for any database errors.

bool OSB_DB::E164Gw::delE164 ( const Session session,
OSB_LIB::E164 e164 
) [private]

Delete a E164.

This function will delete a E164 entry from the database base on the passed in E164 object. This function will find the database entry with the same object id and object version when performing the deletion. After a successful deleteion in the database, this function will unset the object id of the passed in E164 object.

Parameters:
session Database session.
e164 E164 object to be deleted.
Returns:
true if deletion is successful else false.
Exceptions:
OsbException for the following errors:
  • Object out-dated. Object version differs.
  • Object not found.
  • Other database errors.

bool OSB_DB::E164Gw::fetch ( const Session session,
OSB_LIB::E164 e164 
)

Populate a E164 object with data.

This function accept an E164 object with object id set. With this oid, it will populate all other attributes of the object with the data in the database.

Parameters:
session Database session.
e164 E164 object to be populated.
Returns:
true if the object is found else false.
Exceptions:
OsbException for any database errors.

long OSB_DB::E164Gw::fetch ( const Session session,
OSB_LIB::E164s e164s 
)

Get a list of all available E164s.

This function retrieves all available E164s from database.

Parameters:
session Database session.
e164s Container to store all the E164s retrieved.
Returns:
Number of E164s retrieved.
Exceptions:
OsbException for any database errors.

OSB_LIB::CfgStatus OSB_DB::E164Gw::getStatus ( const Session session,
const OSB_LIB::E164::Oid oid 
) [private]

Get the status of a E164 in database.

Parameters:
session Database session.
oid Object id of the E164 to be checked.
Returns:
Status of the tariff period version found. Possible values are:
  • cfgEditable
  • cfgStandby
  • cfgTesting
  • cfgReleased
Exceptions:
OsbException for the following errors:
  • Database error.

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

Ensure the grace period for a E164 has expired.

This function will ensure the grace period for a E164 has expired.

Parameters:
session Database session.
oid Object id of the E164 to be checked.
Returns:
true if grace period expired else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::E164Gw::hasOverlapE164 ( const Session session,
const OSB_LIB::E164::Oid oid 
) [private]

Ensure no two E164s that is released at the same time.

This function checks all release E164s to ensure that no two E164 (with same value) is in status released at any time.o

Parameters:
session Database session.
oid Object id of the E164 to be checked.
Returns:
true if overlap release time between E164s exist else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::E164Gw::hasReleasedCp ( const Session session,
const OSB_LIB::E164::Oid oid 
) [private]

Ensure there is a released connection point assigned.

This function check whether the E164 has a released connection point assigned. The connection point must have been released when releasing a E164. This function will also ensure that the release period of the E164 is within the release period of the connection point configured.

Parameters:
session Database session.
oid Object id of the E164 to be checked.
Returns:
true if a released connection point is assigned else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::E164Gw::insE164 ( const Session session,
OSB_LIB::E164 e164 
) [private]

Add a new E164.

Before the function call, the E164 object do not have its object id. After a successful function call, the object id will be set and the object version will be set to 1.

Parameters:
session Database session.
e164 New E164 object to be added.
Returns:
true if insertion is successful else false.
Exceptions:
OsbException for the following errors:
  • Name too long.
  • Duplicate name.
  • Other database errors.

bool OSB_DB::E164Gw::noDateConflict ( const Session session,
const OSB_LIB::E164::Oid oid 
) [private]

Ensure no conflict for the start and end date.

This function will ensure that end date (if set), is later than the start date.

Parameters:
session Database session.
oid Object id of the E164 to be checked.
Returns:
true if no conflict else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::E164Gw::updE164 ( const Session session,
OSB_LIB::E164 e164 
) [private]

Update a E164.

The function will modify a database entry base on the passed in E164 object. It will find the database entry that has the same object id and object version with the passed in E164, then update the found entry with the data contained in the passed in E164 object.

Parameters:
session Database session.
e164 Updated E164 object.
Returns:
true if update is successful else false.
Exceptions:
OsbException for the following errors:
  • Name too long.
  • Duplicate name.
  • Object out-dated. Object version differs.
  • Object not found.
  • Other database errors.

void OSB_DB::E164Gw::updStatus ( const Session session,
OSB_LIB::E164 e164 
) [private]

Change the status of a E164.

This function changes the status of a E164 with the given object id to the status given in the argument.

Parameters:
session Database session to use.
e164 E164 to update, its new status must be set.


Friends And Related Function Documentation

friend class OSB_LIB::E164 [friend]

E164 needs to call the private member functions.

Definition at line 60 of file e164-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