# Uses of Class
org.springframework.orm.hibernate5.LocalSessionFactoryBuilder

Packages that use LocalSessionFactoryBuilder
Package
Description
org.springframework.orm.hibernate5
Package providing integration of Hibernate ORM 5.x with Spring concepts.

## Uses of LocalSessionFactoryBuilder in org.springframework.orm.hibernate5

Methods in org.springframework.orm.hibernate5 that return LocalSessionFactoryBuilder
Modifier and Type
Method
Description
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`addAnnotatedClasses(Class<?>... annotatedClasses)`
Add the given annotated classes in a batch.
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`addPackages(String... annotatedPackages)`
Add the given annotated packages in a batch.
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`scanPackages(String... packagesToScan)`
Perform Spring-based scanning for entity classes, registering them as annotated classes with this `Configuration`.
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`setBeanContainer(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)`
Set a Hibernate `BeanContainer` for the given Spring `ConfigurableListableBeanFactory`.
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`setCacheRegionFactory(RegionFactory cacheRegionFactory)`
Set the Hibernate `RegionFactory` to use for the SessionFactory.
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`setEntityTypeFilters(org.springframework.core.type.filter.TypeFilter... entityTypeFilters)`
Specify custom type filters for Spring-based scanning for entity classes.
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`setJtaTransactionManager(Object jtaTransactionManager)`
Set the Spring `JtaTransactionManager` or the JTA `TransactionManager` to be used with Hibernate, if any.
`LocalSessionFactoryBuilder`
LocalSessionFactoryBuilder.`setMultiTenantConnectionProvider(MultiTenantConnectionProvider multiTenantConnectionProvider)`
Set a `MultiTenantConnectionProvider` to be passed on to the SessionFactory.
Methods in org.springframework.orm.hibernate5 with parameters of type LocalSessionFactoryBuilder
Modifier and Type
Method
Description
`protected SessionFactory`
LocalSessionFactoryBean.`buildSessionFactory(LocalSessionFactoryBuilder sfb)`
Subclasses can override this method to perform custom initialization of the SessionFactory instance, creating it via the given Configuration object that got prepared by this LocalSessionFactoryBean.