A personalized product node is be created if two situations:
Definition at line 81 of file persproduct.h.
Unique object identification: personalized product and product node.
A personalized product node is identified by:
Definition at line 95 of file persproduct.h.
OSB_LIB::PersProductNode::PersProductNode | ( | const Oid & | id | ) | [inline] |
const Id<PersProductItem> OSB_LIB::PersProductNode::addPersItem | ( | const OSB_DB::Session & | session, | |
std::auto_ptr< PersProductItem > | apPpi | |||
) | [private] |
Add an item to the personalized product node.
Add a personalized item entry to the database. Also add it to the persItems_ list. Pers. item id and pers. node id of the item will be set if successful.
The action is not allowed when the node is deactivated.
session | Database session to use. | |
apPpi | Auto pointer of the pers. item to add. |
OsbException |
|
void OSB_LIB::PersProductNode::assignItem | ( | std::auto_ptr< PersProductItem > | persItem | ) |
Assign a new pers. product item.
The function set the pers. product node id of persItem and adds it to the pers. product items list.
The function has no effect if the content of `persItem' is 0.
PersProductNode pn(...); // Get an auto pointer of a pers. product item: PersProductItem::AutoPtr aItem = ...; // Work with the pers. item through the auto pointer: aItem->doSomething(); PersProductItem* pItem = aItem.get(); // Sets content of auto pointer to 0: pn.assignItem(aItem); // Work with the pers. item through the remembered pointer: pItem->doSomeOtherThing();
persItem | Auto pointer with the pers. product item to assign. |
bool OSB_LIB::PersProductNode::changeStatus | ( | const OSB_DB::Session & | session, | |
StatusChange & | change, | |||
OsbErrors & | errors | |||
) | [private] |
Change the effective status of the pers. node.
session | Database session to use. | |
change | Copy of the status change to process, it contains the max. allowed effective status. | |
errors | Gets errors and warnings. |
const DateTime& OSB_LIB::PersProductNode::created | ( | ) | const [inline] |
Get the creating date of the personalized product node.
Definition at line 125 of file persproduct.h.
References created_.
bool OSB_LIB::PersProductNode::delPersItem | ( | const OSB_DB::Session & | session, | |
const Id< PersProductItem > & | ppiId | |||
) | [private] |
Remove a personalized product item.
Remove an entry from database, also remove it from list.
session | Database session to use. | |
ppiId | Object id of pers item to remove. |
OsbException |
|
const Status& OSB_LIB::PersProductNode::effStatus | ( | ) | const [inline] |
const DateTime& OSB_LIB::PersProductNode::effStatusDate | ( | ) | const [inline] |
Get the date when effective status was (last) set.
Definition at line 137 of file persproduct.h.
References effStatusDate_.
const PersProductItem* OSB_LIB::PersProductNode::findPersItem | ( | const Id< PersProductItem > & | ppiId | ) | const |
Find a personalized product item by id.
ppiId | Id of personalized product item to search for. |
const PersProductItem& OSB_LIB::PersProductNode::getPersItem | ( | const Id< PersProductItem > & | ppiId | ) | const |
Find a personalized product item by id.
ppiId | Id of personalized product item to search for. |
OsbException |
|
const Oid& OSB_LIB::PersProductNode::oid | ( | ) | const [inline] |
const PersProductItems& OSB_LIB::PersProductNode::persItems | ( | ) | const [inline] |
Get list of personalized items of the pers. node.
Definition at line 119 of file persproduct.h.
References persItems_.
PersProduct::Oid OSB_LIB::PersProductNode::persProductId | ( | ) | const [inline] |
const Status& OSB_LIB::PersProductNode::prefStatus | ( | ) | const [inline] |
const DateTime& OSB_LIB::PersProductNode::prefStatusDate | ( | ) | const [inline] |
Get the date when the perferred status was (first) requested.
Definition at line 149 of file persproduct.h.
References prefStatusDate_.
ProductNode::Oid OSB_LIB::PersProductNode::productNodeId | ( | ) | const [inline] |
Get id of the related product node.
Definition at line 1513 of file persproduct.h.
References oid_.
bool OSB_LIB::PersProductNode::read | ( | const OSB_DB::Session & | session | ) |
Read the pers. node from the database.
session | Database session to use. |
OsbException | in case of an illegal perferred or effective status. It is unspecified if some data of the pers. node have changed. |
void OSB_LIB::PersProductNode::readStatusChanges | ( | const OSB_DB::Session & | session, | |
const Period & | period | |||
) |
Read status changes for a time period.
The function gets the status changes for a personalized product node.
session | Database session to use. | |
period | Time period covered by the status requests, the upper boundary is not included. |
void OSB_LIB::PersProductNode::readStatusRequests | ( | const OSB_DB::Session & | session, | |
const Period & | period | |||
) |
Get status requests for a period of time.
The function reads the status requests for a personalized product node.
session | Database session to use. | |
period | Time period covered by the status requests, the upper boundary is not included. |
bool OSB_LIB::PersProductNode::remove | ( | const OSB_DB::Session & | session | ) | const [private] |
Delete a pers. product node from the database.
The function calls OSB_DB::PersProductGw::delPersProductNode() to remove the personalized node from the database.
session | Database session to use. |
OsbException |
|
bool OSB_LIB::PersProductNode::requestStatus | ( | const OSB_DB::Session & | session, | |
const ProductNode & | node, | |||
StatusRequest & | request, | |||
OsbErrors & | errors | |||
) | [private] |
Change the preferred status of the pers. product node.
session | Database session to use. | |
node | Related product node, it is needed to check the correct configuration of the pers. node. | |
request | Preferred status to set, see below. | |
errors | Get warnings and errors during processing. |
OsbError OSB_LIB::PersProductNode::setPrefStatus | ( | const OSB_DB::Session & | session, | |
const StatusRequest & | request | |||
) | [private] |
Set the preferred status of the pers. node.
session | Database session to use. | |
request | Status request that triggered the change of the preferred status. |
const StatusChanges& OSB_LIB::PersProductNode::statusChanges | ( | ) | const [inline] |
const StatusRequests& OSB_LIB::PersProductNode::statusRequests | ( | ) | const [inline] |
Id<PersProductItem> OSB_LIB::PersProductNode::updPersItem | ( | const OSB_DB::Session & | session, | |
PersProductItem & | ppi | |||
) | [private] |
Update a pers product item.
It will update a pers product item if the status of the node is created. Otherwise the old pers product item will be deassigned, a new pers product item create instead.
session | Database session to use. | |
ppi | Pers product item to update. |
friend class OSB_DB::PersProductGw [friend] |
Definition at line 82 of file persproduct.h.
friend class PersProduct [friend] |
List of status changes for the personalized product node.
Definition at line 428 of file persproduct.h.
Referenced by statusChanges().
DateTime OSB_LIB::PersProductNode::created_ [private] |
Status OSB_LIB::PersProductNode::effStatus_ [private] |
The effective status of the personalized product node.
Definition at line 424 of file persproduct.h.
Referenced by effStatus().
Date and time when the effective status was set.
Definition at line 426 of file persproduct.h.
Referenced by effStatusDate().
Oid OSB_LIB::PersProductNode::oid_ [private] |
Composed unique object id, database link.
Definition at line 416 of file persproduct.h.
Referenced by oid(), persProductId(), and productNodeId().
List of personalized product items of the pers. node.
Definition at line 432 of file persproduct.h.
Referenced by persItems().
Status OSB_LIB::PersProductNode::prefStatus_ [private] |
The preferred status for the personalized product node.
Definition at line 420 of file persproduct.h.
Referenced by prefStatus().
Date and time when the preferred status was requested.
Definition at line 422 of file persproduct.h.
Referenced by prefStatusDate().
List of status requests.
Definition at line 430 of file persproduct.h.
Referenced by statusRequests().