Datastore implementation that uses a Hibernate SessionFactory underneath.
Modifiers | Name | Description |
---|---|---|
protected java.util.Map<java.lang.String, HibernateDatastore> |
datastoresByConnectionSource |
|
protected ConfigurableApplicationEventPublisher |
eventPublisher |
|
protected HibernateGormEnhancer |
gormEnhancer |
|
protected GrailsHibernateTransactionManager |
transactionManager |
Constructor and description |
---|
HibernateDatastore
(ConnectionSources<org.hibernate.SessionFactory, HibernateConnectionSourceSettings> connectionSources, HibernateMappingContext mappingContext, ConfigurableApplicationEventPublisher eventPublisher) Create a new HibernateDatastore for the given connection sources and mapping context |
HibernateDatastore
(org.springframework.core.env.PropertyResolver configuration, HibernateConnectionSourceFactory connectionSourceFactory, ConfigurableApplicationEventPublisher eventPublisher) Create a new HibernateDatastore for the given connection sources and mapping context |
HibernateDatastore
(org.springframework.core.env.PropertyResolver configuration, HibernateConnectionSourceFactory connectionSourceFactory) Create a new HibernateDatastore for the given connection sources and mapping context |
HibernateDatastore
(org.springframework.core.env.PropertyResolver configuration, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Class... classes) Create a new HibernateDatastore for the given connection sources and mapping context |
HibernateDatastore
(org.springframework.core.env.PropertyResolver configuration, java.lang.Class... classes) Create a new HibernateDatastore for the given connection sources and mapping context |
HibernateDatastore
(java.util.Map<java.lang.String, java.lang.Object> configuration, java.lang.Class... classes) Constructor used purely for testing purposes. |
HibernateDatastore
(java.lang.Class... classes) Constructor used purely for testing purposes. |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
configureValidationRegistry(org.springframework.core.env.PropertyResolver configuration, HibernateMappingContext mappingContext) |
|
protected Session |
createSession(org.springframework.core.env.PropertyResolver connectionDetails) |
|
void |
destroy() |
|
org.springframework.context.ApplicationEventPublisher |
getApplicationEventPublisher() |
|
Session |
getCurrentSession() |
|
HibernateDatastore |
getDatastoreForConnection(java.lang.String connectionName) Obtain a child HibernateDatastore by connection name |
|
IHibernateTemplate |
getHibernateTemplate(int flushMode) |
|
GrailsHibernateTransactionManager |
getTransactionManager() @return The org.springframework.transaction.PlatformTransactionManager instance |
|
protected HibernateGormEnhancer |
initialize() |
|
org.hibernate.Session |
openSession() |
|
protected void |
registerEventListeners(ConfigurableApplicationEventPublisher eventPublisher) |
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
|
void |
withFlushMode(FlushMode flushMode, java.util.concurrent.Callable<java.lang.Boolean> callable) |
Create a new HibernateDatastore for the given connection sources and mapping context
connectionSources
- The ConnectionSources instancemappingContext
- The MappingContext instanceeventPublisher
- The ConfigurableApplicationEventPublisher instanceCreate a new HibernateDatastore for the given connection sources and mapping context
configuration
- The configurationconnectionSourceFactory
- The HibernateConnectionSourceFactory instanceeventPublisher
- The ConfigurableApplicationEventPublisher instanceCreate a new HibernateDatastore for the given connection sources and mapping context
configuration
- The configurationconnectionSourceFactory
- The HibernateConnectionSourceFactory instanceCreate a new HibernateDatastore for the given connection sources and mapping context
configuration
- The configurationeventPublisher
- The ConfigurableApplicationEventPublisher instanceclasses
- The persistent classesCreate a new HibernateDatastore for the given connection sources and mapping context
configuration
- The configurationclasses
- The persistent classesConstructor used purely for testing purposes. Creates a datastore with an in-memory database and dbCreate set to 'create-drop'
classes
- The classesConstructor used purely for testing purposes. Creates a datastore with an in-memory database and dbCreate set to 'create-drop'
classes
- The classesObtain a child HibernateDatastore by connection name
connectionName
- The connection name