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
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseOnFailure()Close any allocated resource.voidmapTypes(MappedIndexManagerFactory indexManagerFactory)Begin the creation of a mapping for all mapped types.MPBSprepareBuild()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 Detail
-
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 Detail
-
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
public void prepareMappedTypes(BackendsInfo backendsInfo)
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
public void mapTypes(MappedIndexManagerFactory indexManagerFactory)
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
public MPBS prepareBuild() throws MappingAbortedException
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- When aborting the mapping due tocollectedfailures.
-
-