Package io.jmix.dynmodel.datatools
Class DynamicModelDataModelContributor
java.lang.Object
io.jmix.dynmodel.datatools.DynamicModelDataModelContributor
- All Implemented Interfaces:
DataModelContributor
Describes dynamic entities and dynamic attributes for the Data Tools data model.
This class references types of the optional jmix-datatools add-on, so it must not be a
component: it is created only by DynamicModelDatatoolsAutoConfiguration, which is
conditional on datatools being on the classpath.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected DynamicModelToolsprotected Metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable AttributeDescriptordescribeAttribute(MetaClass entity, MetaProperty property) Describes a dynamic attribute.@Nullable EntityDescriptordescribeEntity(MetaClass metaClass) Describes the physical placement of an entity.protected AttributeDescriptordescribePrimaryKey(MetaClass entity, MetaProperty property) Describes the identifier of a dynamic entity.Returns entities to add to the data model in addition to JPA entities.protected booleanisGeneratedEntity(MetaClass metaClass) Returns whether the meta-class is an entity generated from a dynamic model definition.protected StringjavaTypeOf(MetaProperty property) protected @Nullable AttributeDescriptor.RelationDescriptorrelationOf(MetaProperty property)
-
Field Details
-
CALCULATED_TEXT
- See Also:
-
metadata
-
dynamicModelTools
-
-
Constructor Details
-
DynamicModelDataModelContributor
public DynamicModelDataModelContributor()
-
-
Method Details
-
getAdditionalEntities
Description copied from interface:DataModelContributorReturns entities to add to the data model in addition to JPA entities. The result is added to what the other implementations return, so an entity already in the model is not added twice.- Specified by:
getAdditionalEntitiesin interfaceDataModelContributor- Returns:
- contributed entity meta-classes, empty if none
-
describeEntity
Description copied from interface:DataModelContributorDescribes the physical placement of an entity.- Specified by:
describeEntityin interfaceDataModelContributor- Parameters:
metaClass- entity meta-class- Returns:
- descriptor, or
nullif this contributor does not handle the entity
-
describeAttribute
Describes a dynamic attribute. The helper properties generated for a collection are included: they are real columns of the child's table.- Specified by:
describeAttributein interfaceDataModelContributor- Parameters:
entity- owner entity meta-classproperty- property to describe- Returns:
- descriptor, or
nullif this contributor does not handle the property
-
describePrimaryKey
Describes the identifier of a dynamic entity. It is declared onDynamicEntityinstead of being generated, so it is not a dynamic property, but it is still a column of the entity's table. -
isGeneratedEntity
Returns whether the meta-class is an entity generated from a dynamic model definition.DynamicEntityitself is registered too, but it is only the base class and has no table. -
javaTypeOf
-
relationOf
-