Class PojoMapper<MPBS extends MappingPartialBuildState>
java.lang.Object
org.hibernate.search.mapper.pojo.mapping.building.impl.PojoMapper<MPBS>
- All Implemented Interfaces:
Mapper<MPBS>
public class PojoMapper<MPBS extends MappingPartialBuildState>
extends Object
implements Mapper<MPBS>
-
Constructor Summary
ConstructorsConstructorDescriptionPojoMapper(MappingBuildContext buildContext, TypeMetadataContributorProvider<PojoTypeMetadataContributor> contributorProvider, PojoBootstrapIntrospector introspector, ContainerExtractorBinder extractorBinder, BridgeResolver bridgeResolver, BeanReference<? extends IdentifierBridge<Object>> providedIdentifierBridge, IdentityMappingMode containedEntityIdentityMappingMode, TenancyMode tenancyMode, ReindexOnUpdate defaultReindexOnUpdate, PojoMapperDelegate<MPBS> delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidClose any allocated resource.voidmapTypes(MappedIndexManagerFactory indexManagerFactory) Begin the creation of a mapping for all mapped types.Partially build the mapping based on theindexed typesadded so far.voidprepareMappedTypes(BackendsInfo backendsInfo) Prepare for the mapping of types and inform the engine of the names of all backends this mapper depends on.
-
Constructor Details
-
PojoMapper
public PojoMapper(MappingBuildContext buildContext, TypeMetadataContributorProvider<PojoTypeMetadataContributor> contributorProvider, PojoBootstrapIntrospector introspector, ContainerExtractorBinder extractorBinder, BridgeResolver bridgeResolver, BeanReference<? extends IdentifierBridge<Object>> providedIdentifierBridge, IdentityMappingMode containedEntityIdentityMappingMode, TenancyMode tenancyMode, ReindexOnUpdate defaultReindexOnUpdate, PojoMapperDelegate<MPBS> delegate)
-
-
Method Details
-
closeOnFailure
public void closeOnFailure()Description copied from interface:MapperClose any allocated resource.This method is called when an error occurs while starting up Hibernate Search. When this method is called, it is guaranteed to be the last call on the mapper.
- Specified by:
closeOnFailurein interfaceMapper<MPBS extends MappingPartialBuildState>
-
prepareMappedTypes
Description copied from interface:MapperPrepare for the mapping of types and inform the engine of the names of all backends this mapper depends on.Called exactly once just before
Mapper.mapTypes(MappedIndexManagerFactory).- Specified by:
prepareMappedTypesin interfaceMapper<MPBS extends MappingPartialBuildState>- Parameters:
backendsInfo- A collector of backend names and other info.
-
mapTypes
Description copied from interface:MapperBegin the creation of a mapping for all mapped types.Called exactly once just after
Mapper.prepareMappedTypes(BackendsInfo)and beforeMapper.prepareBuild().- Specified by:
mapTypesin interfaceMapper<MPBS extends MappingPartialBuildState>- Parameters:
indexManagerFactory- A factory for index managers, supporting all the backends declared inMapper.prepareMappedTypes(BackendsInfo).
-
prepareBuild
Description copied from interface:MapperPartially build the mapping based on theindexed typesadded so far.Called exactly once just after
Mapper.mapTypes(MappedIndexManagerFactory).- Specified by:
prepareBuildin interfaceMapper<MPBS extends MappingPartialBuildState>- Returns:
- The partially-built mapping.
- Throws:
MappingAbortedException- If something went wrong when preparing the mapping.
-