OSB_LIB::PersTariffSystem Class Reference

Inheritance diagram for OSB_LIB::PersTariffSystem:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

TariffSystem as personalized product item.

Remarks:
Copy constructor by compiler.

Definition at line 72 of file tsitem.h.

Public Types

Public Member Functions

Read access to data members

Static Public Attributes

Private Member Functions

Database operations
All the database operations on personalized tariff system items do not commit or rollback the transactions. This is indicated by taking a const OSB_DB::Session as argument.

Private Attributes

Friends


Member Typedef Documentation

typedef std::auto_ptr<PersTariffSystem> OSB_LIB::PersTariffSystem::AutoPtr

Short-cut for an auto pointer.

For details see quality manual, implementation patterns: Virtual copy construction.

Reimplemented from OSB_LIB::PersProductItem.

Definition at line 92 of file tsitem.h.

typedef Id<TariffSystem> OSB_LIB::PersTariffSystem::TsId

Type define the unique id of a tariff system.

Definition at line 89 of file tsitem.h.


Constructor & Destructor Documentation

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

Default constructor with optional object id.

Parameters:
oid Object id of PersProductItem. This is not the the tariff system id!

Definition at line 100 of file tsitem.h.

OSB_LIB::PersTariffSystem::PersTariffSystem ( const TsId tsid  )  [inline, explicit]

Constructor with tariff system.

Parameters:
tsid Tariff system id (as in TARIFF_SYSTEM).

Definition at line 108 of file tsitem.h.


Member Function Documentation

bool OSB_LIB::PersTariffSystem::canConfig (  )  const [virtual]

The configuration type of tariff system item (Can).

Implements OSB_LIB::PersProductItem.

AutoPtr OSB_LIB::PersTariffSystem::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented from OSB_LIB::PersProductItem.

PersProductItem* OSB_LIB::PersTariffSystem::clone_ (  )  const [private, virtual]

Internal virtual copy constructor.

For details see quality manual, implementation patterns.

Implements OSB_LIB::PersProductItem.

bool OSB_LIB::PersTariffSystem::delSpecific ( const OSB_DB::Session session  )  [private, virtual]

Delete a pers tariff system item from the database.

The function uses a OSB_DB::TsItemGw to remove data link from pers item to tariff system that is to remove a pers tariff system item.

Parameters:
session Database session to use.
Exceptions:
OsbException 
  • as specified by the gateway class
Returns:
True if the pers tariff system item was found and deleted from the database, else false.

Implements OSB_LIB::PersProductItem.

bool OSB_LIB::PersTariffSystem::insSpecific ( const OSB_DB::Session session  )  [private, virtual]

Insert a pers tariff system item to the database.

The function uses a OSB_DB::TsItemGw to insert data link from pers item to tariff system in the database that is to create a pers tariff system item.

Parameters:
session Database session to use.
Exceptions:
OsbException 
  • as specified by the gateway class
Returns:
True if the pers tariff system item was inserted into the database, else false.

Implements OSB_LIB::PersProductItem.

std::string OSB_LIB::PersTariffSystem::personalization (  )  const [virtual]

Personalization: The tariff system id.

Implements OSB_LIB::PersProductItem.

bool OSB_LIB::PersTariffSystem::readSpecific ( const OSB_DB::Session session  )  [private, virtual]

Read a pers tariff system item from the database.

The function uses a OSB_DB::TsItemGw to read the data members from the database.

Parameters:
session Database session to use.
Exceptions:
OsbException 
  • as specified by the gateway class
Returns:
True if the pers tariff system item was read from the database, else false.

Implements OSB_LIB::PersProductItem.

void OSB_LIB::PersTariffSystem::setTsId ( const TsId tsid  )  [inline]

Set tariff system id to the PersTariffSystem. Do not save to database.

Parameters:
tsid Tariff system id (as in TARIFF_SYSTEM).

Definition at line 118 of file tsitem.h.

References tsId_.

const TsId& OSB_LIB::PersTariffSystem::tsId (  )  const [inline]

Tariff system id as in TARIFF_SYSTEM.

Definition at line 123 of file tsitem.h.

References tsId_.

Type OSB_LIB::PersTariffSystem::type (  )  const [inline, virtual]

The type of the product item.

The function returns the type of the product item. It is needed for only one reason: Corba clients must provide a configuration window that depends on the actual type.

No appropriate design can be provided: Unless on-line clients use the real product item type through-out the whole live cycle of an object, there must be a way to determine the actual type of a product item. No matter how clever we make our design, for on-line clients there will always be one step where they need to determine a product item's type in a switch-like statement. For this step I personally perfer to work with an enumeration type (and compiler warnings) rather than relying on dynamic casts (where errors can be detected only during run-time).

Remarks:
Derived classes declare the function private.

Implements OSB_LIB::ProductItemBase.

Definition at line 128 of file tsitem.h.

References type_.

bool OSB_LIB::PersTariffSystem::updSpecific ( const OSB_DB::Session session  )  [private, virtual]

Update a pers tariff system item in the database.

The function uses a OSB_DB::TsItemGw to update data member in the database.

Parameters:
session Database session to use.
Exceptions:
OsbException 
  • as specified by the gateway class
Returns:
True if the pers tariff system item was updated in the database, else false.

Implements OSB_LIB::PersProductItem.


Friends And Related Function Documentation

friend class OSB_DB::TsItemGw [friend]

Read or write private members for I/O operations.

The gateway class needs direct read/write access to create/store resources in the database. This also includes calls to the private methods setStatus(...) and getStatus().

Definition at line 81 of file tsitem.h.

friend class TariffSystemItem [friend]

Allow to set the config.

Definition at line 83 of file tsitem.h.


Member Data Documentation

TsId OSB_LIB::PersTariffSystem::tsId_ [private]

Unique tariff system id, database link to TARIFF_SYSTEM.

Definition at line 217 of file tsitem.h.

Referenced by setTsId(), and tsId().

const Type OSB_LIB::PersTariffSystem::type_ [static]

The product item type id: PiType::piTariffSystem.

Definition at line 86 of file tsitem.h.

Referenced by type().


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