public class HibernateMappingContextConfiguration extends org.hibernate.cfg.Configuration
A Configuration that uses a MappingContext to configure Hibernate
Modifiers | Name | Description |
---|---|---|
protected static org.apache.commons.logging.Log |
LOG |
|
protected GrailsDomainBinder |
binder |
|
protected boolean |
configLocked |
|
protected java.lang.String |
dataSourceName |
|
protected HibernateMappingContext |
hibernateMappingContext |
|
protected java.lang.String |
sessionFactoryBeanName |
Fields inherited from class | Fields |
---|---|
class org.hibernate.cfg.Configuration |
DEFAULT_CACHE_CONCURRENCY_STRATEGY, USE_NEW_ID_GENERATOR_MAPPINGS, ARTEFACT_PROCESSING_ORDER, DEFAULT_ARTEFACT_PROCESSING_ORDER |
Type | Name and description |
---|---|
void |
addAnnotatedClasses(java.lang.Class<?>... annotatedClasses) Add the given annotated classes in a batch. |
void |
addPackages(java.lang.String... annotatedPackages) Add the given annotated packages in a batch. |
org.hibernate.SessionFactory |
buildSessionFactory() |
org.hibernate.cfg.Settings |
buildSettings(org.hibernate.service.ServiceRegistry serviceRegistry) |
org.hibernate.cfg.Settings |
buildSettings(java.util.Properties props, org.hibernate.service.ServiceRegistry serviceRegistry) |
protected void |
configureNamingStrategy() Sets custom naming strategy specified in configuration or the default org.hibernate.cfg.ImprovedNamingStrategy. |
org.hibernate.service.ServiceRegistry |
getServiceRegistry() |
protected boolean |
matchesFilter(org.springframework.core.type.classreading.MetadataReader reader, org.springframework.core.type.classreading.MetadataReaderFactory readerFactory) Check whether any of the configured entity type filters matches the current class descriptor contained in the metadata reader. |
protected void |
reset() |
void |
scanPackages(java.lang.String... packagesToScan) Perform Spring-based scanning for entity classes, registering them as annotated classes with this Configuration . |
protected void |
secondPassCompile() Overrides the default behaviour to including binding of Grails domain classes. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setDataSourceName(java.lang.String name) |
void |
setEventListeners(java.util.Map<java.lang.String, java.lang.Object> listeners) Default listeners. |
void |
setHibernateEventListeners(HibernateEventListeners listeners) User-specifiable extra listeners. |
void |
setHibernateMappingContext(HibernateMappingContext hibernateMappingContext) |
void |
setSessionFactoryBeanName(java.lang.String name) |
Methods inherited from class | Name |
---|---|
class org.hibernate.cfg.Configuration |
org.hibernate.cfg.Configuration#add(org.hibernate.util.xml.XmlDocument), org.hibernate.cfg.Configuration#addClass(java.lang.Class), org.hibernate.cfg.Configuration#setProperty(java.lang.String, java.lang.String), org.hibernate.cfg.Configuration#getProperty(java.lang.String), org.hibernate.cfg.Configuration#getProperties(), org.hibernate.cfg.Configuration#setProperties(java.util.Properties), org.hibernate.cfg.Configuration#addURL(java.net.URL), org.hibernate.cfg.Configuration#buildSettings(java.util.Properties), org.hibernate.cfg.Configuration#buildSettings(), org.hibernate.cfg.Configuration#configure(java.lang.String), org.hibernate.cfg.Configuration#configure(java.io.File), org.hibernate.cfg.Configuration#configure(java.net.URL), org.hibernate.cfg.Configuration#configure(), org.hibernate.cfg.Configuration#configure(org.w3c.dom.Document), org.hibernate.cfg.Configuration#setListener(java.lang.String, java.lang.String), org.hibernate.cfg.Configuration#setListener(java.lang.String, java.lang.Object), org.hibernate.cfg.Configuration#setEntityResolver(org.xml.sax.EntityResolver), org.hibernate.cfg.Configuration#getEntityResolver(), org.hibernate.cfg.Configuration#getEventListeners(), org.hibernate.cfg.Configuration#mergeProperties(java.util.Properties), org.hibernate.cfg.Configuration#addProperties(java.util.Properties), org.hibernate.cfg.Configuration#getImports(), org.hibernate.cfg.Configuration#getInterceptor(), org.hibernate.cfg.Configuration#setInterceptor(org.hibernate.Interceptor), org.hibernate.cfg.Configuration#addResource(java.lang.String), org.hibernate.cfg.Configuration#addResource(java.lang.String, java.lang.ClassLoader), org.hibernate.cfg.Configuration#registerTypeOverride(org.hibernate.usertype.CompositeUserType, [Ljava.lang.String;), org.hibernate.cfg.Configuration#registerTypeOverride(org.hibernate.type.BasicType), org.hibernate.cfg.Configuration#registerTypeOverride(org.hibernate.usertype.UserType, [Ljava.lang.String;), org.hibernate.cfg.Configuration#getEntityNotFoundDelegate(), org.hibernate.cfg.Configuration#addFile(java.lang.String), org.hibernate.cfg.Configuration#addFile(java.io.File), org.hibernate.cfg.Configuration#addJar(java.io.File), org.hibernate.cfg.Configuration#addXML(java.lang.String), org.hibernate.cfg.Configuration#getEntityTuplizerFactory(), org.hibernate.cfg.Configuration#getReflectionManager(), org.hibernate.cfg.Configuration#getClassMappings(), org.hibernate.cfg.Configuration#getCollectionMappings(), org.hibernate.cfg.Configuration#getTableMappings(), org.hibernate.cfg.Configuration#getMappedSuperclassMappings(), org.hibernate.cfg.Configuration#getClassMapping(java.lang.String), org.hibernate.cfg.Configuration#getCollectionMapping(java.lang.String), org.hibernate.cfg.Configuration#setEntityNotFoundDelegate(org.hibernate.proxy.EntityNotFoundDelegate), org.hibernate.cfg.Configuration#addCacheableFile(java.lang.String), org.hibernate.cfg.Configuration#addCacheableFile(java.io.File), org.hibernate.cfg.Configuration#addCacheableFileStrictly(java.io.File), org.hibernate.cfg.Configuration#addDocument(org.w3c.dom.Document), org.hibernate.cfg.Configuration#addInputStream(java.io.InputStream), org.hibernate.cfg.Configuration#addAnnotatedClass(java.lang.Class), org.hibernate.cfg.Configuration#addPackage(java.lang.String), org.hibernate.cfg.Configuration#addDirectory(java.io.File), org.hibernate.cfg.Configuration#createMappings(), org.hibernate.cfg.Configuration#generateDropSchemaScript(org.hibernate.dialect.Dialect), org.hibernate.cfg.Configuration#generateSchemaCreationScript(org.hibernate.dialect.Dialect), org.hibernate.cfg.Configuration#generateSchemaUpdateScript(org.hibernate.dialect.Dialect, org.hibernate.tool.hbm2ddl.DatabaseMetadata), org.hibernate.cfg.Configuration#validateSchema(org.hibernate.dialect.Dialect, org.hibernate.tool.hbm2ddl.DatabaseMetadata), org.hibernate.cfg.Configuration#buildMappings(), org.hibernate.cfg.Configuration#getNamedQueries(), org.hibernate.cfg.Configuration#buildSessionFactory(), org.hibernate.cfg.Configuration#setListeners(java.lang.String, [Ljava.lang.String;), org.hibernate.cfg.Configuration#setListeners(java.lang.String, [Ljava.lang.Object;), org.hibernate.cfg.Configuration#setCacheConcurrencyStrategy(java.lang.String, java.lang.String, java.lang.String, boolean), org.hibernate.cfg.Configuration#setCacheConcurrencyStrategy(java.lang.String, java.lang.String, java.lang.String), org.hibernate.cfg.Configuration#setCacheConcurrencyStrategy(java.lang.String, java.lang.String), org.hibernate.cfg.Configuration#setCollectionCacheConcurrencyStrategy(java.lang.String, java.lang.String), org.hibernate.cfg.Configuration#setCollectionCacheConcurrencyStrategy(java.lang.String, java.lang.String, java.lang.String), org.hibernate.cfg.Configuration#getNamedSQLQueries(), org.hibernate.cfg.Configuration#getSqlResultSetMappings(), org.hibernate.cfg.Configuration#getNamingStrategy(), org.hibernate.cfg.Configuration#setNamingStrategy(org.hibernate.cfg.NamingStrategy), org.hibernate.cfg.Configuration#getPersisterClassProvider(), org.hibernate.cfg.Configuration#setPersisterClassProvider(org.hibernate.persister.PersisterClassProvider), org.hibernate.cfg.Configuration#getIdentifierGeneratorFactory(), org.hibernate.cfg.Configuration#buildMapping(), org.hibernate.cfg.Configuration#getFilterDefinitions(), org.hibernate.cfg.Configuration#addFilterDefinition(org.hibernate.engine.FilterDefinition), org.hibernate.cfg.Configuration#iterateFetchProfiles(), org.hibernate.cfg.Configuration#addFetchProfile(org.hibernate.mapping.FetchProfile), org.hibernate.cfg.Configuration#addAuxiliaryDatabaseObject(org.hibernate.mapping.AuxiliaryDatabaseObject), org.hibernate.cfg.Configuration#getSqlFunctions(), org.hibernate.cfg.Configuration#addSqlFunction(java.lang.String, org.hibernate.dialect.function.SQLFunction), org.hibernate.cfg.Configuration#getTypeResolver(), org.hibernate.cfg.Configuration#getSessionFactoryObserver(), org.hibernate.cfg.Configuration#setSessionFactoryObserver(org.hibernate.SessionFactoryObserver), org.hibernate.cfg.Configuration#setPrecedence(java.lang.String), org.hibernate.cfg.Configuration#wait(long, int), org.hibernate.cfg.Configuration#wait(long), org.hibernate.cfg.Configuration#wait(), org.hibernate.cfg.Configuration#equals(java.lang.Object), org.hibernate.cfg.Configuration#toString(), org.hibernate.cfg.Configuration#hashCode(), org.hibernate.cfg.Configuration#getClass(), org.hibernate.cfg.Configuration#notify(), org.hibernate.cfg.Configuration#notifyAll() |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Add the given annotated classes in a batch.
Add the given annotated packages in a batch.
Sets custom naming strategy specified in configuration or the default org.hibernate.cfg.ImprovedNamingStrategy.
Check 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 namesOverrides the default behaviour to including binding of Grails domain classes.
Default listeners.
listeners
- the listenersUser-specifiable extra listeners.
listeners
- the listeners