Class EntityExtractorImpl
java.lang.Object
io.jmix.dataimport.extractor.entity.impl.EntityExtractorImpl
- All Implemented Interfaces:
EntityExtractor
@Component("datimp_EntityExtractor")
public class EntityExtractorImpl
extends Object
implements EntityExtractor
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractEntities
(ImportConfiguration importConfiguration, ImportedData importedData) Creates an entity for eachImportedDataItem
from the specified imported data.extractEntities
(ImportConfiguration importConfiguration, List<ImportedDataItem> importedDataItems) Creates an entity for eachImportedDataItem
from the specified list.extractEntity
(ImportConfiguration importConfiguration, ImportedDataItem dataItem) Creates an entity usingImportConfiguration.entityClass
and populates the properties for which mappings are set in import configuration.protected void
fillCreatedReferences
(EntityInfo entityInfo, Map<PropertyMapping, List<Object>> createdReferencesByMapping)
-
Field Details
-
metadata
-
entityPropertiesPopulator
-
-
Constructor Details
-
EntityExtractorImpl
public EntityExtractorImpl()
-
-
Method Details
-
extractEntity
public EntityExtractionResult extractEntity(ImportConfiguration importConfiguration, ImportedDataItem dataItem) Description copied from interface:EntityExtractor
Creates an entity usingImportConfiguration.entityClass
and populates the properties for which mappings are set in import configuration. Values for the properties are got by processing the raw values fromImportedDataItem
.- Specified by:
extractEntity
in interfaceEntityExtractor
- Parameters:
importConfiguration
- import configurationdataItem
- source of raw values for the entity- Returns:
- extraction result with entity which properties are populated by values
-
extractEntities
public List<EntityExtractionResult> extractEntities(ImportConfiguration importConfiguration, ImportedData importedData) Description copied from interface:EntityExtractor
Creates an entity for eachImportedDataItem
from the specified imported data.- Specified by:
extractEntities
in interfaceEntityExtractor
- Parameters:
importConfiguration
- import configurationimportedData
- imported data- Returns:
- extraction results for each extracted entity
-
extractEntities
public List<EntityExtractionResult> extractEntities(ImportConfiguration importConfiguration, List<ImportedDataItem> importedDataItems) Description copied from interface:EntityExtractor
Creates an entity for eachImportedDataItem
from the specified list.- Specified by:
extractEntities
in interfaceEntityExtractor
- Parameters:
importConfiguration
- import configurationimportedDataItems
- imported data items- Returns:
- extraction results for each extracted entity
-
fillCreatedReferences
protected void fillCreatedReferences(EntityInfo entityInfo, Map<PropertyMapping, List<Object>> createdReferencesByMapping)
-