This product item stores a list of price lists available for a product, one of the price lists may be marked as the default for personalization.
Definition at line 75 of file plitem.h.
typedef std::auto_ptr<PricelistItem> OSB_LIB::PricelistItem::AutoPtr |
Short-cut for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Reimplemented from OSB_LIB::ProductItem.
OSB_LIB::PricelistItem::PricelistItem | ( | const Oid & | oid, | |
const std::string & | name = "" , |
|||
const std::string & | des = "" | |||
) |
Constructor with object id, name and description.
oid | Product item object id. | |
name | Name of the price list item. | |
des | Description of the price list item. |
OSB_LIB::PricelistItem::PricelistItem | ( | const Oid & | oid, | |
const std::string & | name, | |||
const std::string & | des, | |||
const Id< Pricelist > & | plId | |||
) |
Constructor with full attribute.
oid | Product item object id. | |
name | Name of the price list item. | |
des | Description of the price list item. | |
plId | Object id of price list. |
ProductItem::CfgType OSB_LIB::PricelistItem::canConfigure | ( | ) | const [virtual] |
ProductItem::DefPersType OSB_LIB::PricelistItem::canDefPers | ( | ) | const [virtual] |
CfgPersType OSB_LIB::PricelistItem::canPersonalize | ( | ) | const [virtual] |
AutoPtr OSB_LIB::PricelistItem::clone | ( | ) | const |
Virtual copy construction.
For details see quality manual, implementation patterns.
Reimplemented from OSB_LIB::ProductItem.
ProductItem* OSB_LIB::PricelistItem::clone_ | ( | ) | const [private, virtual] |
Virtual copy construction.
For details see quality manual, implementation patterns.
Implements OSB_LIB::ProductItem.
std::auto_ptr<PersProductItem> OSB_LIB::PricelistItem::crePersProductItem | ( | ) | const [virtual] |
No personalization is availble for this class.
Implements OSB_LIB::ProductItem.
const PersProductItem* OSB_LIB::PricelistItem::defPersItem | ( | ) | const [virtual] |
bool OSB_LIB::PricelistItem::delSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Delete a price list item from the database.
The function uses a OSB_DB::PricelistItemGw to remove data.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
bool OSB_LIB::PricelistItem::insSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Insert a price list item to the database.
The function uses a OSB_DB::PricelistItemGw to insert data member to the database.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
bool OSB_LIB::PricelistItem::readSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
(Re)read a price list item from the database.
The function uses a OSB_DB::PricelistItemGw to read the data members.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
Type OSB_LIB::PricelistItem::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).
Implements OSB_LIB::ProductItemBase.
Definition at line 121 of file plitem.h.
References type_.
bool OSB_LIB::PricelistItem::updSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Update a price list item in the database.
The function uses a OSB_DB::PricelistItemGw to update data member in the database.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
friend class OSB_DB::PricelistItemGw [friend] |
Id<Pricelist> OSB_LIB::PricelistItem::plId_ [private] |
const Type OSB_LIB::PricelistItem::type_ [static] |
The product item type id: PiType::piPricelist.
Definition at line 84 of file plitem.h.
Referenced by type().