Class AnnotationMappingConfigurationContextImpl
java.lang.Object
org.hibernate.search.mapper.pojo.mapping.definition.annotation.impl.AnnotationMappingConfigurationContextImpl
- All Implemented Interfaces:
AnnotationMappingConfigurationContext,PojoMappingConfigurationContributor
public class AnnotationMappingConfigurationContextImpl
extends Object
implements AnnotationMappingConfigurationContext, PojoMappingConfigurationContributor
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationMappingConfigurationContextImpl(PojoBootstrapIntrospector introspector, MapperHints mapperHints) -
Method Summary
Modifier and TypeMethodDescriptionaddJandexIndex(org.jboss.jandex.IndexView jandexIndex) buildMissingDiscoveredJandexIndexes(boolean enabled) voidconfigure(MappingBuildContext buildContext, PojoMappingConfigurationContext configurationContext, MappingConfigurationCollector<PojoTypeMetadataContributor> collector) discoverAnnotatedTypesFromRootMappingAnnotations(boolean enabled) discoverAnnotationsFromReferencedTypes(boolean enabled) discoverJandexIndexesFromAddedTypes(boolean enabled)
-
Constructor Details
-
AnnotationMappingConfigurationContextImpl
public AnnotationMappingConfigurationContextImpl(PojoBootstrapIntrospector introspector, MapperHints mapperHints)
-
-
Method Details
-
discoverAnnotatedTypesFromRootMappingAnnotations
public AnnotationMappingConfigurationContext discoverAnnotatedTypesFromRootMappingAnnotations(boolean enabled) - Specified by:
discoverAnnotatedTypesFromRootMappingAnnotationsin interfaceAnnotationMappingConfigurationContext- Parameters:
enabled-trueif Hibernate Search should automatically discover annotated types present in the Jandex index that are also annotated withroot mapping annotations. When enabled, if an annotation meta-annotated withRootMappingis found in the Jandex index, and a type annotated with that annotation (e.g.SearchEntityorProjectionConstructor) is found in the Jandex index, then that type will automatically be scanned for mapping annotations, even if the type wasn'tadded explicitly.falseif that discovery should be disabled.- Returns:
this, for method chaining.- See Also:
-
discoverJandexIndexesFromAddedTypes
- Specified by:
discoverJandexIndexesFromAddedTypesin interfaceAnnotationMappingConfigurationContext- Parameters:
enabled-trueif Hibernate Search should automatically discover Jandex Indexes from types added throughAnnotationMappingConfigurationContext.add(Class)orAnnotationMappingConfigurationContext.add(Set).falseif that discovery should be disabled.- Returns:
this, for method chaining.- See Also:
-
buildMissingDiscoveredJandexIndexes
- Specified by:
buildMissingDiscoveredJandexIndexesin interfaceAnnotationMappingConfigurationContext- Parameters:
enabled-trueif Hibernate Search should automatically build Jandex Indexes whendiscovering Jandex indexes.falseif Hibernate Search should ignore JARs without a Jandex index.- Returns:
this, for method chaining.- See Also:
-
discoverAnnotationsFromReferencedTypes
public AnnotationMappingConfigurationContext discoverAnnotationsFromReferencedTypes(boolean enabled) - Specified by:
discoverAnnotationsFromReferencedTypesin interfaceAnnotationMappingConfigurationContext- Parameters:
enabled-trueif Hibernate Search should automatically process mapping annotations on types referenced in the mapping of other types (e.g. the target of anIndexedEmbedded, ...).falseif that discovery should be disabled.- Returns:
this, for method chaining.
-
add
- Specified by:
addin interfaceAnnotationMappingConfigurationContext- Parameters:
annotatedType- A type to scan for annotations.- Returns:
this, for method chaining.
-
add
- Specified by:
addin interfaceAnnotationMappingConfigurationContext- Parameters:
annotatedTypes- A set of types to scan for annotations.- Returns:
this, for method chaining.
-
addJandexIndex
- Specified by:
addJandexIndexin interfaceAnnotationMappingConfigurationContext- Parameters:
jandexIndex- A Jandex index to use whenAnnotationMappingConfigurationContext.discoverAnnotatedTypesFromRootMappingAnnotations(boolean)discovering annotated types that are also annotated with root mapping annotations}.- Returns:
this, for method chaining.- See Also:
-
configure
public void configure(MappingBuildContext buildContext, PojoMappingConfigurationContext configurationContext, MappingConfigurationCollector<PojoTypeMetadataContributor> collector) - Specified by:
configurein interfacePojoMappingConfigurationContributor
-