Class AbstractProductPopulator<SOURCE extends ProductModel,TARGET extends ProductData>
java.lang.Object
de.hybris.platform.commercefacades.product.converters.populator.AbstractProductPopulator<SOURCE,TARGET>
- All Implemented Interfaces:
Populator<SOURCE,TARGET>
- Direct Known Subclasses:
AbstractProductImagePopulator,CPQProductBasicPopulator,ProductBasicPopulator,ProductBundleDisablePopulator,ProductBundleStarterPopulator,ProductCategoriesPopulator,ProductClassificationPopulator,ProductDeliveryModeAvailabilityPopulator,ProductDescriptionPopulator,ProductEntitlementCollectionPopulator,ProductPricePopulator,ProductPriceRangePopulator,ProductPromotionsPopulator,ProductReviewsPopulator,ProductSoldIndividuallyPopulator,ProductStockPopulator,ProductSummaryPopulator,ProductVariantMatrixPopulator,ProductVariantOptionDataPopulator,ProductVolumePricesPopulator,SubscriptionProductBasicPopulator,SubscriptionProductPricePlanPopulator
public abstract class AbstractProductPopulator<SOURCE extends ProductModel,TARGET extends ProductData>
extends Object
implements Populator<SOURCE,TARGET>
Abstract base class for product populators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ModelServiceprotected ObjectgetProductAttribute(ProductModel productModel, String attribute) Get an attribute value from a product.protected StringsafeToString(Object value) Convert the object value to a string.voidsetModelService(ModelService modelService)
-
Constructor Details
-
AbstractProductPopulator
public AbstractProductPopulator()
-
-
Method Details
-
getModelService
-
setModelService
-
getProductAttribute
Get an attribute value from a product. If the attribute value is null and the product is a variant then the same attribute will be requested from the base product.- Parameters:
productModel- the productattribute- the name of the attribute to lookup- Returns:
- the value of the attribute
-
safeToString
Convert the object value to a string. If the object is null it is converted to a blank string.- Parameters:
value- the value to convert- Returns:
- the value string
-