Class SimplePropertyValueExtractor
java.lang.Object
io.jmix.search.index.mapping.propertyvalue.impl.AbstractPropertyValueExtractor
io.jmix.search.index.mapping.propertyvalue.impl.SimplePropertyValueExtractor
- All Implemented Interfaces:
PropertyValueExtractor
@Component("search_SimplePropertyValueExtractor")
public class SimplePropertyValueExtractor
extends AbstractPropertyValueExtractor
-
Field Summary
Fields inherited from class io.jmix.search.index.mapping.propertyvalue.impl.AbstractPropertyValueExtractor
objectMapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isSupported
(Object entity, MetaPropertyPath propertyPath, Map<String, Object> parameters) Checks if this value mapper supports value extraction of provided property.protected com.fasterxml.jackson.databind.JsonNode
transformMultipleValues
(Iterable<?> values, Map<String, Object> parameters) Transform extracted value of multi-value property into result json.protected com.fasterxml.jackson.databind.JsonNode
transformSingleValue
(Object value, Map<String, Object> parameters) Transform extracted value of single-value property into result json.Methods inherited from class io.jmix.search.index.mapping.propertyvalue.impl.AbstractPropertyValueExtractor
getFlatValueOrNull, getValue, isCollection, processValue
-
Constructor Details
-
SimplePropertyValueExtractor
public SimplePropertyValueExtractor()
-
-
Method Details
-
isSupported
protected boolean isSupported(Object entity, MetaPropertyPath propertyPath, Map<String, Object> parameters) Description copied from class:AbstractPropertyValueExtractor
Checks if this value mapper supports value extraction of provided property.- Specified by:
isSupported
in classAbstractPropertyValueExtractor
- Parameters:
entity
- instancepropertyPath
- propertyparameters
- parameters- Returns:
- true if value mapper supports this property, false otherwise
-
transformSingleValue
protected com.fasterxml.jackson.databind.JsonNode transformSingleValue(Object value, Map<String, Object> parameters) Description copied from class:AbstractPropertyValueExtractor
Transform extracted value of single-value property into result json.- Specified by:
transformSingleValue
in classAbstractPropertyValueExtractor
- Parameters:
value
- value of single-value propertyparameters
- parameters- Returns:
- value as json
-
transformMultipleValues
protected com.fasterxml.jackson.databind.JsonNode transformMultipleValues(Iterable<?> values, Map<String, Object> parameters) Description copied from class:AbstractPropertyValueExtractor
Transform extracted value of multi-value property into result json.- Specified by:
transformMultipleValues
in classAbstractPropertyValueExtractor
- Parameters:
values
- values of multi-value propertyparameters
- parameters- Returns:
- value as json
-