public class HibernateMappingContextConfiguration extends Configuration implements ApplicationContextAware
A Configuration that uses a MappingContext to configure Hibernate
Modifiers | Name | Description |
---|---|---|
protected java.lang.String |
dataSourceName |
|
protected HibernateMappingContext |
hibernateMappingContext |
|
protected java.lang.String |
sessionFactoryBeanName |
Type Params | Return Type | Name and description |
---|---|---|
|
public Configuration |
addAnnotatedClass(java.lang.Class annotatedClass) |
|
public void |
addAnnotatedClasses(java.lang.Class<?> annotatedClasses) Add the given annotated classes in a batch. |
|
public void |
addPackages(java.lang.String annotatedPackages) Add the given annotated packages in a batch. |
|
public SessionFactory |
buildSessionFactory() |
|
protected BootstrapServiceRegistryBuilder |
createBootstrapServiceRegistryBuilder() Creates the BootstrapServiceRegistryBuilder to use |
|
protected StandardServiceRegistryBuilder |
createStandardServiceRegistryBuilder(BootstrapServiceRegistry bootstrapServiceRegistry) Creates the standard service registry builder. |
|
public ServiceRegistry |
getServiceRegistry() |
<S> |
public java.util.Collection<S> |
loadJavaServices(java.lang.Class<S> serviceContract) |
|
protected boolean |
matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) Check whether any of the configured entity type filters matches the current class descriptor contained in the metadata reader. |
|
protected void |
reset() |
|
public void |
scanPackages(java.lang.String packagesToScan) Perform Spring-based scanning for entity classes, registering them as annotated classes with this Configuration . |
|
public void |
sessionFactoryClosed(SessionFactory factory) |
|
public void |
sessionFactoryCreated(SessionFactory factory) |
|
public void |
setApplicationContext(ApplicationContext applicationContext) |
|
public void |
setDataSourceConnectionSource(ConnectionSource<javax.sql.DataSource, DataSourceSettings> connectionSource) Set the target SQL javax.sql.DataSource |
|
public void |
setDataSourceName(java.lang.String name) |
|
public void |
setEventListeners(java.util.Map<java.lang.String, java.lang.Object> listeners) Default listeners. |
|
public void |
setHibernateEventListeners(HibernateEventListeners listeners) User-specifiable extra listeners. |
|
public void |
setHibernateMappingContext(HibernateMappingContext hibernateMappingContext) |
|
public void |
setMetadataContributor(MetadataContributor metadataContributor) |
|
public void |
setSessionFactoryBeanName(java.lang.String name) |
Add the given annotated classes in a batch.
Add the given annotated packages in a batch.
Creates the BootstrapServiceRegistryBuilder to use
Creates the standard service registry builder. Subclasses can override to customize the creation of the StandardServiceRegistry
bootstrapServiceRegistry
- The BootstrapServiceRegistryCheck whether any of the configured entity type filters matches the current class descriptor contained in the metadata reader.
Perform Spring-based scanning for entity classes, registering them
as annotated classes with this Configuration
.
packagesToScan
- one or more Java package namesSet the target SQL javax.sql.DataSource
connectionSource
- The data source to useDefault listeners.
listeners
- the listenersUser-specifiable extra listeners.
listeners
- the listeners