Definition at line 58 of file ratingfn-gw.h.
OSB_LIB::ObjectStatus OSB_DB::RatingFnGw::checkObjVs | ( | const Session & | session, | |
const OSB_LIB::RatingFn & | rf | |||
) | [private] |
Check the current object version.
session | Database session. | |
rf | Rating function to check. |
bool OSB_DB::RatingFnGw::delRatingFn | ( | const Session & | session, | |
OSB_LIB::RatingFn & | rf | |||
) | [private] |
Delete a rating function.
The rating function to be deleted must already exist in the database. Besides taht, the object version of the rating function to be deleted must match the object version in the database. This is to ensure that the object to be deleted represent the entry in the database. After the function call, the object's id will be unset but the object itself is not deleted automatically. Application will have to delete the object itself.
session | Database session. | |
rf | Rating functino to be deleted. |
OsbException | for the following errors:
|
long OSB_DB::RatingFnGw::fetch | ( | const Session & | session, | |
OSB_LIB::RatingFns & | rfs | |||
) |
Get a list of all available rating functions.
This function retrieves all the available rating functions from the database.
session | Database session. | |
rfs | Container that stores all the returned object. |
OsbException | for the following errors:
|
bool OSB_DB::RatingFnGw::fetch | ( | const Session & | session, | |
OSB_LIB::RatingFn & | rf | |||
) |
Populate a rating function object with data.
This function accept an empty rating function with only its oid set. It will populate all other attributes of the object.
session | Database session. | |
rf | Rating function object to be populated. |
OsbException | for the following errors:
|
bool OSB_DB::RatingFnGw::insRatingFn | ( | const Session & | session, | |
OSB_LIB::RatingFn & | rf | |||
) | [private] |
Add a new rating function.
Before the functino call, the object must have all its member attributes assigned (including oid and object version). After the function call, the object will get its oid_ and objVs_. In case of an error, exception is thrown.
session | Database session. | |
rf | New rating function to be added. |
OsbException | for the following errors:
|
bool OSB_DB::RatingFnGw::isRatingFnUsedByFreezedTfVersion | ( | const Session & | session, | |
const OSB_LIB::RatingFn::Oid & | oid | |||
) | [private] |
Check whether the rating function is in used.
This functions check through all freezed tariff version to see whether any of them is using the rating function with the given object id.
session | Database session. | |
oid | Id of the rating function to be checked. |
OsbException | for the following errors:
|
bool OSB_DB::RatingFnGw::isRatingFnUsedByReleasedTfVersion | ( | const Session & | session, | |
const OSB_LIB::RatingFn::Oid & | oid | |||
) | [private] |
Check whether the rating function is in used.
This functions check through all released tariff version to see whether any of them is using the rating function with the given object id.
session | Database session. | |
oid | Id of the rating function to be checked. |
OsbException | for the following errors:
|
bool OSB_DB::RatingFnGw::setStatus | ( | const Session & | session, | |
OSB_LIB::RatingFn & | rf, | |||
OSB_LIB::CfgStatus | status | |||
) | [private] |
Change the status of a rating function.
This function will change the status of a rating function with the given object id based on the input status.
session | Database session to use. | |
rf | Rating function to update. If the function returns true its object version is increased and its status set to status. | |
status | New status of the rating function. |
bool OSB_DB::RatingFnGw::updRatingFn | ( | const Session & | session, | |
OSB_LIB::RatingFn & | rf | |||
) | [private] |
Update a rating function.
The function will modify the data of an object in the database with the data contained within the input rating functino object. The object entry in the database will only be updated if the input object represent the current entry in the database (the object version is the same).
session | Database session. | |
rf | Rating function to be updated, which contains the new set of data within. |
OsbException | for the following errors:
|
friend class OSB_LIB::RatingFn [friend] |
Rating function needs to call the private member functions.
Definition at line 62 of file ratingfn-gw.h.