OSB_DB::TariffSystemGw Class Reference

List of all members.

Detailed Description

Database interface for all tariff system.

Definition at line 61 of file tariffsystem-gw.h.

Public Member Functions


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::TariffSystemGw::checkObjVs ( const Session session,
const OSB_LIB::TariffSystem ts 
)

Check the current object version.

Parameters:
session Database session to use.
ts Tariff system to be checked.
Returns:
Result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted

bool OSB_DB::TariffSystemGw::delTariffSystem ( const Session session,
OSB_LIB::TariffSystem ts 
)

Delete tariff system from the database.

This function removes the tariff system from the database. It does not remove the tariff system object from the list of tariff systems.

Parameters:
session Database session to use.
ts Tariff system object to be deleted.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object outdated. Object version differs.
  • Object not found.
  • Refered by TS version.

bool OSB_DB::TariffSystemGw::fetch ( const Session session,
OSB_LIB::TariffSystem ts 
)

Load all tariff systems into the argument STL container.

This function supports the interface to retrieve data from tariff system.

Parameters:
session Database session to use.
ts Tariff system to be populated.
Returns:
true if success else false.

bool OSB_DB::TariffSystemGw::fetch ( const Session session,
OSB_LIB::TariffSystems tss 
)

Load all tariff systems into a STL container.

This function supports the interface to retrieve data from tariff system.

Parameters:
session Database session to use.
tss Container to store the tariff system retrieved.
Returns:
true if success else false.

long OSB_DB::TariffSystemGw::getGracePeriod ( const Session session,
const OSB_LIB::ModuleId  module 
)

Get grace period from system configuration.

Parameters:
session Database session to use.
module Module for which to get the grace period.
Returns:
Number of days of the grace period.

bool OSB_DB::TariffSystemGw::insTariffSystem ( const Session session,
OSB_LIB::TariffSystem ts 
)

Create a record in the database.

Create a new tariff system object, which is to be returned to the caller. The function does not add the object into the list of tariff systems.

Parameters:
session Database session to use.
ts Reference to tariff system object.
Returns:
true if success else false.
Exceptions:
OsbException if name or value is longer than the characters allowed and if encounter problem during process.

bool OSB_DB::TariffSystemGw::lock ( const Session session,
const long  lockId,
bool  nowait = true 
)

Temporary locks for groups of tariff objects.

The functions tries to lock the row that is identified by lockId in the table TARIFF_OBJECT_LOCK. If the lock fails and waitflag is set to true, the function waits until the row becomes available. The function returns true if the requested row could be locked, else false.

Parameters:
session Database session to use.
lockId Sequence number: It determines the order in which the tariff object groups are to be locked. Use this as primary key related to database.
nowait This input will tell database whether it will wait to access this table until the previous lock function finishes.
Returns:
A bool varibale to indicate that whether this lock function is successfully.

bool OSB_DB::TariffSystemGw::updTariffSystem ( const Session session,
OSB_LIB::TariffSystem ts 
)

Modify tariff system.

Update the tariff system in the database with the one passed in. After a successful update, the passed in object will have its objVs_ increment.

Parameters:
session Database session to use.
ts Updated tariff system.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Name too long.
  • Description too long.
  • Object not found.
  • Object outdated. Object version differs.
  • Other database errors.


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