Interface EntityPropertiesPopulator
- All Known Implementing Classes:
EntityPropertiesPopulatorImpl
public interface EntityPropertiesPopulator
API to populate the entity by property values using property mappings and raw values source.
-
Method Summary
Modifier and TypeMethodDescriptionpopulateProperties
(Object entity, ImportConfiguration importConfiguration, ImportedDataItem dataItem) Populates the entity properties for which mappings are set in the import configuration by values.populateProperties
(Object entity, ImportConfiguration importConfiguration, ImportedDataItem dataItem, Map<PropertyMapping, List<Object>> createdReferences) Populates the entity properties for which mappings are set in the import configuration by values.populateReference
(Object entity, ReferenceMultiFieldPropertyMapping referenceMapping, ImportConfiguration importConfiguration, RawValuesSource rawValuesSource) Populates the reference entity properties for which mappings are set in the reference mapping by values.
-
Method Details
-
populateProperties
EntityInfo populateProperties(Object entity, ImportConfiguration importConfiguration, ImportedDataItem dataItem) Populates the entity properties for which mappings are set in the import configuration by values.- Parameters:
entity
- entity which properties are populated by valuesimportConfiguration
- import configurationdataItem
- source of raw values of properties- Returns:
- object that contains entity populated by property values and info about created references
-
populateProperties
EntityInfo populateProperties(Object entity, ImportConfiguration importConfiguration, ImportedDataItem dataItem, @Nullable Map<PropertyMapping, List<Object>> createdReferences) Populates the entity properties for which mappings are set in the import configuration by values. For import policies that require loading of existing reference: Many-to-one reference is created if an existing entity does not exist in the database and is not presented in the created references.- Parameters:
entity
- entity which properties are populated by valuesimportConfiguration
- import configurationdataItem
- source of raw values of propertiescreatedReferences
- map that contains already created reference entity by property mappings- Returns:
- object that contains entity populated by property values and info about created references
-
populateReference
Object populateReference(Object entity, ReferenceMultiFieldPropertyMapping referenceMapping, ImportConfiguration importConfiguration, RawValuesSource rawValuesSource) Populates the reference entity properties for which mappings are set in the reference mapping by values.- Parameters:
entity
- reference entity which properties are populated by valuesreferenceMapping
- reference mappingimportConfiguration
- import configurationrawValuesSource
- source of raw values of properties- Returns:
- reference entity with populated by property values
-