Class ProductPricesValueResolver
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver<ProductModel,java.lang.Object,java.util.List<PriceInformation>>
-
- de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.ProductPricesValueResolver
-
- All Implemented Interfaces:
QualifierProviderAware,ValueResolver<ProductModel>
public class ProductPricesValueResolver extends AbstractValueResolver<ProductModel,java.lang.Object,java.util.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 Modifier and Type Field Description static java.lang.StringOPTIONAL_PARAMstatic booleanOPTIONAL_PARAM_DEFAULT_VALUE
-
Constructor Summary
Constructors Constructor Description ProductPricesValueResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel model, AbstractValueResolver.ValueResolverContext<java.lang.Object,java.util.List<PriceInformation>> resolverContext)PriceServicegetPriceService()protected java.lang.DoublegetPriceValue(IndexedProperty indexedProperty, java.util.List<PriceInformation> priceInformations)protected java.util.List<PriceInformation>loadPriceInformations(java.util.Collection<IndexedProperty> indexedProperties, ProductModel product)protected java.util.List<PriceInformation>loadQualifierData(IndexerBatchContext batchContext, java.util.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 Detail
-
OPTIONAL_PARAM
public static final java.lang.String OPTIONAL_PARAM
- See Also:
- Constant Field Values
-
OPTIONAL_PARAM_DEFAULT_VALUE
public static final boolean OPTIONAL_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPriceService
public PriceService getPriceService()
-
setPriceService
public void setPriceService(PriceService priceService)
-
loadQualifierData
protected java.util.List<PriceInformation> loadQualifierData(IndexerBatchContext batchContext, java.util.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,java.lang.Object,java.util.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<java.lang.Object,java.util.List<PriceInformation>> resolverContext) throws FieldValueProviderException
- Specified by:
addFieldValuesin classAbstractValueResolver<ProductModel,java.lang.Object,java.util.List<PriceInformation>>- Throws:
FieldValueProviderException
-
loadPriceInformations
protected java.util.List<PriceInformation> loadPriceInformations(java.util.Collection<IndexedProperty> indexedProperties, ProductModel product)
-
getPriceValue
protected java.lang.Double getPriceValue(IndexedProperty indexedProperty, java.util.List<PriceInformation> priceInformations) throws FieldValueProviderException
- Throws:
FieldValueProviderException
-
-