Class ProductPricesValueResolver
java.lang.Object
de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver<ProductModel,Object,List<PriceInformation>>
de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.ProductPricesValueResolver
- All Implemented Interfaces:
QualifierProviderAware,ValueResolver<ProductModel>
public class ProductPricesValueResolver
extends AbstractValueResolver<ProductModel,Object,List<PriceInformation>>
Resolver for product prices.
Supported parameters:
Parameter Default value Description optional true If false, indicates that every product must have a price (for every qualifier). An exception of type FieldValueProviderExceptionis thrown if a price cannot be resolved.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
AbstractValueResolver.ValueResolverContext<T,U> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel model, AbstractValueResolver.ValueResolverContext<Object, List<PriceInformation>> resolverContext) protected DoublegetPriceValue(IndexedProperty indexedProperty, List<PriceInformation> priceInformations) protected List<PriceInformation>loadPriceInformations(Collection<IndexedProperty> indexedProperties, ProductModel product) protected List<PriceInformation>loadQualifierData(IndexerBatchContext batchContext, Collection<IndexedProperty> indexedProperties, ProductModel product, Qualifier qualifier) Loads data that is valid in the context of a model and qualifier.voidsetPriceService(PriceService priceService) Methods inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
addFieldValue, createLocalSessionContext, doResolve, filterAndAddFieldValues, filterFieldValue, getQualifierProvider, getSessionService, getValueFilters, loadData, removeLocalSessionContext, resolve, setQualifierProvider, setSessionService, setValueFilters
-
Field Details
-
OPTIONAL_PARAM
- See Also:
-
OPTIONAL_PARAM_DEFAULT_VALUE
public static final boolean OPTIONAL_PARAM_DEFAULT_VALUE- See Also:
-
-
Constructor Details
-
ProductPricesValueResolver
public ProductPricesValueResolver()
-
-
Method Details
-
getPriceService
-
setPriceService
-
loadQualifierData
protected List<PriceInformation> loadQualifierData(IndexerBatchContext batchContext, Collection<IndexedProperty> indexedProperties, ProductModel product, Qualifier qualifier) Description copied from class:AbstractValueResolverLoads data that is valid in the context of a model and qualifier.- Overrides:
loadQualifierDatain classAbstractValueResolver<ProductModel,Object, List<PriceInformation>> - Parameters:
batchContext- - the current indexer batch contextindexedProperties- - the indexed properties that use the same value resolverproduct- - the values should be resolved for this model instance
-
addFieldValues
protected void addFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel model, AbstractValueResolver.ValueResolverContext<Object, List<PriceInformation>> resolverContext) throws FieldValueProviderException- Specified by:
addFieldValuesin classAbstractValueResolver<ProductModel,Object, List<PriceInformation>> - Throws:
FieldValueProviderException
-
loadPriceInformations
protected List<PriceInformation> loadPriceInformations(Collection<IndexedProperty> indexedProperties, ProductModel product) -
getPriceValue
protected Double getPriceValue(IndexedProperty indexedProperty, List<PriceInformation> priceInformations) throws FieldValueProviderException - Throws:
FieldValueProviderException
-