Class AbstractProductPopulator<SOURCE extends ProductModel,​TARGET extends ProductData>

    • Constructor Detail

      • AbstractProductPopulator

        public AbstractProductPopulator()
    • Method Detail

      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • getProductAttribute

        protected java.lang.Object getProductAttribute​(ProductModel productModel,
                                                       java.lang.String attribute)
        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 product
        attribute - the name of the attribute to lookup
        Returns:
        the value of the attribute
      • safeToString

        protected java.lang.String safeToString​(java.lang.Object value)
        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