Class IndexConfigurationManager

java.lang.Object
io.jmix.search.index.mapping.IndexConfigurationManager

@Component("search_IndexConfigurationManager") public class IndexConfigurationManager extends Object
  • Field Details

    • registry

      protected final io.jmix.search.index.mapping.IndexConfigurationManager.Registry registry
  • Constructor Details

  • Method Details

    • getAllIndexConfigurations

      public Collection<IndexConfiguration> getAllIndexConfigurations()
      Gets all IndexConfiguration registered in application
      Returns:
      all IndexConfiguration
    • getIndexConfigurationByEntityName

      public IndexConfiguration getIndexConfigurationByEntityName(String entityName)
      Gets IndexConfiguration registered for provided entity name. Throws IllegalArgumentException if there is no configuration for provided entity name.
      Parameters:
      entityName - entity name.
      Returns:
      IndexConfiguration
    • getIndexConfigurationByEntityNameOpt

      public Optional<IndexConfiguration> getIndexConfigurationByEntityNameOpt(String entityName)
      Gets optional IndexConfiguration registered for provided entity name.
      Parameters:
      entityName - entity name
      Returns:
      optional IndexConfiguration
    • getIndexConfigurationByIndexName

      public IndexConfiguration getIndexConfigurationByIndexName(String indexName)
      Gets IndexConfiguration registered for provided index name. Throws IllegalArgumentException if there is no configuration for provided index name.
      Parameters:
      indexName - index name
      Returns:
      IndexConfiguration
    • getIndexConfigurationByIndexNameOpt

      public Optional<IndexConfiguration> getIndexConfigurationByIndexNameOpt(String indexName)
      Gets optional IndexConfiguration registered for provided index name.
      Parameters:
      indexName - index name
      Returns:
      optional IndexConfiguration
    • getAllIndexedEntities

      public Collection<String> getAllIndexedEntities()
    • isDirectlyIndexed

      public boolean isDirectlyIndexed(String entityName)
      Checks if provided entity is declared to be indexed directly (not as a part of another entity).
      Parameters:
      entityName - entity name
      Returns:
      true if entity is indexed, false otherwise
    • isAffectedEntityClass

      public boolean isAffectedEntityClass(Class<?> entityClass)
      Checks if provided entity is involved in index process directly or as a part of another entity.
      Parameters:
      entityClass - entity java class
      Returns:
      true if entity is involved in index process, false otherwise
    • getLocalPropertyNamesAffectedByUpdate

      public Set<String> getLocalPropertyNamesAffectedByUpdate(Class<?> entityClass)
      Gets local property names of provided entity involved into index update process
      Parameters:
      entityClass - entity class
      Returns:
      set of property names
    • getDependenciesMetaDataForUpdate

      public Map<MetaClass,Set<MetaPropertyPath>> getDependenciesMetaDataForUpdate(Class<?> entityClass, Set<String> changedProperties)
      Gets metadata of entities dependent on updated main entity and its changed properties.
      Parameters:
      entityClass - java class of main entity
      changedProperties - changed property of main entity
      Returns:
      dependent entities grouped by their MetaClass. For every meta class group there are set of properties representing dependency-to-main references
    • getDependenciesMetaDataForDelete

      public Map<MetaClass,Set<MetaPropertyPath>> getDependenciesMetaDataForDelete(Class<?> deletedEntityClass)
      Gets metadata of entities dependent on deleted main entity.
      Parameters:
      deletedEntityClass - java class of main entity
      Returns:
      dependent entities grouped by their MetaClass. For every meta class group there are set of properties representing dependency-to-main references