Definition at line 182 of file tcdist-gw.h.
void OSB_DB::TzConfigGw::bothDateInFuture | ( | const Session & | session, | |
const OSB_LIB::TzConfig::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Ensure both start and end dates are in the future.
Start date must be in the future. End date must be in the future or null (not set).
session | Database session. | |
oid | Unique tariff zone config id. | |
errors | Container for the errors encountered. |
OSB_LIB::ObjectStatus OSB_DB::TzConfigGw::checkObjVs | ( | const Session & | session, | |
const OSB_LIB::TzConfig & | tzConfig | |||
) |
Check the current object version.
session | Database session. | |
tzConfig | Object where the object version is to be checked. |
void OSB_DB::TzConfigGw::checkOverLap | ( | const Session & | session, | |
const OSB_LIB::TzConfig & | tzConfig, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check for overlaps in tariff zones.
Check that changing the tariff zone to standby mode would not result in time period conflicts with other tariff zones already in standby mode.
session | Database session. | |
tzConfig | Tariff zone configuration to be checked. | |
errors | Error msg to show tariff zones have time period conflicts. |
bool OSB_DB::TzConfigGw::delAllTzConfig | ( | const Session & | session, | |
const OSB_LIB::TariffZone::Oid & | oid | |||
) |
Delete all tariff zone configurations from the database.
This function removes all tariff zone configuration with the tariff zone id from the database. It does not remove the tariff zone configuration object from the master list.
session | Database session. | |
oid | Unique id of tariff zone. |
OsbException | if encounter problem during process. |
bool OSB_DB::TzConfigGw::delTzConfig | ( | const Session & | session, | |
OSB_LIB::TzConfig & | tzcfg | |||
) |
Delete a tariff zone configuration from the database.
This function removes the tariff zone configuration from the database. It does not remove the tariff zone configuration object from the master list.
session | Database session. | |
tzcfg | Tariff zone configuration to be removed. |
OsbException | if encounter problem during process. |
bool OSB_DB::TzConfigGw::destinationCoverWholeTzCfgReleasedPeriod | ( | const Session & | session, | |
const OSB_LIB::TzConfig::Oid & | oid | |||
) |
Check if the destination connection point is valid through the relased period of tariff zone configuration.
This function will ensure that the released period of destination connection point covers the released period of the tariff zone configuration. The status of destination connection point must be released for the whole released period of a tariff zone configuration.
session | Database session. | |
oid | Unique tariff zone config id. |
void OSB_DB::TzConfigGw::destinationCoverWholeTzConfigReleasedPeriod | ( | const Session & | session, | |
const OSB_LIB::TzConfig::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check if the destination connection point is valid through the relased period of tariff zone configuration.
This function will ensure that the released period of destination connection point covers the released period of the tariff zone configuration. The status of destination connection point must be released for the whole released period of a tariff zone configuration.
session | Database session. | |
oid | Unique tariff zone config id. | |
errors | Container for the errors encountered. |
void OSB_DB::TzConfigGw::destinationFreezed | ( | const Session & | session, | |
const OSB_LIB::Id< OSB_LIB::ConnectionPt > & | dest, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check that the destination connection point has been freezed.
session | Database session. | |
dest | Object id of the destination connection point. | |
errors | Container for all errors found. |
void OSB_DB::TzConfigGw::destinationReleased | ( | const Session & | session, | |
const OSB_LIB::Id< OSB_LIB::ConnectionPt > & | dest, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check that the destination connection point has been released.
session | Database session. | |
dest | Object id of the destination connection point. | |
errors | Container for all errors found. |
bool OSB_DB::TzConfigGw::fetch | ( | const Session & | session, | |
OSB_LIB::TzConfig & | tzcfg | |||
) |
Populate a tariff zone configuration.
This function retrieves all data of a tariff zone configuration based on the object id of the object to be populated.
session | Database session. | |
tzcfg | Tariff zone configuration to be populated. |
OsbException | when encounter problem during process. |
long OSB_DB::TzConfigGw::fetch | ( | const Session & | session, | |
OSB_LIB::TzConfigs & | tzcfgs | |||
) |
Load all tariff zone configurations into the argument STL container.
This function supports the interface to retrieve data from TzConfig.
session | Database session. | |
tzcfgs | Container for the tariff zone configurations retrieved. |
OsbException | when encounter problem during process. |
void OSB_DB::TzConfigGw::gracePeriodExpired | ( | const Session & | session, | |
const OSB_LIB::TzConfig::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check that configuration including the grace period has already expired.
session | Database session. | |
oid | Unique tariff zone config id. | |
errors | Error msg to show configuration has not expired. |
bool OSB_DB::TzConfigGw::insTzConfig | ( | const Session & | session, | |
OSB_LIB::TzConfig & | tzCfg | |||
) |
Create a record in the database.
Create a new TzConfig object, which is to be returned to the caller. The function does not add the object into the list of tariff zone configurations.
session | Database session. | |
tzCfg | New tariff zone configuration to be inserted. |
OsbException | if origin and destination pair already exist. |
bool OSB_DB::TzConfigGw::isUsedByReleasedDistTcs | ( | const Session & | session, | |
const OSB_LIB::TariffZone::Oid & | tzOid | |||
) |
Check that tariff zone is used by any released distance TCS.
session | Database session. | |
tzOid | Tariff zone to verify. |
void OSB_DB::TzConfigGw::noDateConflict | ( | const Session & | session, | |
const OSB_LIB::TzConfig::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Ensure no conflict between the start and end dates.
This function ensures that start date must be earlier than end date, if end date is not null.
session | Database session. | |
oid | Unique tariff zone config id. | |
errors | Container for the errors encountered. |
bool OSB_DB::TzConfigGw::originCoverWholeTzCfgReleasedPeriod | ( | const Session & | session, | |
const OSB_LIB::TzConfig::Oid & | oid | |||
) |
Check if the origin connection point is valid through the relased period of tariff zone configuration.
This function will ensure that the released period of origin connection point covers the released period of the tariff zone configuration. The status of origin connection point must be released for the whole released period of a tariff zone configuration.
session | Database session. | |
oid | Unique tariff zone config id. |
void OSB_DB::TzConfigGw::originCoverWholeTzConfigReleasedPeriod | ( | const Session & | session, | |
const OSB_LIB::TzConfig::Oid & | oid, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check if the origin connection point is valid through the relased period of tariff zone configuration.
This function will ensure that the released period of origin connection point covers the released period of the tariff zone configuration. The status of origin connection point must be released for the whole released period of a tariff zone configuration.
session | Database session. | |
oid | Unique tariff zone config id. | |
errors | Container for the errors encountered. |
void OSB_DB::TzConfigGw::originFreezed | ( | const Session & | session, | |
const OSB_LIB::Id< OSB_LIB::ConnectionPt > & | origin, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check that the origin connection point has been freezed.
session | Database session. | |
origin | Object id of the origin connection point. | |
errors | Container for all errors found. |
void OSB_DB::TzConfigGw::originReleased | ( | const Session & | session, | |
const OSB_LIB::Id< OSB_LIB::ConnectionPt > & | origin, | |||
OSB_LIB::OsbErrors & | errors | |||
) |
Check that the origin connection point has been released.
session | Database session. | |
origin | Object id of the origin connection point. | |
errors | Container for all errors found. |
void OSB_DB::TzConfigGw::updStatus | ( | const Session & | session, | |
OSB_LIB::TzConfig & | tzConfig | |||
) |
Set status of version to standby mode.
session | Database session. | |
tzConfig | Tariff zone configuration to update, its new status must be set. |
bool OSB_DB::TzConfigGw::updTzConfig | ( | const Session & | session, | |
OSB_LIB::TzConfig & | tzcfg | |||
) |
Modify tariff zone configuration.
This function updates a tariff zone configuration entry in database. It updates the entry based on the updated tariff zone configuration object passed in. The object id of the tariff zone configuration is used to identify the entry in the database.
session | Database session. | |
tzcfg | Updated tariff zone configuration object. |
OsbException | if encounter problem during process. |