public class DefaultHibernate3Factory extends AbstractObjectFactory<org.hibernate.SessionFactory> implements Hibernate3Factory
KEY_DEFAULT
Constructor and Description |
---|
DefaultHibernate3Factory(Configuration configuration,
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 sqlSessionFactory) |
event, getApplication, getConfiguration, narrowConfig
@Inject public DefaultHibernate3Factory(@Nonnull @Named(value="hibernate3") Configuration configuration, @Nonnull GriffonApplication application)
@Nonnull public Set<String> getSessionFactoryNames()
getSessionFactoryNames
in interface Hibernate3Factory
@Nonnull public Map<String,Object> getConfigurationFor(@Nonnull String sessionFactoryName)
getConfigurationFor
in interface Hibernate3Factory
@Nonnull protected String getSingleKey()
getSingleKey
in class AbstractObjectFactory<org.hibernate.SessionFactory>
@Nonnull protected String getPluralKey()
getPluralKey
in class AbstractObjectFactory<org.hibernate.SessionFactory>
@Nonnull public org.hibernate.SessionFactory create(@Nonnull String name)
create
in interface ObjectFactory<org.hibernate.SessionFactory>
public void destroy(@Nonnull String name, @Nonnull org.hibernate.SessionFactory instance)
destroy
in interface 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)