OSB_LIB::RateCodes Class Reference

Collaboration diagram for OSB_LIB::RateCodes:

Collaboration graph
[legend]
List of all members.

Detailed Description

Provide list of rate codes.

Definition at line 108 of file tariff.h.

Public Types

Public Member Functions

Maintenance of rate codes.

Private Attributes


Member Typedef Documentation

typedef std::map<RateCode::Oid, RateCode> OSB_LIB::RateCodes::Cont

STL containter used to store the rate codes.

Definition at line 111 of file tariff.h.


Member Function Documentation

const Cont& OSB_LIB::RateCodes::codes (  )  const

Read access to all rate codes.

void OSB_LIB::RateCodes::create ( const OSB_DB::Session session,
RateCode rc 
)

Create a rate code in the database.

Parameters:
session Database session to use.
rc RateCode to create, its object id is set if the function returns successful.
Exceptions:
OsbException if
  • the name is duplicate.
  • the name is empty.
  • mnemonic is duplicate.

const RateCode* OSB_LIB::RateCodes::findRateCode ( const RateCode::Oid id  ) 

Get a rate code, non-throwing.

Parameters:
id Object id of the rate code to find.
Returns:
The rate code for id, it is 0 if the rate code for id does not exist.

const RateCode& OSB_LIB::RateCodes::getRateCode ( const RateCode::Oid id  ) 

Get a rate code.

Parameters:
id Object id of the rate code to find.
Exceptions:
ObjectNotFound if the rate code for id does not exist.
Returns:
The rate code for id.

void OSB_LIB::RateCodes::read ( const OSB_DB::Session session  ) 

Read rate codes from the database.

void OSB_LIB::RateCodes::remove ( const OSB_DB::Session session,
RateCode rc 
)

Delete a rate code from the database.

Parameters:
session Database session to use.
rc RateCode to delete, its object id is cleared if the function return successful.
Exceptions:
OsbException if the rate code is used by rating functions.
ObjectModified if the object version does not match the database.
Note:
The function does not throw if the rate code to delete does not exist in the database or in the internal STL-container codes_: the user wanted to dispose of a rate code that does no more exist, everybody should be happy:-)

void OSB_LIB::RateCodes::update ( const OSB_DB::Session session,
RateCode rc 
)

Modify a rate code in the database.

Parameters:
session Database session to use.
rc RateCode to update, its object version is increased.
Exceptions:
OsbException if
  • the name is duplicate.
  • the mnemonic is duplicate.
ObjectNotFound if rc does not exist in the database.
ObjectModified if the object version does not match the database.


Member Data Documentation

Cont OSB_LIB::RateCodes::codes_ [private]

STL container of known codes.

Definition at line 197 of file tariff.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:16:36 2006 for OSB Library by  doxygen 1.4.7