Definition at line 161 of file tariff-gw.h.
OSB_LIB::ObjectStatus OSB_DB::TariffGw::checkObjVs | ( | const Session & | session, | |
const OSB_LIB::Tariff & | tf | |||
) | [private] |
Check the current object version.
session | Database session. | |
tf | Tariff object which object version is to be verified. |
OsbException | for the following errors:
|
bool OSB_DB::TariffGw::delTariff | ( | const Session & | session, | |
OSB_LIB::Tariff & | tf | |||
) | [private] |
Delete a tariff from database.
The tariff to be deleted must already exist in the database. Besides that, the object version of the tariff object to be deleted must match the object version in the database. This is to ensure that the object to be deleted truly represents the entry in the databse. After the function call, the object's id will be unset but the object itself is not deleted automatically. Application is responsible to delete the tariff object itself.
session | Database session. | |
tf | Tariff object to be deleted. |
OsbException | for the following errors:
|
long OSB_DB::TariffGw::fetch | ( | const Session & | session, | |
OSB_LIB::Tariffs & | tfs | |||
) |
Get a list of all available tariffs.
This function retrieve all the available tariffs from database.
session | Database session. | |
tfs | Container that stores all the retrieved object |
OsbException | for the following errors:
|
bool OSB_DB::TariffGw::fetch | ( | const Session & | session, | |
OSB_LIB::Tariff & | tf | |||
) |
Populate a tariff object with data.
This function accept an empty tariff object with only its oid set. It will populate all other data members of the object.
session | Database session. | |
tf | Tariff object to be populated. |
OsbException | for the following errors:
|
bool OSB_DB::TariffGw::insTariff | ( | const Session & | session, | |
OSB_LIB::Tariff & | tf | |||
) | [private] |
Add a new tariff object.
Before the function call, the object must have all its member attributes assigned (except oid and object version). After the function call, the object will have its oid_ and objVs_ set.
session | Database session. | |
tf | New tariff object to be added into database. |
OsbException | for the following errors:
|
bool OSB_DB::TariffGw::updTariff | ( | const Session & | session, | |
OSB_LIB::Tariff & | tf | |||
) | [private] |
Update a tariff object.
The function will modify the data of a tariff in the database with the data contained within the input object. The tariff object entry in the database will only be updated if the input object truly represent the current entry in the database (the object version is the same).
session | Database session. | |
tf | Tariff object to be updated. |
OsbException | for the following errors:
|
friend class OSB_LIB::Tariff [friend] |
Tariff needs to call the private member functions.
Definition at line 165 of file tariff-gw.h.