Package io.jmix.dynmodel.search
Class DynamicModelSearchInfoImpl
java.lang.Object
io.jmix.dynmodel.search.DynamicModelSearchInfoImpl
- All Implemented Interfaces:
DynamicModelSearchInfo
Answers from the index configuration of the pinned or current metadata generation: a dynamic attribute that the
configuration maps, but that this add-on did not contribute, is mapped by the application's own index definition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DynamicModelToolsprotected IndexConfigurationManagerprotected Metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisIndexedByApplicationDefinition(String entityName, String attributeName) Whether Search indexes the attribute because of an index definition declared by the application (@JmixEntitySearchIndex), rather than because it is marked searchable in the dynamic model.
-
Field Details
-
metadata
-
dynamicModelTools
-
indexConfigurationManager
-
-
Constructor Details
-
DynamicModelSearchInfoImpl
public DynamicModelSearchInfoImpl()
-
-
Method Details
-
isIndexedByApplicationDefinition
@NullMarked public boolean isIndexedByApplicationDefinition(String entityName, String attributeName) Description copied from interface:DynamicModelSearchInfoWhether Search indexes the attribute because of an index definition declared by the application (@JmixEntitySearchIndex), rather than because it is marked searchable in the dynamic model. Such an attribute is indexed whatever its searchable flag says: most commonly the definition maps its properties with the wildcard"*", which resolves against the metadata generation and so covers every dynamic attribute of the entity.An attribute the published model does not know yet — one just added in the Admin UI — is reported as indexed when the application's definition already pulls in other dynamic attributes of the same entity, because the same definition will cover the new attribute once the model is applied.
- Specified by:
isIndexedByApplicationDefinitionin interfaceDynamicModelSearchInfo- Parameters:
entityName- entity nameattributeName- attribute name- Returns:
- whether the application's own index definition indexes the attribute
-
getAttributesIndexedByApplicationDefinition
-