OSB_DB::RatingFnGw Struct Reference

List of all members.

Detailed Description

Database interface for RatingFn.

Definition at line 58 of file ratingfn-gw.h.

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::RatingFnGw::checkObjVs ( const Session session,
const OSB_LIB::RatingFn rf 
) [private]

Check the current object version.

Parameters:
session Database session.
rf Rating function to check.
Returns:
The object status of the rating function.

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.

Parameters:
session Database session.
rf Rating functino to be deleted.
Returns:
true if deletion is successful else false.
Exceptions:
OsbException for the following errors:
  • Database error.
  • Object outdated. Object version differs.
  • Object not found.

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.

Parameters:
session Database session.
rfs Container that stores all the returned object.
Returns:
Number of rating functions retrieved.
Exceptions:
OsbException for the following errors:
  • Database error.

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.

Parameters:
session Database session.
rf Rating function object to be populated.
Returns:
true if the object is found, else false.
Exceptions:
OsbException for the following errors:
  • Database error.

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.

Parameters:
session Database session.
rf New rating function to be added.
Returns:
true if creation is successful else false.
Exceptions:
OsbException for the following errors:
  • The name is too long.
  • The description is too long.
  • Duplicate name.
  • Database error.

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.

Parameters:
session Database session.
oid Id of the rating function to be checked.
Returns:
true if in used else false.
Exceptions:
OsbException for the following errors:
  • Database error.

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.

Parameters:
session Database session.
oid Id of the rating function to be checked.
Returns:
true if in used else false.
Exceptions:
OsbException for the following errors:
  • Database error.

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.

Parameters:
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.
Returns:
true if the status was updated in the database,
false if the object version is not consistent.

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).

Parameters:
session Database session.
rf Rating function to be updated, which contains the new set of data within.
Returns:
true if updated successfully else false.
Exceptions:
OsbException for the following errors:
  • Database error.
  • Object outdated. Object version differs.
  • Object not found.
  • Name too long.
  • Description too long.
  • Duplicate name.


Friends And Related Function Documentation

friend class OSB_LIB::RatingFn [friend]

Rating function needs to call the private member functions.

Definition at line 62 of file ratingfn-gw.h.


The documentation for this struct was generated from the following file:
Generated on Sat Sep 2 14:09:02 2006 for OSB Library by  doxygen 1.4.7