OSB_LIB::TariffZone Class Reference

Inheritance diagram for OSB_LIB::TariffZone:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::TariffZone:

Collaboration graph
[legend]
List of all members.

Detailed Description

Distance-sensitive grouping of one or more origin and destination pairs.

A grouping of one or more origin and destination pairs that is distance dependent.

Definition at line 82 of file tcdist.h.

Database operations:

Public Types

Public Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef Id<TariffZone> OSB_LIB::TariffZone::Oid

Type-safe, unique id of tariff zone.

Definition at line 89 of file tcdist.h.


Constructor & Destructor Documentation

OSB_LIB::TariffZone::TariffZone ( const Oid oid = Oid()  )  [inline, explicit]

Default constructor with optional object id.

Definition at line 92 of file tcdist.h.


Member Function Documentation

bool OSB_LIB::TariffZone::insert ( const OSB_DB::Session session  )  [private]

Insert a tariff zone into database.

A new object is inserted. All attribute of the object has been set except object id. The object id will only be set by the function if the insertion is successful.

Parameters:
session Database session to use.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Duplicate name.

const Oid& OSB_LIB::TariffZone::oid (  )  const [inline]

Get object id.

Definition at line 95 of file tcdist.h.

References oid_.

bool OSB_LIB::TariffZone::read ( const OSB_DB::Session session  ) 

Read a tariff zone from database.

The object id is used to gather other info from database and then populate the object's data members.

Parameters:
session Database session to use.
Returns:
true if success else false.

bool OSB_LIB::TariffZone::remove ( const OSB_DB::Session session  )  [private]

Remove a tariff zone from database.

After the function call, oid of this object will be unset to indicate that there is no such entry anymore in the database.

Parameters:
session Database session to use.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object does not exist.

bool OSB_LIB::TariffZone::update ( const OSB_DB::Session session  )  [private]

Update a tariff zone in the database.

Old entry in the database identify by the object id will be replaced with the new data from this object.

Parameters:
session Database session to use.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object does not exist.


Friends And Related Function Documentation

friend struct OSB_DB::TariffZoneGw [friend]

Database gateway need to populate private data members.

Definition at line 84 of file tcdist.h.

friend class TariffCatalogue [friend]

Tariff catalogue need to invoke private member functions.

Definition at line 86 of file tcdist.h.


Member Data Documentation

Oid OSB_LIB::TariffZone::oid_ [private]

Unique id of tariff zone.

Definition at line 153 of file tcdist.h.

Referenced by oid().


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