OSB_LIB::TariffSystem Class Reference

Inheritance diagram for OSB_LIB::TariffSystem:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::TariffSystem:

Collaboration graph
[legend]
List of all members.

Detailed Description

Tariff System used to determine rate for a call party.

This class stores the unique id, name and description of the tariff system used to determine the attributes tariff class and tariff period required to rate a call.

Definition at line 85 of file tariffsystem.h.

Public Types

Public Member Functions

Private Member Functions

Modifying database operations

Private Attributes

Friends

Classes


Member Typedef Documentation

typedef Id<TariffSystem> OSB_LIB::TariffSystem::Oid

Type-safe, unique id of a tariff system.

Definition at line 97 of file tariffsystem.h.


Constructor & Destructor Documentation

OSB_LIB::TariffSystem::TariffSystem ( const Oid oid = Oid()  )  [explicit]

Default constructor with optional object id.


Member Function Documentation

bool OSB_LIB::TariffSystem::getTariffInfo ( Cdr cdr,
UsedService us,
const TsVersion tsVs 
)

Determine the tariff information for a used service.

Parameters:
cdr CDR to process, it
us Used service to process.
tsVs Tariff system version that is valid for us.
Returns:
Always true.
Exceptions:
OsbException if an error occurs.

bool OSB_LIB::TariffSystem::insert ( const OSB_DB::Session session  )  [private]

Insert a tariff system version into database.

A new object is inserted. All attribute of the object has been set except object id. The object id will only be set by the function if the insertion is successful.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Duplicate name.
  • Name too long.

const Oid& OSB_LIB::TariffSystem::oid (  )  const

Get unique id of tariff system.

void OSB_LIB::TariffSystem::rate ( Cdr cdr  ) 

Rate a call details record.

This function will rate all used services from the Cdr. At the end, the rate will be placed in the cdr.

Remarks:
All tariff information and rates contained in the used services are cleared by calling UsedSerivce::resetTariffInfo.
Parameters:
cdr Call details record that provides other information.

const AuthenType OSB_LIB::TariffSystem::rate ( Cdr cdr,
const Money money 
)

Rate a used service.

This function will rate a used service passed in. It also gathers other required information from the Cdr passed in. At the end, the rate will be placed in the cdr.

Remarks:
All tariff information and rates contained in the used services are cleared by calling UsedSerivce::resetTariffInfo.
Parameters:
cdr Call details record that provides other information.
money Available credit.
Returns:
The result status, available volume for the money and the unitId.

bool OSB_LIB::TariffSystem::read ( const OSB_DB::Session session  ) 

Read a tariff system version from database.

The object id is used to gather other info from database and then populate the object's data members.

Parameters:
session Database session.
Returns:
true if success else false.

bool OSB_LIB::TariffSystem::remove ( const OSB_DB::Session session  )  [private]

Remove a tariff system version from database.

After the function call, oid of this object will be unset to indicate that there is no such entry anymore in the database.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object does not exist.
  • Object outdated. Object version differs.
  • Object not in status editable.

bool OSB_LIB::TariffSystem::update ( const OSB_DB::Session session  )  [private]

Update a tariff system version in the database.

Old entry in the database identified by the object id will be replaced with the new data from this object.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object does not exist.
  • Object outdated. Object version differs.
  • Name too long.
  • Duplicate name.


Friends And Related Function Documentation

friend class OSB_DB::TariffSystemGw [friend]

Allow create function at the gateway to assign unique id to newly created tariff system objects.

Definition at line 90 of file tariffsystem.h.

friend class TariffCatalogue [friend]

Allow tariff catalogue to call private member functions.

Definition at line 93 of file tariffsystem.h.


Member Data Documentation

Oid OSB_LIB::TariffSystem::oid_ [private]

Unique id of tariff system.

Definition at line 237 of file tariffsystem.h.


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