OSB_DB::TsVersionGw Struct Reference

List of all members.

Detailed Description

Database interface ServiceClass.

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

Public Member Functions

Update and delete operations:
Only calls these members after the lock was aquired successfully.

Utilities:
Checks for status change to standby:
Checks for status change to released:
Checks for status change from released to standby:

Member Function Documentation

void OSB_DB::TsVersionGw::allScConfigured ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all sevice classes supported (exist in the service class system) have been configured.

This function will ensure that all service class supported has an entry in the TS_SC_CONFIG table. And also, the corresponding tariff classifacation system is valid (The id of the TCS must be set, not 0).

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Container for service classes that classes id that does not exist in the service class system.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::allScsFreezed ( const Session session,
const OSB_LIB::TsVersion::ScsOid scsOid,
OSB_LIB::OsbErrors errors 
)

Check that service class system version is freezed.

Status freezed include standby, testing and released.

Parameters:
session Database session to use.
scsOid Unique id of service class system and version number.
errors Vector of OsbError that contain the service class system id and version number that are not freezed.

void OSB_DB::TsVersionGw::allTcConfigured ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all tariff classes supported (may result from the processing of tariff classification system) have been configured.

This function will ensure that all tariff class supported has an entry in the TS_TC_CONFIG table. And also, the corresponding tariff period system is valid (The id of the TPS must be set, not 0).

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Vector of OsbError that contain the tariff classes id that does not exist in the tariff classification system version.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::allTcsFreezed ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all tariff classification system versions in the tariff system are freezed.

Status freezed include standby, testing and released.

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Vector of OsbError that contain the tariff classification system id and version number that are not freezed.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::allTcTpConfigured ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
const OSB_LIB::TsVersion::RatingType type,
OSB_LIB::OsbErrors errors 
)

Check that a flat tariff is defined for all pairs tariff class / period.

This function will ensure that all tariff class, tariff period pairs supported has an entry in the TS_FLAT_TARIFF table. For tariff system that supports mass rating, all tariff class, tariff period pairs supported has an entry in the TS_MASS_TARIFF. And also, the corresponding tariff is valid (The id of the TF must be set, not 0).

Parameters:
session Database session to use.
tsVs Object id of TS version to validate.
type Type of rating supported by this tariff system.
errors Vector of OsbError that contain the tariff classes id that do not have any tariff period system version defined.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::allTfFreezed ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all tariff versions in the tariff system are freezed.

Status freezed include standby, testing and released.

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Vector of OsbError that contain the tariff classification system id and version number that are not freezed.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::allTpsFreezed ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all tariff period system versions in the tariff system are freezed.

Status freezed include standby, testing and released.

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Vector of OsbError that contain the tariff period system id and version number that are not freezed.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::checkObjVs ( const Session session,
const OSB_LIB::TsVersion tsVs 
)

Check the current object version.

Parameters:
session Database session to use.
tsVs TS version to check.
Exceptions:
ObjectDeleted if the TS version is deleted in the database.
ObjectModified if the TS version is modified in the database.

void OSB_DB::TsVersionGw::delCfg ( const Session session,
const OSB_LIB::TsVersion tsVs 
)

Delete the configuration of a TS version from the database.

Parameters:
session Database session to use.
tsVs TS version for which to delete the configuration.

bool OSB_DB::TsVersionGw::fetch ( const Session session,
OSB_LIB::TsVersion tsVs 
)

Populate data members of a tariff system version.

This function takes the object id of the passed in tariff system version object to retrieve necessary data.

Parameters:
session Database session to use.
tsVs TS version object to populate.
Returns:
true if success else false.

void OSB_DB::TsVersionGw::fetch ( const Session session,
OSB_LIB::TsVersions tsvs 
)

Load all tariff system versions and configurations into the argument STL container.

This function supports the interface to retrieve data from TS_VERSION, TS_SC_CONFIG, TS_TC_CONFIG, TS_FLAT_TARIFF and TS_MASS_TARIFF.

Parameters:
session Database session to use.
tsvs Container for tariff system versions retrieved.

void OSB_DB::TsVersionGw::insCfg ( const Session session,
const OSB_LIB::TsVersion tsVs 
)

Insert the configuration of a TS version into the database.

Parameters:
session Database session to use.
tsVs TS version for which to insert the configuration.

bool OSB_DB::TsVersionGw::insert ( const Session session,
OSB_LIB::TsVersion tsVs 
)

Create new records in the database.

The function add the newly created tariff system version into database. After a successful insertion, new object will get its object id.

Parameters:
session Database session to use.
tsVs TsVersion to insert.
Returns:
true if success else false.
Exceptions:
OsbException if version name is duplicate.

void OSB_DB::TsVersionGw::lock ( const Session session,
OSB_LIB::TsVersion tsVs 
)

Lock a TS version in the database.

Parameters:
session Database session to use.
tsVs TS version to lock, its object version is increased by 1 if the function does not throw.
Exceptions:
OsbException if the TS version can not be locked, i.e., inconsistent object version.

OSB_LIB::DateTime OSB_DB::TsVersionGw::nextReleasedVersion ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs 
)

Ensure a new released version of tariff system exist.

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
Returns:
Expired date of the TS version to replace.
It is not set if no replacement exits.

void OSB_DB::TsVersionGw::oneScSystem ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that tariff system has exactly one service class system.

Parameters:
session Database session to use.
tsVs Object id of the TS version to verify.
errors STL container for detected errors.

bool OSB_DB::TsVersionGw::releaseTsUnique ( const Session session,
const OSB_LIB::TsVersion tsVs 
)

Check for duplicate release time stamp of a TS version.

Parameters:
session Database session to use.
tsVs TS version to check.
Returns:
true if the release time stamp of tsVs is unique, else false.

bool OSB_DB::TsVersionGw::remove ( const Session session,
OSB_LIB::TsVersion tsVs 
)

Delete a TS version in the database.

Parameters:
session Database session to use.
tsVs TS version to delete.
Returns:
true if success else false.

void OSB_DB::TsVersionGw::scsReleased ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Ensure there is a release version of service class system configured.

Parameters:
session Database session to use.
tsVs Object id of TS version to validate.
errors Container for all the errors encountered.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::tcsReleased ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all tariff classification system version in the tariff system are released.

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Vector of OsbError that contain the tariff classification system id and version number that are not released.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::tfReleased ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all tariff version in the tariff system are released.

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Vector of OsbError that contain the tariff classification system id and version number that are not released.
Exceptions:
OsbException if encounter problem during process.

void OSB_DB::TsVersionGw::tpsReleased ( const Session session,
const OSB_LIB::TsVersion::Oid tsVs,
OSB_LIB::OsbErrors errors 
)

Check that all tariff period system version in the tariff system are released.

Parameters:
session Database session to use.
tsVs Object id of TS version to check.
errors Container for the errors if no released version exists for a TPS.
Exceptions:
OsbException if encounter problem during process.

bool OSB_DB::TsVersionGw::updAttr ( const Session session,
const OSB_LIB::TsVersion tsVs 
)

Update the attributes of a TS version in the database.

Note:
Does not update the status, call updStatus() for this.
Parameters:
session Database session to use.
tsVs TS version to update.
Returns:
true if success else false.
Exceptions:
OsbException if version name is duplicate.

void OSB_DB::TsVersionGw::updCfg ( const Session session,
const OSB_LIB::TsVersion tsVs 
)

Update the configuration of a TS version in the database.

Parameters:
session Database session to use.
tsVs TS version to update.

bool OSB_DB::TsVersionGw::updStatus ( const Session session,
const OSB_LIB::TsVersion tsVs 
)

Change the status of a TS version in the database.

Parameters:
session Database session to use.
tsVs TS version to update, its new status must be set.
Returns:
true in case of success, else false.


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