public class CatalogEntryMediator extends AbstractCatalogEntryMediator
Constructor and Description |
---|
CatalogEntryMediator() |
Modifier and Type | Method and Description |
---|---|
void | close()
This method will perform cleanup on the business object mediator.
|
protected TableDataObject | createMissingParentProduct(CatalogEntryType catalogEntryNoun)
Creates the missing parent product of the given Catalog entry logical object when the parameter isCreateParentProductWhenMissing is set as true and the parent catalog entry does not exist in the database.
|
protected java.lang.String | generateMarkForDeltePartNumber(java.lang.String partNumber, java.sql.Timestamp currentTime)
Generates the part number for mark for delete according to the time stamp.
|
protected java.lang.String | getActionString()
Returns the change history action code for the catalog entry.
|
void | init()
This method performs initialization for the catalog entry mediator.
|
protected boolean | isMarkForDelete()
Whether or not mark for delete is enabled for the mediator.
|
protected boolean | isSubscriptionAttributesEmpty(java.util.List catalogEntryAttributeList)
This will go through each catalog entry attribute in the given catalogEntryAttributeList to determine if there are subscription attributes.
|
protected void | markCatalogEntryForDelete(java.lang.String catalogEntryId)
Marks the specified catalog entry as delete.
|
protected java.util.List | populateATTRIBUTE(boolean deleteFlag)
Populates a list of physical objects of ATTRIBUTE table from the catalog entry logical object.
|
protected java.util.List | populateATTRVALUE(boolean deleteFlag)
Populates a list of physical objects of ATTRVALUE table from the catalog entry logical object.
|
protected TableDataObject | populateCATENTDESCForMissingParent(java.lang.String parentCatEntryID, java.lang.String partNumber, java.lang.String thumbnail, java.lang.String fullImage)
Populates the physical object of CATENTDESC table for the missing parent product.
|
protected TableDataObject | populateCATENTRY(CatalogEntryType catalogEntryNoun)
Populates the physical object of CATENTRY table from the Catalog entry logical object.
|
protected java.util.List | populateCATENTRYATTR(boolean deleteFlag)
Populates a list of physical objects of CATENTRYATTR table from the catalog entry logical object.
|
protected TableDataObject | populateCATENTSHIP(java.lang.String catEntryID, CatalogEntryType catalogEntryNoun)
Populates the physical object of CATENTSHIP table from the Catalog entry logical object.
|
protected TableDataObject | populateCATENTSUBS(java.lang.String catEntryID, CatalogEntryType catalogEntryNoun)
Populates the physical object of CATENTSUBS table from the Catalog entry logical object.
|
protected TableDataObject | populateCATGPENRELForMissingParent(java.lang.String parentCatEntryID, CatalogGroupIdentifierType parentCatGroupIdentifier)
Populates the physical object of CATGPENREL table for the missing parent product.
|
protected java.util.List | populateLISTPRICE(java.lang.String catEntryID, CatalogEntryType catalogEntryNoun)
Populates the physical object of LISTPRICE table from the Catalog entry logical object.
|
protected TableDataObject | populateLISTPRICE(java.lang.String catEntryID, MonetaryAmountType price)
Populates the physical object of LISTPRICE table using the provided price.
|
protected TableDataObject | populateSTORECENT(java.lang.String catEntryID, java.lang.Integer storeID)
Populates the physical object of STORECENT table from the Catalog entry logical object.
|
protected void | processCatalogEntryIdentifier(CatalogEntryIdentifierType catalogEntryIdentifier)
Processes the catalog entry identifier logical noun part and sets catalog entry unique id, catalog entry part number, store id, owner id according to the noun part and the values in the business context.
|
protected void | setStoreID(PartNumberIdentifierType partNumberIdentifier)
Sets the store id based on the store id provided inside the part number identifier type.
|
protected void | transform(java.lang.Object catalogEntryNoun, boolean deleteFlag)
Transform the logical noun of catalog entry to list of physical objects.
|
protected void | updateTablesAsMarkForDelete(long nCatentryId, java.lang.String partNumber, long nBaseItemId, long nItemSpcId, java.sql.Timestamp currentTime)
Marks related tables as delete according to the specified information.
|
protected void | validateBasePropertiesForCATENTRY(TableDataObject catalogEntryDO)
Validate the base properties provided through the catalog entry attributes of the CatalogEntry logical noun for the CATENTRY table.
|
protected void | validateDataForCATENTSHIP(TableDataObject catalogEntryShippingDO)
Validate the data provided for the CATENTSHIP table.
|
protected void | validateDataForCATENTSUBS(TableDataObject catalogEntrySubsDO)
Validate the data provided for the CATENTSUBS table.
|
protected void transform(java.lang.Object catalogEntryNoun, boolean deleteFlag) throws DataLoadException
The method populateInventoryConfigurationTables was called to populate the inventory data of the given catalog entry.
The method createMissingParentProduct was called to check whether there is a need to create the missing parent product of the given catalog entry. If the configuration parameter is set and the parent product is missing, this method will create the missing parent product.
protected void setStoreID(PartNumberIdentifierType partNumberIdentifier) throws DataLoadException
protected TableDataObject populateCATGPENRELForMissingParent(java.lang.String parentCatEntryID, CatalogGroupIdentifierType parentCatGroupIdentifier) throws DataLoadException
protected TableDataObject populateCATENTDESCForMissingParent(java.lang.String parentCatEntryID, java.lang.String partNumber, java.lang.String thumbnail, java.lang.String fullImage) throws DataLoadException
protected TableDataObject createMissingParentProduct(CatalogEntryType catalogEntryNoun) throws DataLoadException
protected void validateBasePropertiesForCATENTRY(TableDataObject catalogEntryDO) throws DataLoadException
protected TableDataObject populateCATENTRY(CatalogEntryType catalogEntryNoun) throws DataLoadException
protected TableDataObject populateSTORECENT(java.lang.String catEntryID, java.lang.Integer storeID) throws DataLoadException
protected TableDataObject populateLISTPRICE(java.lang.String catEntryID, MonetaryAmountType price) throws DataLoadException
protected java.util.List populateLISTPRICE(java.lang.String catEntryID, CatalogEntryType catalogEntryNoun) throws DataLoadException
protected void validateDataForCATENTSHIP(TableDataObject catalogEntryShippingDO) throws DataLoadException
protected TableDataObject populateCATENTSHIP(java.lang.String catEntryID, CatalogEntryType catalogEntryNoun) throws DataLoadException
protected void updateTablesAsMarkForDelete(long nCatentryId, java.lang.String partNumber, long nBaseItemId, long nItemSpcId, java.sql.Timestamp currentTime) throws DataLoadException
protected java.lang.String generateMarkForDeltePartNumber(java.lang.String partNumber, java.sql.Timestamp currentTime)
protected void markCatalogEntryForDelete(java.lang.String catalogEntryId) throws DataLoadException
protected boolean isMarkForDelete()
public void init() throws DataLoadException
protected java.util.List populateATTRIBUTE(boolean deleteFlag) throws DataLoadException
protected java.util.List populateATTRVALUE(boolean deleteFlag) throws DataLoadException
protected java.util.List populateCATENTRYATTR(boolean deleteFlag) throws DataLoadException
protected void processCatalogEntryIdentifier(CatalogEntryIdentifierType catalogEntryIdentifier) throws DataLoadException
protected TableDataObject populateCATENTSUBS(java.lang.String catEntryID, CatalogEntryType catalogEntryNoun) throws DataLoadException
protected void validateDataForCATENTSUBS(TableDataObject catalogEntrySubsDO) throws DataLoadException
protected boolean isSubscriptionAttributesEmpty(java.util.List catalogEntryAttributeList)
public void close() throws DataLoadException
This method will perform cleanup on the business object mediator. It will attempt to close all of the data writers configured for this business object mediator.
This method will flush and commit any data waiting to be persisted in the batch as well as clear the ID resolver cache.
protected java.lang.String getActionString()