Class ReferenceMultiFieldPropertyMapping
java.lang.Object
io.jmix.dataimport.configuration.mapping.ReferenceMultiFieldPropertyMapping
- All Implemented Interfaces:
PropertyMapping
Mapping for reference property that is mapped by multiple data fields from the input data.
This mapping allows to set:
- Entity property name: name of the reference property
- Data field name (optional): name of the data field that contains a raw values of properties for the reference entity. Note: this field is helpful for JSON (if there is a separate object for reference property) or XML (if there is a separate tag for reference property).
- Reference import policy:
ReferenceImportPolicy
- Lookup property names: property names by which existing entity should be searched.
- Reference property mappings: list of
PropertyMapping
for reference entity properties.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected ReferenceImportPolicy
protected List<PropertyMapping>
-
Method Summary
Modifier and TypeMethodDescriptionbuilder
(String entityPropertyName, ReferenceImportPolicy policy) Gets a data field name.Gets an entity property name.setDataFieldName
(String dataFieldName) setLookupPropertyNames
(List<String> lookupPropertyNames) setReferencePropertyMappings
(List<PropertyMapping> referencePropertyMappings)
-
Field Details
-
entityPropertyName
-
dataFieldName
-
referencePropertyMappings
-
lookupPropertyNames
-
referenceImportPolicy
-
-
Method Details
-
getDataFieldName
Description copied from interface:PropertyMapping
Gets a data field name.- Specified by:
getDataFieldName
in interfacePropertyMapping
- Returns:
- data field name
-
setDataFieldName
-
getReferencePropertyMappings
-
setReferencePropertyMappings
public ReferenceMultiFieldPropertyMapping setReferencePropertyMappings(List<PropertyMapping> referencePropertyMappings) -
getLookupPropertyNames
-
setLookupPropertyNames
-
getReferenceImportPolicy
-
getEntityPropertyName
Description copied from interface:PropertyMapping
Gets an entity property name.- Specified by:
getEntityPropertyName
in interfacePropertyMapping
- Returns:
- entity property name
-
builder
public static ReferenceMultiFieldPropertyMapping.Builder builder(String entityPropertyName, ReferenceImportPolicy policy)
-