Definition at line 687 of file tariffperiod-gw.h.
bool OSB_DB::TpsVersionGw::allDayClassesFreezed | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) | [private] |
Check whether all day classes configured are freezed.
session | Database session to use. | |
oid | Object id of TPS version to check. | |
errors | Container for detected errors. |
bool OSB_DB::TpsVersionGw::allDayClassesReleased | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) | [private] |
Check whether all day classes configured are released.
session | Database session to use. | |
oid | Object id of TPS version to check. | |
errors | Container for detected errors. |
bool OSB_DB::TpsVersionGw::checkDcSwitchTimeUnique | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) | [private] |
Check the uniqueness of "day class / switch time" pair.
This function will check whether all "day class /switch time" in a tariff period system version are unique.
session | Database session to use. | |
oid | Tariff period system version object id. | |
errors | Container for the errors found. |
OSB_LIB::ObjectStatus OSB_DB::TpsVersionGw::checkObjVs | ( | const Session & | session, | |
const OSB_LIB::TpsVersion & | tpsv | |||
) | [private] |
Check the current object version.
session | Database session. | |
tpsv | Object where the object version is to be checked. |
bool OSB_DB::TpsVersionGw::checkSwitchTime | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) | [private] |
Ensure the switch time is defined in the legal format "hh24:mm:ss".
session | Database session to use. | |
oid | Object id of TPS version to check. | |
errors | Container for the errors found. |
bool OSB_DB::TpsVersionGw::delTpsVersion | ( | const Session & | session, | |
OSB_LIB::TpsVersion & | tpsv | |||
) | [private] |
Delete a tariff period system version.
This function deletes a tariff period system version from database base on the passed in object. After a successful function call, the passed in tariff period system version will have its object id unset.
session | Database session. | |
tpsv | Tariff period system version to be deleted. |
OsbException | for the following errors:
|
bool OSB_DB::TpsVersionGw::eachDayCoveredOnce | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid | |||
) | [private] |
Ensure each day only exist in one day class.
This function ensures that every single day is only represented in one day class.
session | Database session. | |
oid | Tariff period system version object id. |
bool OSB_DB::TpsVersionGw::fetch | ( | const Session & | session, | |
OSB_LIB::TpsVersion & | tpsv | |||
) |
Retrieve tariff period system configuration.
This function populates the tariff period system object passed in with its configuration.
session | Database session. | |
tpsv | Tariff period system to be populated. |
OsbException | for any database errors. |
long OSB_DB::TpsVersionGw::fetch | ( | const Session & | session, | |
OSB_LIB::TpsVersions & | tpsvs | |||
) |
Retrieve all tariff period system versions.
session | Database session. | |
tpsvs | Container to store all tariff period system versions retrieved. |
OsbException | for any database errors. |
bool OSB_DB::TpsVersionGw::findReplacementFreezedTpsVersion | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid | |||
) | [private] |
Find the replacement for a freezed tariff period system version.
session | Database session. | |
oid | Object id of the tariff period system version to be replaced. |
OsbException | for the following errors:
|
bool OSB_DB::TpsVersionGw::hasOtherReleasedTpsVersion | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid | |||
) | [private] |
Check is there any other released tariff period system version exists.
session | Database session. | |
oid | Object id of the tariff period system version to be checked. |
bool OSB_DB::TpsVersionGw::identicalTariffPeriod | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid | |||
) | [private] |
Ensure all versions of tariff period system support the same set of tariff period.
This function will refer to the previous released versions of tariff period system to do the comparison. This function always return true if the object to be checked is the first version to be released.
session | Database session. | |
oid | Object id of the service class system version to be checked. |
OsbException | for any database errors. |
bool OSB_DB::TpsVersionGw::insTpsVersion | ( | const Session & | session, | |
OSB_LIB::TpsVersion & | tpsv | |||
) | [private] |
Create a new tariff period system version.
This function will create a new entry in the database base on the tariff period system version object passed in. After a successful function call, the passed in object will have its object id set.
session | Database session. | |
tpsv | New tariff period system version. |
OsbException | for the following errors:
|
bool OSB_DB::TpsVersionGw::isReleasedInFuture | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid | |||
) | [private] |
Ensure release date is in the future.
This function checks whether the tariff period system version with the given object id has its release date in the future.
session | Database session. | |
oid | Object id of the tariff period system version to be checked. |
OsbException | for any database errors. |
bool OSB_DB::TpsVersionGw::isTpSystemUsedByFreezedTsVersion | ( | const Session & | session, | |
const OSB_LIB::TpSystem::Oid & | oid | |||
) | [private] |
Check whether tariff period system version is in used.
This function checks whether any freezed tariff system version is using the tariff period system version with the object id given.
session | Database session. | |
oid | Object id of the tariff period system to be checked. |
OsbException | for the following errors:
|
bool OSB_DB::TpsVersionGw::isTpSystemUsedByReleasedTsVersion | ( | const Session & | session, | |
const OSB_LIB::TpSystem::Oid & | oid | |||
) | [private] |
Check whether tariff period system version is in used.
This function checks whether any released tariff system version is using the tariff period system version with the object id given.
session | Database session. | |
oid | Object id of the tariff period system to be checked. |
OsbException | for the following errors:
|
OSB_LIB::DateTime OSB_DB::TpsVersionGw::nextReleasedVersion | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid | |||
) | [private] |
Find the replacement for a released tariff period system version.
session | Database session. | |
oid | Object id of the tariff period system version to be replaced. |
bool OSB_DB::TpsVersionGw::switchTimeZeroDefined | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) | [private] |
For each dayclass, SW 00:00:00 must be defined.
session | Database session. | |
oid | Tariff period system version object id. | |
errors | Container for errors encountered. |
bool OSB_DB::TpsVersionGw::uniqueReleaseTs | ( | const Session & | session, | |
const OSB_LIB::TpSystem::Oid & | oid, | |||
const OSB_LIB::DateTime & | ts | |||
) | const [private] |
Check whether the release date is unique.
This function will check whether the release date is unique among the different versions of the same tariff period system.
session | Database session. | |
oid | Object id of the tariff period system. | |
ts | Release time stamp to check. |
void OSB_DB::TpsVersionGw::updStatus | ( | const Session & | session, | |
OSB_LIB::TpsVersion & | tpsVs | |||
) | [private] |
Change the status of a tariff period system version.
session | Database session to use. | |
tpsVs | TPS version to update, it must have the new status set. |
bool OSB_DB::TpsVersionGw::updTpsVersion | ( | const Session & | session, | |
OSB_LIB::TpsVersion & | tpsv | |||
) | [private] |
Update a tariff period system version.
This function will update the database entry base on the tariff period system version object passed in.
session | Database session. | |
tpsv | Updated tariff period system version. |
OsbException | for the following errors:
|
bool OSB_DB::TpsVersionGw::wholeWeekCover | ( | const Session & | session, | |
const OSB_LIB::TpsVersion::Oid & | oid | |||
) | [private] |
Check that one whole week is covered.
session | Database session. | |
oid | Tariff period system version object id. |
friend class OSB_LIB::TpsVersion [friend] |
Tps version needs to call the private member functions.
Definition at line 689 of file tariffperiod-gw.h.