OSB_LIB::TariffSystemItem Class Reference

Inheritance diagram for OSB_LIB::TariffSystemItem:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Product item to select a tariff system.

This product item stores a list of tariff systems available for a product, one of the tariff systems may be marked as the default for personalization.

Remarks:
Copy constructor and assignment by compiler.

Definition at line 229 of file tsitem.h.

Public Types

Public Member Functions

Static Public Attributes

Private Member Functions

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

Private Attributes


Member Typedef Documentation

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

Short-cut for an auto pointer.

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

Reimplemented from OSB_LIB::ProductItem.

Definition at line 235 of file tsitem.h.

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

Shorthand for a tariff system id.

Definition at line 361 of file tsitem.h.

typedef std::set<TsId> OSB_LIB::TariffSystemItem::TsList

STL container used to store the tariff system ids.

Definition at line 363 of file tsitem.h.


Constructor & Destructor Documentation

OSB_LIB::TariffSystemItem::TariffSystemItem ( const Oid oid,
const std::string &  name = "",
const std::string &  des = "" 
)

Constructor with object id, name and description.

Parameters:
oid Product item object id.
name Name of the tariff system item.
des Description of the tariff system item.


Member Function Documentation

bool OSB_LIB::TariffSystemItem::addTs ( const TsId ts  ) 

Add a tariff system.

Parameters:
ts Id of the tariff system to add.
Returns:
True if ts was not already in tariff system list, else false.
Remarks:
The function does not verify, that the tariff system really exists.

ProductItem::CfgType OSB_LIB::TariffSystemItem::canConfigure (  )  const [inline, virtual]

The configuration type of tariff system item.

Implements OSB_LIB::ProductItem.

Definition at line 269 of file tsitem.h.

References OSB_LIB::ProductItem::cfgMandatory.

ProductItem::DefPersType OSB_LIB::TariffSystemItem::canDefPers (  )  const [inline, virtual]

The default personalization type of tariff system item.

Implements OSB_LIB::ProductItem.

Definition at line 274 of file tsitem.h.

References OSB_LIB::ProductItem::defPersOptional.

CfgPersType OSB_LIB::TariffSystemItem::canPersonalize (  )  const [virtual]

The personalization type of tariff system item.

Implements OSB_LIB::ProductItem.

void OSB_LIB::TariffSystemItem::clear (  ) 

Delete all added tariff systems and unset default.

void OSB_LIB::TariffSystemItem::clearDefaultTs (  ) 

Clear the default tariff system.

AutoPtr OSB_LIB::TariffSystemItem::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented from OSB_LIB::ProductItem.

ProductItem* OSB_LIB::TariffSystemItem::clone_ (  )  const [private, virtual]

Virtual copy construction.

For details see quality manual, implementation patterns.

Implements OSB_LIB::ProductItem.

std::auto_ptr<PersProductItem> OSB_LIB::TariffSystemItem::crePersProductItem (  )  const [virtual]

Create a personalized tariff system item.

Returns:
A product item auto pointer. The real type of the item is a PersTariffSystem.
The id of the personalized item is not set, it's tariff system is set to the default TS.

Implements OSB_LIB::ProductItem.

void OSB_LIB::TariffSystemItem::defaultTs ( const TsId ts  ) 

Set the default tariff system for personalization.

Remarks:
If ts is not yet in the tariff system list, it is automatically added.
Parameters:
ts Id of the new default tariff system.

const TsId& OSB_LIB::TariffSystemItem::defaultTs (  )  const

Get the default tariff system.

Returns:
The id of the current default tariff system, it is notSet() if none is defined.

const PersProductItem* OSB_LIB::TariffSystemItem::defPersItem (  )  const [virtual]

Pointer to the default personalize product item.

Implements OSB_LIB::ProductItem.

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

Delete a tariff system item from the database.

The function uses a OSB_DB::TsItemGw to remove data.

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

Implements OSB_LIB::ProductItem.

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

Insert a tariff system item to the database.

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

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

Implements OSB_LIB::ProductItem.

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

(Re)read a tariff system item from the database.

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

Parameters:
session Database session to use.
Exceptions:
OsbException 
  • as specified by the gateway class
Returns:
Currently always true.

Implements OSB_LIB::ProductItem.

bool OSB_LIB::TariffSystemItem::rmTs ( const TsId ts  ) 

Delete a tariff system.

Remarks:
If the default tariff system is ts it is cleared.
Parameters:
ts Id of the tariff system to delete.
Returns:
True if ts was in the tariff system list, else false.

const TsList& OSB_LIB::TariffSystemItem::tsList (  )  const

List of tariff systems added to the item.

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

Get the product item type id.

Implements OSB_LIB::ProductItemBase.

Definition at line 252 of file tsitem.h.

References type_.

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

Update a 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 tariff system item was updated in the database, else false.

Implements OSB_LIB::ProductItem.


Member Data Documentation

TsId OSB_LIB::TariffSystemItem::defaultTs_ [private]

Default tariff system for personalization.

Definition at line 417 of file tsitem.h.

PersTariffSystem OSB_LIB::TariffSystemItem::defPersTs_ [private]

Default personalized tariff system item.

Definition at line 419 of file tsitem.h.

TsList OSB_LIB::TariffSystemItem::tsList_ [private]

List of tariff systems available for the item.

Definition at line 415 of file tsitem.h.

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

The product item type id: PiType::piTariffSystem.

Definition at line 232 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:38 2006 for OSB Library by  doxygen 1.4.7