Class DefaultRangeNameProvider
java.lang.Object
de.hybris.platform.solrfacetsearch.provider.impl.DefaultRangeNameProvider
- All Implemented Interfaces:
RangeNameProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddValueRange(List<String> rangeNameList, IndexedProperty property, Object value, ValueRange range) getRangeNameList(IndexedProperty property, Object value) Resolves a list of range names for a specific value.getRangeNameList(IndexedProperty property, Object value, String qualifier) Resolves a list of range names for a specific value.getValueRanges(IndexedProperty property, String qualifier) Returns the ranges associated with an indexed property that match a specific qualifier.protected booleanisDoubleType(IndexedProperty property) protected booleanisFloatType(IndexedProperty property) protected booleanisIntegerType(IndexedProperty property) booleanisRanged(IndexedProperty property) Checks is an indexed property is ranged.protected booleanisStringOrTextType(IndexedProperty property) protected ComparablevalueOrDefault(Object value, Function<String, Comparable> valueFunction, Supplier<Comparable> defaultSupplier)
-
Constructor Details
-
DefaultRangeNameProvider
public DefaultRangeNameProvider()
-
-
Method Details
-
isRanged
Description copied from interface:RangeNameProviderChecks is an indexed property is ranged.- Specified by:
isRangedin interfaceRangeNameProvider- Parameters:
property- - the indexed property- Returns:
trueif the indexed property is ranged,falseotherwise
-
getValueRanges
Description copied from interface:RangeNameProviderReturns the ranges associated with an indexed property that match a specific qualifier.- Specified by:
getValueRangesin interfaceRangeNameProvider- Parameters:
property- - the indexed propertyqualifier- - the qualifier used for matching- Returns:
- the list of ranges
-
getRangeNameList
public List<String> getRangeNameList(IndexedProperty property, Object value) throws FieldValueProviderException Description copied from interface:RangeNameProviderResolves a list of range names for a specific value. For numerical types it allows open upper-limit range. If the property is not multiValueIndexedProperty.isMultiValue()only first matching range will be returned- Specified by:
getRangeNameListin interfaceRangeNameProvider- Parameters:
property- - the indexed propertyvalue- - the value for which the range names should be resolved- Returns:
- the list of range names
- Throws:
FieldValueProviderException- if it is not possible to resolve a range name for a specific value
-
getRangeNameList
public List<String> getRangeNameList(IndexedProperty property, Object value, String qualifier) throws FieldValueProviderException Description copied from interface:RangeNameProviderResolves a list of range names for a specific value. For numerical types it allows open upper-limit range. If the property is not multiValueIndexedProperty.isMultiValue()only first matching range will be returned- Specified by:
getRangeNameListin interfaceRangeNameProvider- Parameters:
property- - the indexed propertyvalue- - the value for which the range names should be resolvedqualifier- - the qualifier used for matching- Returns:
- the list of range names
- Throws:
FieldValueProviderException- if it is not possible to resolve a range name for a specific value
-
addValueRange
protected void addValueRange(List<String> rangeNameList, IndexedProperty property, Object value, ValueRange range) -
isStringOrTextType
-
isDoubleType
-
isFloatType
-
isIntegerType
-
valueOrDefault
protected Comparable valueOrDefault(Object value, Function<String, Comparable> valueFunction, Supplier<Comparable> defaultSupplier)
-