OSB_DB::TariffZoneGw Struct Reference

List of all members.

Detailed Description

Gateway for the class tariff zone.

This database gateway handles all database operation of the class tariff zone.

Definition at line 65 of file tcdist-gw.h.

Public Member Functions


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::TariffZoneGw::checkObjVs ( const Session session,
const OSB_LIB::TariffZone tz 
)

Check the current object version.

Parameters:
session Database session.
tz Object where the object version is 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::TariffZoneGw::delTariffZone ( const Session session,
OSB_LIB::TariffZone tz 
)

Delete a tariff zone from the database.

This function removes the tariff zone from the database. It does not ensure that the tariff zone is not used in any tariff zone configuration.
Also it does not remove the tariff zone object from the list of tariff zones.

Parameters:
session Database session.
tz Tariff zone to be deleted.
Returns:
true if success else false.
Exceptions:
OsbException if encounter problem during process.

long OSB_DB::TariffZoneGw::fetch ( const Session session,
OSB_LIB::TariffZone tz 
)

Populate a tariff zone with data from database.

This function takes in a tariff zone object with its object id set. Base on this id, it retrieves all other data and populates the passed in object.

Parameters:
session Database session.
tz Pointer to tariff zone master list.
Exceptions:
OsbException when encounter problem during process.
Returns:
Number of objects.

long OSB_DB::TariffZoneGw::fetch ( const Session session,
OSB_LIB::TariffZones tzs 
)

Load all tariff zones into the argument STL container.

This function supports the interface to retrieve data from TariffZone.

Parameters:
session Database session.
tzs Pointer to tariff zone master list.
Exceptions:
OsbException when encounter problem during process.
Returns:
Number of objects.

bool OSB_DB::TariffZoneGw::insTariffZone ( const Session session,
OSB_LIB::TariffZone tz 
)

Create a record in the database.

Create a new TariffZone object, which is to be returned to the caller. The function does not add the object into the list of tariff zones.

Parameters:
session Database session.
tz Reference to tariff zone object.
Returns:
true if success else false.
Exceptions:
OsbException if name and description is longer than the number of characters allowed and if encounter problem during process.

bool OSB_DB::TariffZoneGw::updTariffZone ( const Session session,
OSB_LIB::TariffZone tz 
)

Modify tariff zone.

Update a tariff zone in the database. The database entry identified by this tariff zone's id will be replaced with the updated tariff zone passed in.

Parameters:
session Database session.
tz Updated tariff zone.
Returns:
true if success else false.
Exceptions:
OsbException if name and description is longer than the number of characters allowed and if encounter problem during process.
Returns:
OsbError to indicate type of error.


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