Package io.jmix.core.impl.importexport
Interface EntityImportPlanJsonBuilder
- All Known Implementing Classes:
EntityImportPlanJsonBuilderImpl
public interface EntityImportPlanJsonBuilder
Class that is used for building an
EntityImportPlan
based on the JSON object that represents an entity.-
Method Summary
Modifier and TypeMethodDescriptionbuildFromJson
(String json, MetaClass metaClass) Builds anEntityImportPlan
that contains all fields that are presented in the JSON object.
-
Method Details
-
buildFromJson
Builds anEntityImportPlan
that contains all fields that are presented in the JSON object.All references will be added to the plan as a
ReferenceImportBehaviour.ERROR_ON_MISSING
behavior. All references that have a @Composition annotation will be added to the plan with a property that has aEntityImportPlanProperty
. This means that compositions will be persisted during the import. Absent collection items will be removed from the database.For many-to-many association items corresponding entities will be searched in the database. If any of them is missing, an error will be thrown. Absent collection members will be excluded from the many-to-many association.
- Parameters:
json
- a string that represents a JSON objectmetaClass
- a MetaClass of the entity- Returns:
- an EntityImportPlan
-