public class PriceListMediator extends AbstractPriceBaseMediator
This mediator is used to create and populate a list of physical table data objects, which are all instances of TableDataObject, from a price list logical noun. See transform(Object, boolean) for more details.
The main operations include:
The unique indexes to determine a Price List contains:
This mediator populates the TRADEPOSCN table.
Constructor and Description |
---|
PriceListMediator() |
Modifier and Type | Method and Description |
---|---|
void | init()
Performs initialization for the price list mediator.
|
protected void | markPriceListForDelete(com.ibm.commerce.price.facade.datatypes.PriceListType priceListNoun)
Marks the price lists as deleted.
|
protected TableDataObject | populatePriceList(com.ibm.commerce.price.facade.datatypes.PriceListType priceListNoun)
Creates and populates the physical data object intended for the TRADEPOSCN table data object from priceListNoun logic noun.
|
protected void | transform(java.lang.Object noun, boolean deleteFlag)
Transforms the price list logical noun to a list of physical objects.
|
protected void transform(java.lang.Object noun, boolean deleteFlag) throws DataLoadException
The transformed data object is created and transferred externally using AbstractBusinessObjectMediator.createBaseTableDataObjectWithUniqueIndex(String, Map).
If deleteFlag is true and mark for delete is enabled, this price list will be marked for delete, or else the price list data object will be populated.
protected void markPriceListForDelete(com.ibm.commerce.price.facade.datatypes.PriceListType priceListNoun) throws DataLoadException
The MARKFORDELETE column in TRADEPOSCN table will be set to 1, according to priceListName and ownerId which are resolved from pricListNoun.
Note that only when mark for delete is enabled that this method can be called.
protected TableDataObject populatePriceList(com.ibm.commerce.price.facade.datatypes.PriceListType priceListNoun) throws DataLoadException
The object is created and transferred externally using AbstractBusinessObjectMediator.createBaseTableDataObjectWithUniqueIndex(String, Map). The method contains some steps to obtain value for each column of TRADEPOSCN table from PriceList noun. The table and column data for the TRADEPOSCN table are contained in a TableDataObject.
public void init() throws DataLoadException
Initialization includes:
Set mark for delete. It determines whether mark for delete is enabled for this mediator.