Class DynamicModelSearchInfoImpl

java.lang.Object
io.jmix.dynmodel.search.DynamicModelSearchInfoImpl
All Implemented Interfaces:
DynamicModelSearchInfo

public class DynamicModelSearchInfoImpl extends Object implements 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 Details

  • Constructor Details

    • DynamicModelSearchInfoImpl

      public DynamicModelSearchInfoImpl()
  • Method Details

    • isIndexedByApplicationDefinition

      @NullMarked public boolean isIndexedByApplicationDefinition(String entityName, String attributeName)
      Description copied from interface: DynamicModelSearchInfo
      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. 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:
      isIndexedByApplicationDefinition in interface DynamicModelSearchInfo
      Parameters:
      entityName - entity name
      attributeName - attribute name
      Returns:
      whether the application's own index definition indexes the attribute
    • getAttributesIndexedByApplicationDefinition

      @NullMarked protected Set<String> getAttributesIndexedByApplicationDefinition(MetaClass metaClass)