OSB_LIB::TpSystem Class Reference

Inheritance diagram for OSB_LIB::TpSystem:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Systems to determine the tariff period of a network usage.

Definition at line 607 of file tariffperiod.h.

Database operations:

Public Types

Public Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef Id<TpSystem> OSB_LIB::TpSystem::Oid

Type of object id of tariff period system.

Definition at line 617 of file tariffperiod.h.


Constructor & Destructor Documentation

OSB_LIB::TpSystem::TpSystem ( const Oid oid = Oid()  )  [explicit]

Default constructor with optional object id.


Member Function Documentation

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

Insert a tariff period system into database.

A new object is inserted. All attributes 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.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Duplicate name.

const Oid& OSB_LIB::TpSystem::oid (  )  const

Get object id.

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

Read a tariff period system from database.

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

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

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

Remove a tariff period system 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.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object has been modified.
  • Version object exists.

TpOidSet OSB_LIB::TpSystem::supportedTp (  )  const

Get list of supported tariff periods.

Returns:
The list of tariff periods supported by any TPS version that is not editable.

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

Update a tariff period system in the database.

Old entry in the database indentify by the object id will be replaced with the new data from the passed in, upated object.

Parameters:
session Database session used.
Returns:
true if success else false.
Exceptions:
OsbException for the following erros:
  • Name too long.
  • Object not found.
  • Object has been modified.


Friends And Related Function Documentation

friend class OSB_DB::TpSystemGw [friend]

Gateway need to populate data members.

Definition at line 609 of file tariffperiod.h.

friend class TariffCatalogue [friend]

Tariff Catalogue is the only object that is allow to invoke the private functions of this class.

Definition at line 614 of file tariffperiod.h.


Member Data Documentation

Oid OSB_LIB::TpSystem::oid_ [private]

Unique object id.

Definition at line 693 of file tariffperiod.h.


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