public class DefaultHibernate5Factory extends org.codehaus.griffon.runtime.core.storage.AbstractObjectFactory<org.hibernate.SessionFactory> implements Hibernate5Factory
Constructor and Description |
---|
DefaultHibernate5Factory(griffon.core.Configuration configuration,
griffon.core.GriffonApplication application) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDataSource(String dataSourceName) |
org.hibernate.SessionFactory |
create(String name) |
protected org.hibernate.cfg.Configuration |
createConfiguration(Map<String,Object> config,
String dataSourceName) |
protected void |
createSchema(String dataSourceName,
Map<String,Object> config,
org.hibernate.cfg.Configuration configuration) |
void |
destroy(String name,
org.hibernate.SessionFactory instance) |
Map<String,Object> |
getConfigurationFor(String sessionFactoryName) |
protected DataSource |
getDataSource(String dataSourceName) |
protected String |
getPluralKey() |
Set<String> |
getSessionFactoryNames() |
protected String |
getSingleKey() |
protected org.hibernate.Session |
openSession(String sessionFactoryName,
org.hibernate.SessionFactory sessionFactory) |
@Nonnull public Set<String> getSessionFactoryNames()
getSessionFactoryNames
in interface Hibernate5Factory
@Nonnull public Map<String,Object> getConfigurationFor(@Nonnull String sessionFactoryName)
getConfigurationFor
in interface Hibernate5Factory
@Nonnull protected String getSingleKey()
getSingleKey
in class org.codehaus.griffon.runtime.core.storage.AbstractObjectFactory<org.hibernate.SessionFactory>
@Nonnull protected String getPluralKey()
getPluralKey
in class org.codehaus.griffon.runtime.core.storage.AbstractObjectFactory<org.hibernate.SessionFactory>
@Nonnull public org.hibernate.SessionFactory create(@Nonnull String name)
create
in interface griffon.core.storage.ObjectFactory<org.hibernate.SessionFactory>
public void destroy(@Nonnull String name, @Nonnull org.hibernate.SessionFactory instance)
destroy
in interface griffon.core.storage.ObjectFactory<org.hibernate.SessionFactory>
@Nonnull protected org.hibernate.cfg.Configuration createConfiguration(@Nonnull Map<String,Object> config, @Nonnull String dataSourceName)
protected void createSchema(@Nonnull String dataSourceName, @Nonnull Map<String,Object> config, @Nonnull org.hibernate.cfg.Configuration configuration)
@Nonnull protected DataSource getDataSource(@Nonnull String dataSourceName)