Class AbstractMultidimensionalProductFieldValueProvider

java.lang.Object
de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider
de.hybris.platform.commerceservices.search.solrfacetsearch.provider.AbstractMultidimensionalProductFieldValueProvider
All Implemented Interfaces:
FieldValueProvider
Direct Known Subclasses:
FirstGenericVariantProductUrlValueProvider, FirstVariantCategoryNameListValueProvider, MultidimentionalProductFlagValueProvider, ProductPriceRangeValueProvider

public abstract class AbstractMultidimensionalProductFieldValueProvider extends AbstractPropertyFieldValueProvider implements FieldValueProvider
Utility class for the Product Value Providers.
  • Constructor Details

    • AbstractMultidimensionalProductFieldValueProvider

      public AbstractMultidimensionalProductFieldValueProvider()
  • Method Details

    • getFieldValue

      protected abstract Object getFieldValue(ProductModel product)
    • getFieldValues

      public Collection<FieldValue> getFieldValues(IndexConfig indexConfig, IndexedProperty indexedProperty, Object model) throws FieldValueProviderException
      Description copied from interface: FieldValueProvider
      Returns a collection of FieldValue of a given indexedProperty that are fetched from the model based on the indexConfig. Supports multi-language and multi-currencies.
      Specified by:
      getFieldValues in interface FieldValueProvider
      Returns:
      Collection<FieldValue>
      Throws:
      FieldValueProviderException
    • addFieldValues

      protected void addFieldValues(List<FieldValue> fieldValues, IndexedProperty indexedProperty, Object value)
      Add a value in the list of field values. It will add one entry for each FieldValue related to the given Solr property.
      Parameters:
      fieldValues - The list of field values.
      indexedProperty - The property used on Solr.
      value - The value to be added.
    • getBaseProduct

      public ProductModel getBaseProduct(ProductModel model)
      For a given product, retrieve its base product.
      Parameters:
      model - The product.
      Returns:
      The base product, if it is a variant product, or the model, if it is already the base product or is not a variant product.
    • isVariantBaseProduct

      public boolean isVariantBaseProduct(ProductModel model)
      For a given product, finds out if it is a base product of GenericVariantProductModel products.
      Parameters:
      model - The product.
      Returns:
      True if it is a base product that has generic variants.
    • getFieldNameProvider

      protected FieldNameProvider getFieldNameProvider()
    • setFieldNameProvider

      public void setFieldNameProvider(FieldNameProvider fieldNameProvider)