This class stores the unique id, name and description of the tariff that defines the rating of the network usage for a given tariff class and tariff period.
Definition at line 209 of file tariff.h.
typedef Id<Tariff> OSB_LIB::Tariff::Oid |
bool OSB_LIB::Tariff::insert | ( | const OSB_DB::Session & | session | ) | [private] |
This function allow tariff to insert itself into database.
The object's id is not set before the function call. If the function completed successfully, the object will have it's id set, else the id will still be the same (not set).
session | Database session. |
OsbException | for the following errors:
|
const Oid& OSB_LIB::Tariff::oid | ( | ) | const |
Get unique id of tariff.
bool OSB_LIB::Tariff::read | ( | const OSB_DB::Session & | session | ) |
This function allow tariff to read itself from database.
Object id must be set before the function call. The id is used to retrieve other details from database and populate the object.
session | Database session. |
bool OSB_LIB::Tariff::remove | ( | const OSB_DB::Session & | session | ) | [private] |
This function allow tariff to remove itself from database.
Object id must be set before the function call. The id will be unset if the function completed successfully, else no changes to the object.
session | Database session. |
OsbException | for the following errors:
|
bool OSB_LIB::Tariff::rounded | ( | ) | const |
Get round flag of tariff.
void OSB_LIB::Tariff::setRounded | ( | bool | rounded | ) |
Set round flag of tariff.
This function set the round flag of the tariff object. The new flag will only be updated in the database after the updTariff function is called.
rounded | Round flag of tariff. |
bool OSB_LIB::Tariff::update | ( | const OSB_DB::Session & | session | ) | [private] |
This function allow tariff to update itself into database.
This function will update an existing tairff object in the database. If the function completed successfully, the object's objVs will increment by 1.
session | Database session. |
OsbException | for the following errors:
|
friend struct OSB_DB::TariffGw [friend] |
friend class OSB_DB::TariffSystemGw [friend] |
friend class TariffCatalogue [friend] |
Oid OSB_LIB::Tariff::oid_ [private] |
bool OSB_LIB::Tariff::rounded_ [private] |