Package org.hibernate.jpa.boot.internal
Class EntityManagerFactoryBuilderImpl
java.lang.Object
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl
- All Implemented Interfaces:
EntityManagerFactoryBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringNames aIntegratorProviderstatic final StringNames aMetadataBuilderContributorstatic final StringNames aStrategyRegistrationProviderListstatic final StringNames aTypeContributorList -
Constructor Summary
ConstructorsConstructorDescriptionEntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnit, Map<String, Object> integrationSettings) EntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnit, Map<String, Object> integrationSettings, ClassLoader providedClassLoader) EntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnitDescriptor, Map<String, Object> integration, Consumer<MergedSettings> mergedSettingsBaseline) For tests onlyEntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnit, Map<String, Object> integrationSettings, ClassLoaderService providedClassLoaderService) -
Method Summary
Modifier and TypeMethodDescriptionbuild()BuildEntityManagerFactoryinstancevoidcancel()Cancel the building processing.voidPerform an explicit schema generation (rather than an "auto" one) based on theprotected EnhancementContextgetEnhancementContext(boolean dirtyTrackingEnabled, boolean lazyInitializationEnabled, boolean associationManagementEnabled) Builds the context to be used in runtime bytecode enhancementIntended for internal testing only...protected StandardServiceRegistryExposed to extensions: see Hibernate Reactiveprotected StandardServiceRegistryBuilderExtension point for subclasses.metadata()Used by extensions : Hibernate Reactiveprotected SessionFactoryBuilderwithDataSource(DataSource dataSource) Allows passing in a DataSource (delayed from constructing the builder, AKA phase 2) to be used in building the EntityManagerFactorywithValidatorFactory(Object validatorFactory) Allows passing in a Java EE ValidatorFactory (delayed from constructing the builder, AKA phase 2) to be used in building the EntityManagerFactory
-
Field Details
-
INTEGRATOR_PROVIDER
Names aIntegratorProvider- See Also:
-
STRATEGY_REGISTRATION_PROVIDERS
Names aStrategyRegistrationProviderList- See Also:
-
TYPE_CONTRIBUTORS
Names aTypeContributorList- See Also:
-
METADATA_BUILDER_CONTRIBUTOR
Names aMetadataBuilderContributor- See Also:
-
-
Constructor Details
-
EntityManagerFactoryBuilderImpl
public EntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnit, Map<String, Object> integrationSettings) -
EntityManagerFactoryBuilderImpl
public EntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnit, Map<String, Object> integrationSettings, ClassLoader providedClassLoader) -
EntityManagerFactoryBuilderImpl
public EntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnit, Map<String, Object> integrationSettings, ClassLoaderService providedClassLoaderService) -
EntityManagerFactoryBuilderImpl
@Internal public EntityManagerFactoryBuilderImpl(PersistenceUnitDescriptor persistenceUnitDescriptor, Map<String, Object> integration, Consumer<MergedSettings> mergedSettingsBaseline) For tests only
-
-
Method Details
-
getStandardServiceRegistryBuilder
protected StandardServiceRegistryBuilder getStandardServiceRegistryBuilder(BootstrapServiceRegistry bsr) Extension point for subclasses. Used by Hibernate Reactive -
getConfigurationValues
-
getEnhancementContext
protected EnhancementContext getEnhancementContext(boolean dirtyTrackingEnabled, boolean lazyInitializationEnabled, boolean associationManagementEnabled) Builds the context to be used in runtime bytecode enhancement- Parameters:
dirtyTrackingEnabled- To enable dirty tracking featurelazyInitializationEnabled- To enable lazy initialization featureassociationManagementEnabled- To enable association management feature- Returns:
- An enhancement context for classes managed by this EM
-
getMetadata
Intended for internal testing only... -
getManagedResources
- Specified by:
getManagedResourcesin interfaceEntityManagerFactoryBuilder
-
metadata
Used by extensions : Hibernate Reactive- Specified by:
metadatain interfaceEntityManagerFactoryBuilder
-
withValidatorFactory
Description copied from interface:EntityManagerFactoryBuilderAllows passing in a Java EE ValidatorFactory (delayed from constructing the builder, AKA phase 2) to be used in building the EntityManagerFactory- Specified by:
withValidatorFactoryin interfaceEntityManagerFactoryBuilder- Parameters:
validatorFactory- The ValidatorFactory- Returns:
this, for method chaining
-
withDataSource
Description copied from interface:EntityManagerFactoryBuilderAllows passing in a DataSource (delayed from constructing the builder, AKA phase 2) to be used in building the EntityManagerFactory- Specified by:
withDataSourcein interfaceEntityManagerFactoryBuilder- Parameters:
dataSource- The DataSource to use- Returns:
this, for method chaining
-
cancel
public void cancel()Description copied from interface:EntityManagerFactoryBuilderCancel the building processing. This is used to signal the builder to release any resources in the case of something having gone wrong during the bootstrap process- Specified by:
cancelin interfaceEntityManagerFactoryBuilder
-
generateSchema
public void generateSchema()Description copied from interface:EntityManagerFactoryBuilderPerform an explicit schema generation (rather than an "auto" one) based on the- Specified by:
generateSchemain interfaceEntityManagerFactoryBuilder
-
build
Description copied from interface:EntityManagerFactoryBuilderBuildEntityManagerFactoryinstance- Specified by:
buildin interfaceEntityManagerFactoryBuilder- Returns:
- The built
EntityManagerFactory
-
populateSessionFactoryBuilder
-
getStandardServiceRegistry
Exposed to extensions: see Hibernate Reactive
-