public class SquashEntityManagerFactoryBuilderImpl
extends org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl
Porting the former SquashSessionFactoryBean to the equivalent as a EntityManagerFactoryBuilder. Legacy comments
are included below. Note that some elements of the configuration had to be set there because
we couldn't access the configuration from RepositoryConfig.
Also note that it is critical that the hibernate configuration is properly set before the session factory is created by the code in the super class : we cannot prostprocess the session factory afterward. This is why this class exists.
Specialization of LocalSessionFactoryBean which registers a "group_concat" hsl function for any known dialect.
Note : I would have inlined this class in #sessionFactory() if I could. But Spring enhances RepositoryConfig in a way that the product of #sessionFactory() is expected to have a null-arg constructor. Yet, the default constructor of an inner / anonymous class is a 1-param ctor which receives the outer instance. This leads to arcane reflection errors (NoSuchMethodException "There is no no-arg ctor") in lines that seem completely unrelatedextendConfiguration(Configuration),
configureFunctionSupport(String)org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.CacheRegionDefinition, org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.JaccDefinition, org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.MetadataSources, org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.ServiceRegistryCloser| Constructor and Description |
|---|
SquashEntityManagerFactoryBuilderImpl(org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor persistenceUnit,
Map integrationSettings) |
SquashEntityManagerFactoryBuilderImpl(org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor persistenceUnit,
Map integrationSettings,
ClassLoader providedClassLoader) |
| Modifier and Type | Method and Description |
|---|---|
org.hibernate.cfg.Configuration |
buildHibernateConfiguration(org.hibernate.service.ServiceRegistry serviceRegistry) |
protected org.hibernate.cfg.Configuration |
extendConfiguration(org.hibernate.cfg.Configuration conf) |
public SquashEntityManagerFactoryBuilderImpl(org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor persistenceUnit,
Map integrationSettings,
ClassLoader providedClassLoader)
public SquashEntityManagerFactoryBuilderImpl(org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor persistenceUnit,
Map integrationSettings)
public org.hibernate.cfg.Configuration buildHibernateConfiguration(org.hibernate.service.ServiceRegistry serviceRegistry)
buildHibernateConfiguration in class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImplprotected org.hibernate.cfg.Configuration extendConfiguration(org.hibernate.cfg.Configuration conf)
Copyright © 2010–2016 Henix, henix.fr. All rights reserved.