Class ReferenceMultiFieldPropertyMapping.Builder
java.lang.Object
io.jmix.dataimport.configuration.mapping.ReferenceMultiFieldPropertyMapping.Builder
- Enclosing class:
- ReferenceMultiFieldPropertyMapping
- 
Constructor SummaryConstructorsConstructorDescriptionBuilder(String entityPropertyName, ReferenceImportPolicy referenceImportPolicy) 
- 
Method SummaryModifier and TypeMethodDescriptionaddCustomPropertyMapping(String entityPropertyName, Function<CustomMappingContext, Object> customValueFunction) Adds a custom mapping for property.addPropertyMapping(PropertyMapping propertyMapping) Adds specified property mapping.addReferencePropertyMapping(String entityPropertyName, String dataFieldName, String lookupPropertyName, ReferenceImportPolicy policy) Creates and adds a property mapping for the reference property mapped by one data field.addSimplePropertyMapping(String entityPropertyName, String dataFieldName) Adds a mapping for specified simple property.build()All simple properties for which mappings are set will be used to lookup existing entity.protected voidvalidate()withDataFieldName(String dataFieldName) Sets a data field name.withLookupPropertyNames(String... lookupPropertyNames) Sets names of the properties by which an existing entity will be searchedwithLookupPropertyNames(List<String> lookupPropertyNames) Sets names of the properties by which an existing entity will be searched
- 
Constructor Details- 
Builder
 
- 
- 
Method Details- 
addSimplePropertyMappingpublic ReferenceMultiFieldPropertyMapping.Builder addSimplePropertyMapping(String entityPropertyName, String dataFieldName) Adds a mapping for specified simple property.- Parameters:
- entityPropertyName- entity property name
- dataFieldName- name of the field from input data that contains a raw value of property
- Returns:
- current instance of builder
 
- 
addCustomPropertyMappingpublic ReferenceMultiFieldPropertyMapping.Builder addCustomPropertyMapping(String entityPropertyName, Function<CustomMappingContext, Object> customValueFunction) Adds a custom mapping for property.- Parameters:
- entityPropertyName- entity property name
- customValueFunction- function to get value for the
- Returns:
- current instance of builder
 
- 
addReferencePropertyMappingpublic ReferenceMultiFieldPropertyMapping.Builder addReferencePropertyMapping(String entityPropertyName, String dataFieldName, String lookupPropertyName, ReferenceImportPolicy policy) Creates and adds a property mapping for the reference property mapped by one data field.- Parameters:
- entityPropertyName- reference property name
- dataFieldName- name of the field from input data that contains a raw value of lookup property
- lookupPropertyName- property name from the reference entity
- policy- reference import policy
- Returns:
- current instance of builder
- See Also:
 
- 
addPropertyMappingpublic ReferenceMultiFieldPropertyMapping.Builder addPropertyMapping(PropertyMapping propertyMapping) Adds specified property mapping. Property mapping can be:- Parameters:
- propertyMapping- property mapping
- Returns:
- current instance of builder
- See Also:
 
- 
withLookupPropertyNamespublic ReferenceMultiFieldPropertyMapping.Builder withLookupPropertyNames(List<String> lookupPropertyNames) Sets names of the properties by which an existing entity will be searched- Parameters:
- lookupPropertyNames- names of the properties by which an existing entity will be searched
- Returns:
- current instance of builder
 
- 
lookupByAllSimplePropertiesAll simple properties for which mappings are set will be used to lookup existing entity.- Returns:
- current instance of builder
 
- 
withLookupPropertyNamespublic ReferenceMultiFieldPropertyMapping.Builder withLookupPropertyNames(String... lookupPropertyNames) Sets names of the properties by which an existing entity will be searched- Parameters:
- lookupPropertyNames- names of the properties by which an existing entity will be searched
- Returns:
- current instance of builder
 
- 
withDataFieldNameSets a data field name.
 Note: actual for JSON/XML formats- Parameters:
- dataFieldName- field/tag name from the input data that has raw values of the reference entity properties
- Returns:
- current instance of builder
 
- 
build
- 
validateprotected void validate()
 
-