Definition at line 216 of file tariffsystem-gw.h.
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).
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. |
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.
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).
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. |
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.
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. |
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).
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. |
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.
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. |
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.
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. |
OsbException | if encounter problem during process. |
void OSB_DB::TsVersionGw::checkObjVs | ( | const Session & | session, | |
const OSB_LIB::TsVersion & | tsVs | |||
) |
Check the current object version.
session | Database session to use. | |
tsVs | TS version to check. |
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.
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.
session | Database session to use. | |
tsVs | TS version object to populate. |
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.
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.
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.
session | Database session to use. | |
tsVs | TsVersion to insert. |
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.
session | Database session to use. | |
tsVs | TS version to lock, its object version is increased by 1 if the function does not throw. |
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.
session | Database session to use. | |
tsVs | Object id of TS version to check. |
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.
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.
session | Database session to use. | |
tsVs | TS version to check. |
bool OSB_DB::TsVersionGw::remove | ( | const Session & | session, | |
OSB_LIB::TsVersion * | tsVs | |||
) |
Delete a TS version in the database.
session | Database session to use. | |
tsVs | TS version to delete. |
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.
session | Database session to use. | |
tsVs | Object id of TS version to validate. | |
errors | Container for all the errors encountered. |
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.
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. |
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.
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. |
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.
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. |
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.
session | Database session to use. | |
tsVs | TS version to update. |
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.
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.
session | Database session to use. | |
tsVs | TS version to update, its new status must be set. |