This database gateway handles all database operation of the class tariff zone.
Definition at line 65 of file tcdist-gw.h.
OSB_LIB::ObjectStatus OSB_DB::TariffZoneGw::checkObjVs | ( | const Session & | session, | |
const OSB_LIB::TariffZone & | tz | |||
) |
Check the current object version.
session | Database session. | |
tz | Object where the object version is to be checked. |
OsbException | for the following errors:
|
bool OSB_DB::TariffZoneGw::delTariffZone | ( | const Session & | session, | |
OSB_LIB::TariffZone & | tz | |||
) |
Delete a tariff zone from the database.
This function removes the tariff zone from the database. It does not ensure that the tariff zone is not used in any tariff zone configuration.
Also it does not remove the tariff zone object from the list of tariff zones.
session | Database session. | |
tz | Tariff zone to be deleted. |
OsbException | if encounter problem during process. |
long OSB_DB::TariffZoneGw::fetch | ( | const Session & | session, | |
OSB_LIB::TariffZone & | tz | |||
) |
Populate a tariff zone with data from database.
This function takes in a tariff zone object with its object id set. Base on this id, it retrieves all other data and populates the passed in object.
session | Database session. | |
tz | Pointer to tariff zone master list. |
OsbException | when encounter problem during process. |
long OSB_DB::TariffZoneGw::fetch | ( | const Session & | session, | |
OSB_LIB::TariffZones & | tzs | |||
) |
Load all tariff zones into the argument STL container.
This function supports the interface to retrieve data from TariffZone.
session | Database session. | |
tzs | Pointer to tariff zone master list. |
OsbException | when encounter problem during process. |
bool OSB_DB::TariffZoneGw::insTariffZone | ( | const Session & | session, | |
OSB_LIB::TariffZone & | tz | |||
) |
Create a record in the database.
Create a new TariffZone object, which is to be returned to the caller. The function does not add the object into the list of tariff zones.
session | Database session. | |
tz | Reference to tariff zone object. |
OsbException | if name and description is longer than the number of characters allowed and if encounter problem during process. |
bool OSB_DB::TariffZoneGw::updTariffZone | ( | const Session & | session, | |
OSB_LIB::TariffZone & | tz | |||
) |
Modify tariff zone.
Update a tariff zone in the database. The database entry identified by this tariff zone's id will be replaced with the updated tariff zone passed in.
session | Database session. | |
tz | Updated tariff zone. |
OsbException | if name and description is longer than the number of characters allowed and if encounter problem during process. |