The TzConfig class is a configuration class for tariff zones. Each configuration of a tariff zone is make up of an origin, a destination (both as connection point oid) and a valid period of the tariff zone configuration. The origin and destination can be duplicate in a tariff zone but the valid period must not overlap.
Definition at line 173 of file tcdist.h.
typedef Id<TzConfig> OSB_LIB::TzConfig::Oid |
Default constructor with optional object id.
OSB_LIB::TzConfig::TzConfig | ( | const Id< TariffZone > & | tzId, | |
const Id< ConnectionPt > & | origin, | |||
const Id< ConnectionPt > & | dest | |||
) |
Construct from tariff zone, origin and destination.
const Id<ConnectionPt>& OSB_LIB::TzConfig::dest | ( | ) | const [inline] |
bool OSB_LIB::TzConfig::freeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set status of configuration to standby mode.
To set the status from editable to standby. The following rules must be satisfied.
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
bool OSB_LIB::TzConfig::insert | ( | const OSB_DB::Session & | session | ) | [private] |
Insert a tariff zone configuration into database.
session | Database session to use. |
OsbException | for the following errors:
|
const Oid& OSB_LIB::TzConfig::oid | ( | ) | const |
Get unique id of tariff zone and time period.
const Id<ConnectionPt>& OSB_LIB::TzConfig::origin | ( | ) | const [inline] |
bool OSB_LIB::TzConfig::read | ( | const OSB_DB::Session & | session | ) |
Read a tariff zone configuration from database.
The object id is used to gather other info from database and then populate the object's service tuple list.
session | Database session to use. |
bool OSB_LIB::TzConfig::release | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set status of configuration to released mode.
To change status to released mode, the following must be fulfilled:
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
bool OSB_LIB::TzConfig::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove a tariff zone configuration from database.
After the function call, oid of this object will be unset to indicate that there is no such entry anymore in the database.
session | Database session to use. |
OsbException | for the following errors:
|
bool OSB_LIB::TzConfig::revoke | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set status of configuration to standby mode.
To change status from released to standby mode, the following must be satisifed:
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
const Id<TariffZone>& OSB_LIB::TzConfig::tzOid | ( | ) | const |
Get tariff zone id.
bool OSB_LIB::TzConfig::unfreeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [private, virtual] |
Set status from standby to editable.
To change status from standby to editable, the following must be satisifed.
session | Database session to use. | |
errors | Container for error messages if any. |
Implements OSB_LIB::ToCfgBase.
bool OSB_LIB::TzConfig::update | ( | const OSB_DB::Session & | session | ) | [private] |
Update a tariff zone configuration in the database.
Old entry in the database identify by the object id will be replaced with the new data from this object.
session | Database session to use. |
OsbException | for the following errors:
|
friend struct OSB_DB::TzConfigGw [friend] |
friend class TariffCatalogue [friend] |
Id<ConnectionPt> OSB_LIB::TzConfig::dest_ [private] |
long OSB_LIB::TzConfig::objVs_ [private] |
Oid OSB_LIB::TzConfig::oid_ [private] |
Id<ConnectionPt> OSB_LIB::TzConfig::origin_ [private] |
Id<TariffZone> OSB_LIB::TzConfig::tzId_ [private] |