OSB_DB::ServiceClassGw Struct Reference

List of all members.

Detailed Description

Database interface ServiceClass.

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

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::ServiceClassGw::checkObjVs ( const Session session,
const OSB_LIB::ServiceClass sc 
) [private]

Check the current object version.

Parameters:
session Database session to use.
sc Service class for which to check the object version.
Returns:
Result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted

bool OSB_DB::ServiceClassGw::delServiceClass ( const Session session,
OSB_LIB::ServiceClass sc 
) [private]

Delete a service class.

The service class to delete must already exist in the database table. Besides that, the object version of the service class to delete must match the object version in the database. This is to ensure that the object to delete represent the entry in the database. After the function call, the object's id will be unset but the object itself is not deleted automaticaly. Application will have to delete the object itself.

Parameters:
session Database session to use.
sc Service class to delete from database.
Returns:
true if deletion is successful else false.
Exceptions:
OsbException for the following errors:
  • Object in database has changed.
  • Object not found in database.
  • Refered by service class version.
  • Refered by tariff system version.

long OSB_DB::ServiceClassGw::fetch ( const Session session,
OSB_LIB::ServiceClasses scs 
)

Get a list of all available service class.

This function retrieve all the available service classes from the database.

Parameters:
session Database session to use.
scs STL container to store all fetched objects.
Returns:
Number of service classes available.

bool OSB_DB::ServiceClassGw::fetch ( const Session session,
OSB_LIB::ServiceClass sc 
)

Populate a service class object with data.

This function accept an empty service class with only its oid set. It will populate all other attribute of the object.

Parameters:
session Database session to use.
sc Service class to populate.
Returns:
true if the object is found, else false.

bool OSB_DB::ServiceClassGw::insServiceClass ( const Session session,
OSB_LIB::ServiceClass sc 
) [private]

Add a new service class.

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 get its oid_ and objVs_. In case of an error, exception is thrown.

Parameters:
session Database session to use.
sc Service class to be add.
Returns:
true if creation is successful else false.
Exceptions:
OsbException for the following errors:
  • Duplicate name.

bool OSB_DB::ServiceClassGw::updServiceClass ( const Session session,
OSB_LIB::ServiceClass sc 
) [private]

Update a service class.

The function will modify the data of an object in the database with the data contained within the input 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 to use.
sc Service class to update.
Returns:
true if updated successfully else false.
Exceptions:
OsbException for the following errors:
  • Object in database has changed.
  • Object not found in database.
  • Duplicate name.


Friends And Related Function Documentation

friend class OSB_LIB::ServiceClass [friend]

Service class needs to call the private member functions.

Definition at line 60 of file serviceclass-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