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
Constructors Constructor Description AnnotationMappingConfigurationContextImpl(PojoBootstrapIntrospector introspector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationMappingConfigurationContextadd(Class<?> annotatedType)AnnotationMappingConfigurationContextadd(Set<Class<?>> annotatedTypes)AnnotationMappingConfigurationContextaddJandexIndex(org.jboss.jandex.IndexView jandexIndex)AnnotationMappingConfigurationContextbuildMissingDiscoveredJandexIndexes(boolean enabled)voidconfigure(MappingBuildContext buildContext, PojoMappingConfigurationContext configurationContext, MappingConfigurationCollector<PojoTypeMetadataContributor> collector)AnnotationMappingConfigurationContextdiscoverAnnotatedTypesFromRootMappingAnnotations(boolean enabled)AnnotationMappingConfigurationContextdiscoverAnnotationsFromReferencedTypes(boolean enabled)AnnotationMappingConfigurationContextdiscoverJandexIndexesFromAddedTypes(boolean enabled)
-
-
-
Constructor Detail
-
AnnotationMappingConfigurationContextImpl
public AnnotationMappingConfigurationContextImpl(PojoBootstrapIntrospector introspector)
-
-
Method Detail
-
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.ProjectionConstructor) 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:
RootMapping,ProjectionConstructor,AnnotationMappingConfigurationContext.addJandexIndex(IndexView),AnnotationMappingConfigurationContext.discoverJandexIndexesFromAddedTypes(boolean)
-
discoverJandexIndexesFromAddedTypes
public AnnotationMappingConfigurationContext discoverJandexIndexesFromAddedTypes(boolean enabled)
- 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:
AnnotationMappingConfigurationContext.addJandexIndex(IndexView),AnnotationMappingConfigurationContext.buildMissingDiscoveredJandexIndexes(boolean)
-
buildMissingDiscoveredJandexIndexes
public AnnotationMappingConfigurationContext buildMissingDiscoveredJandexIndexes(boolean enabled)
- 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:
AnnotationMappingConfigurationContext.discoverJandexIndexesFromAddedTypes(boolean),AnnotationMappingConfigurationContext.addJandexIndex(IndexView)
-
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
public AnnotationMappingConfigurationContext add(Class<?> annotatedType)
- Specified by:
addin interfaceAnnotationMappingConfigurationContext- Parameters:
annotatedType- A type to scan for annotations.- Returns:
this, for method chaining.
-
add
public AnnotationMappingConfigurationContext add(Set<Class<?>> annotatedTypes)
- Specified by:
addin interfaceAnnotationMappingConfigurationContext- Parameters:
annotatedTypes- A set of types to scan for annotations.- Returns:
this, for method chaining.
-
addJandexIndex
public AnnotationMappingConfigurationContext addJandexIndex(org.jboss.jandex.IndexView jandexIndex)
- 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:
AnnotationMappingConfigurationContext.discoverAnnotatedTypesFromRootMappingAnnotations(boolean),AnnotationMappingConfigurationContext.discoverJandexIndexesFromAddedTypes(boolean)
-
configure
public void configure(MappingBuildContext buildContext, PojoMappingConfigurationContext configurationContext, MappingConfigurationCollector<PojoTypeMetadataContributor> collector)
- Specified by:
configurein interfacePojoMappingConfigurationContributor
-
-