Class HibernateCoreBootstrapContribution
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.bootstrap.HibernateCoreBootstrapContribution
- All Implemented Interfaces:
HibernateBootstrapContribution
,Comparable<HibernateBootstrapContribution>
@Component
public class HibernateCoreBootstrapContribution
extends Object
implements HibernateBootstrapContribution
Core configuration of the session factory.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionHibernateCoreBootstrapContribution
(NiceDataModel dataModel, HibernatePropertiesProvider propertiesProvider, BinaryAccessProvider binaryAccessProvider, BinaryHashingService binaryHashingService, InterceptorFactory interceptorFactory, AfterCommitListener afterCommitListener, CollectionInitializationService collectionInitializationService, EntityFactory entityFactory, PropertyAccessorService propertyAccessorService, HibernateBeanContainer beanContainer, org.slf4j.Logger log) -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureBootstrapServiceRegistryBuilder
(org.hibernate.boot.registry.BootstrapServiceRegistryBuilder builder, ContributionClassLoaderService classLoaderService) void
configureMetadataSources
(org.hibernate.boot.MetadataSources metadataSources) void
configureSessionFactory
(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) void
configureSessionFactoryBuilder
(org.hibernate.boot.SessionFactoryBuilder builder, org.hibernate.type.spi.TypeConfiguration typeConfiguration, org.hibernate.boot.registry.StandardServiceRegistry standardServiceRegistry) void
configureStandardServiceRegistryBuilder
(org.hibernate.boot.registry.StandardServiceRegistryBuilder builder) int
priority()
void
setEnableEntityClassCaching
(boolean enableEntityClassCaching) void
setFieldContributions
(List<CustomFieldContribution> fieldContributions) void
setFieldGenerationContributions
(List<FieldGenerator> fieldGenerators) void
setJdbcFunctions
(List<JdbcFunction> jdbcFunctions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.hibernate.HibernateBootstrapContribution
compareTo, configureMetadataBuilder
-
Field Details
-
ENTITY_CLASS_LOADER_OVERRIDE
-
-
Constructor Details
-
HibernateCoreBootstrapContribution
public HibernateCoreBootstrapContribution(@Lazy NiceDataModel dataModel, HibernatePropertiesProvider propertiesProvider, @Lazy BinaryAccessProvider binaryAccessProvider, BinaryHashingService binaryHashingService, @Lazy InterceptorFactory interceptorFactory, @Lazy AfterCommitListener afterCommitListener, @Lazy CollectionInitializationService collectionInitializationService, @Lazy EntityFactory entityFactory, @Lazy PropertyAccessorService propertyAccessorService, HibernateBeanContainer beanContainer, org.slf4j.Logger log)
-
-
Method Details
-
setEnableEntityClassCaching
@Value("${nice2.persist.enableEntityClassCaching}") public void setEnableEntityClassCaching(boolean enableEntityClassCaching) -
priority
public int priority()- Specified by:
priority
in interfaceHibernateBootstrapContribution
- Returns:
- priority used to order the contributions. Higher is executed first. The core contribution has priority 100
-
configureBootstrapServiceRegistryBuilder
public void configureBootstrapServiceRegistryBuilder(org.hibernate.boot.registry.BootstrapServiceRegistryBuilder builder, ContributionClassLoaderService classLoaderService) - Specified by:
configureBootstrapServiceRegistryBuilder
in interfaceHibernateBootstrapContribution
-
configureMetadataSources
public void configureMetadataSources(org.hibernate.boot.MetadataSources metadataSources) - Specified by:
configureMetadataSources
in interfaceHibernateBootstrapContribution
-
configureStandardServiceRegistryBuilder
public void configureStandardServiceRegistryBuilder(org.hibernate.boot.registry.StandardServiceRegistryBuilder builder) - Specified by:
configureStandardServiceRegistryBuilder
in interfaceHibernateBootstrapContribution
-
configureSessionFactoryBuilder
public void configureSessionFactoryBuilder(org.hibernate.boot.SessionFactoryBuilder builder, org.hibernate.type.spi.TypeConfiguration typeConfiguration, org.hibernate.boot.registry.StandardServiceRegistry standardServiceRegistry) - Specified by:
configureSessionFactoryBuilder
in interfaceHibernateBootstrapContribution
-
configureSessionFactory
public void configureSessionFactory(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) - Specified by:
configureSessionFactory
in interfaceHibernateBootstrapContribution
-
setFieldContributions
-
setJdbcFunctions
-
setFieldGenerationContributions
-