OSB_DB::TariffClassGw Struct Reference

List of all members.

Detailed Description

Database interface for tariff class.

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

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::TariffClassGw::checkObjVs ( const Session session,
const OSB_LIB::TariffClass tc 
) [private]

Check the current object version.

Parameters:
session Database session.
tc Tariff class to be checked.
Returns:
Result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::TariffClassGw::delTariffClass ( const Session session,
OSB_LIB::TariffClass tc 
) [private]

Delete a tariff class object from database.

This function will delete a tariff class entry from database based on the object id of the passed in tariff class object. After a successful deletion, the passed in tariff class object will have its object id unset.

Parameters:
session Database session.
tc Tariff class to be deleted.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object outdated. Object version differs.
  • Object not found.
  • Other database errors.

bool OSB_DB::TariffClassGw::fetch ( const Session session,
OSB_LIB::TariffClass tc 
)

Populate a tariff class object with data.

This function accept an empty tariff class object with only its object id set. With the object id, it retrieve all other data from database and populate the tariff class object.

Parameters:
session Database session.
tc Tariff class object to be populated.
Returns:
true if success else false.
Exceptions:
OsbException for any database errors.

long OSB_DB::TariffClassGw::fetch ( const Session session,
OSB_LIB::TariffClasses tcs 
)

Get a list of all tariff classes from database.

Parameters:
session Database session.
tcs Container for the tariff classes retrieved.
Returns:
Number of tariff classes retrieved.
Exceptions:
OsbException for any database errors.

bool OSB_DB::TariffClassGw::insTariffClass ( const Session session,
OSB_LIB::TariffClass tc 
) [private]

Insert a new tariff class into database.

Before the function call, the new tariff class may have all its attributes set except object id. Only after a successfully insertion, the new tariff class will have its object id set.

Parameters:
session Database session.
tc New tariff class to be inserted.
Returns:
true if insertion is successful else false.
Exceptions:
OsbException for the following errors:
  • Name too long.
  • Description too long.
  • Duplicate name.
  • Other datbase errors.

bool OSB_DB::TariffClassGw::updTariffClass ( const Session session,
OSB_LIB::TariffClass tc 
) [private]

Update a tariff class.

The function will update a tariff class entry in the database with the data from the passed in object based on the object id, also from the passed in tariff class object.

Parameters:
session Database session.
tc Updated tariff class.
Returns:
true if update is successful else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object outdated. Object version differs.
  • Other database errors.


Friends And Related Function Documentation

friend class OSB_LIB::TariffClass [friend]

Tariff class need to call the private member functions.

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


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