Package io.jmix.search.index.mapping
Class IndexConfigurationManager
java.lang.Object
io.jmix.search.index.mapping.IndexConfigurationManager
@Component("search_IndexConfigurationManager")
public class IndexConfigurationManager
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.jmix.search.index.mapping.IndexConfigurationManager.Registry -
Constructor Summary
ConstructorsConstructorDescriptionIndexConfigurationManager(JmixModulesClasspathScanner classpathScanner, AnnotatedIndexDefinitionProcessor indexDefinitionProcessor, InstanceNameProvider instanceNameProvider, IndexDefinitionDetector indexDefinitionDetector, MetadataTools metadataTools) -
Method Summary
Modifier and TypeMethodDescriptionGets allIndexConfigurationregistered in applicationgetDependenciesMetaDataForDelete(Class<?> deletedEntityClass) Gets metadata of entities dependent on deleted main entity.getDependenciesMetaDataForUpdate(Class<?> entityClass, Set<String> changedProperties) Gets metadata of entities dependent on updated main entity and its changed properties.getIndexConfigurationByEntityName(String entityName) GetsIndexConfigurationregistered for provided entity name.getIndexConfigurationByEntityNameOpt(String entityName) Gets optionalIndexConfigurationregistered for provided entity name.getIndexConfigurationByIndexName(String indexName) GetsIndexConfigurationregistered for provided index name.getIndexConfigurationByIndexNameOpt(String indexName) Gets optionalIndexConfigurationregistered for provided index name.getLocalPropertyNamesAffectedByUpdate(Class<?> entityClass) Gets local property names of provided entity involved into index update processbooleanisAffectedEntityClass(Class<?> entityClass) Checks if provided entity is involved in index process directly or as a part of another entity.booleanisDirectlyIndexed(String entityName) Checks if provided entity is declared to be indexed directly (not as a part of another entity).
-
Field Details
-
registry
protected final io.jmix.search.index.mapping.IndexConfigurationManager.Registry registry
-
-
Constructor Details
-
IndexConfigurationManager
@Autowired public IndexConfigurationManager(JmixModulesClasspathScanner classpathScanner, AnnotatedIndexDefinitionProcessor indexDefinitionProcessor, InstanceNameProvider instanceNameProvider, IndexDefinitionDetector indexDefinitionDetector, MetadataTools metadataTools)
-
-
Method Details
-
getAllIndexConfigurations
Gets allIndexConfigurationregistered in application- Returns:
- all
IndexConfiguration
-
getIndexConfigurationByEntityName
GetsIndexConfigurationregistered for provided entity name. ThrowsIllegalArgumentExceptionif there is no configuration for provided entity name.- Parameters:
entityName- entity name.- Returns:
IndexConfiguration
-
getIndexConfigurationByEntityNameOpt
Gets optionalIndexConfigurationregistered for provided entity name.- Parameters:
entityName- entity name- Returns:
- optional
IndexConfiguration
-
getIndexConfigurationByIndexName
GetsIndexConfigurationregistered for provided index name. ThrowsIllegalArgumentExceptionif there is no configuration for provided index name.- Parameters:
indexName- index name- Returns:
IndexConfiguration
-
getIndexConfigurationByIndexNameOpt
Gets optionalIndexConfigurationregistered for provided index name.- Parameters:
indexName- index name- Returns:
- optional
IndexConfiguration
-
getAllIndexedEntities
-
isDirectlyIndexed
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
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
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 entitychangedProperties- 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
-