Class EntityPropertiesPopulatorImpl
java.lang.Object
io.jmix.dataimport.property.populator.impl.EntityPropertiesPopulatorImpl
- All Implemented Interfaces:
- EntityPropertiesPopulator
@Component("datimp_EntityPropertiesPopulator")
public class EntityPropertiesPopulatorImpl
extends Object
implements EntityPropertiesPopulator
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddCreatedReference(Object entity, List<CreatedReference> createdReferences, ReferenceMultiFieldPropertyMapping propertyMapping) protected voidfillCreatedReferences(Object entity, ReferenceMultiFieldPropertyMapping referenceMultiFieldPropertyMapping, List<CreatedReference> createdReferences) protected List<CreatedReference>getCreatedReferences(Object entity, ImportConfiguration configuration) protected CreatedReferencegetCreatedReferences(Object entityToPopulate, Object referenceValue, ReferenceMultiFieldPropertyMapping propertyMapping) populateProperties(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.protected voidpopulateProperty(Object entity, PropertyMapping propertyMapping, ImportConfiguration importConfiguration, RawValuesSource rawValuesSource, Map<PropertyMapping, List<Object>> createdReferences) 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.
- 
Field Details- 
entityStates
- 
propertyValueProvider
 
- 
- 
Constructor Details- 
EntityPropertiesPopulatorImplpublic EntityPropertiesPopulatorImpl()
 
- 
- 
Method Details- 
populatePropertiespublic EntityInfo populateProperties(Object entity, ImportConfiguration importConfiguration, ImportedDataItem dataItem) Description copied from interface:EntityPropertiesPopulatorPopulates the entity properties for which mappings are set in the import configuration by values.- Specified by:
- populatePropertiesin interface- EntityPropertiesPopulator
- Parameters:
- entity- entity which properties are populated by values
- importConfiguration- import configuration
- dataItem- source of raw values of properties
- Returns:
- object that contains entity populated by property values and info about created references
 
- 
populatePropertiespublic EntityInfo populateProperties(Object entity, ImportConfiguration importConfiguration, ImportedDataItem dataItem, @Nullable Map<PropertyMapping, List<Object>> createdReferences) Description copied from interface:EntityPropertiesPopulatorPopulates 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.- Specified by:
- populatePropertiesin interface- EntityPropertiesPopulator
- Parameters:
- entity- entity which properties are populated by values
- importConfiguration- import configuration
- dataItem- source of raw values of properties
- createdReferences- map that contains already created reference entity by property mappings
- Returns:
- object that contains entity populated by property values and info about created references
 
- 
populatePropertyprotected void populateProperty(Object entity, PropertyMapping propertyMapping, ImportConfiguration importConfiguration, RawValuesSource rawValuesSource, @Nullable Map<PropertyMapping, List<Object>> createdReferences) 
- 
populateReferencepublic Object populateReference(Object entity, ReferenceMultiFieldPropertyMapping referenceMapping, ImportConfiguration importConfiguration, RawValuesSource rawValuesSource) Description copied from interface:EntityPropertiesPopulatorPopulates the reference entity properties for which mappings are set in the reference mapping by values.- Specified by:
- populateReferencein interface- EntityPropertiesPopulator
- Parameters:
- entity- reference entity which properties are populated by values
- referenceMapping- reference mapping
- importConfiguration- import configuration
- rawValuesSource- source of raw values of properties
- Returns:
- reference entity with populated by property values
 
- 
getCreatedReferencesprotected List<CreatedReference> getCreatedReferences(Object entity, ImportConfiguration configuration) 
- 
fillCreatedReferencesprotected void fillCreatedReferences(Object entity, ReferenceMultiFieldPropertyMapping referenceMultiFieldPropertyMapping, List<CreatedReference> createdReferences) 
- 
addCreatedReferenceprotected void addCreatedReference(Object entity, List<CreatedReference> createdReferences, ReferenceMultiFieldPropertyMapping propertyMapping) 
- 
getCreatedReferencesprotected CreatedReference getCreatedReferences(Object entityToPopulate, Object referenceValue, ReferenceMultiFieldPropertyMapping propertyMapping) 
 
-