public class DefaultMybatisFactory extends AbstractObjectFactory<org.apache.ibatis.session.SqlSessionFactory> implements MybatisFactory
KEY_DEFAULT
Constructor and Description |
---|
DefaultMybatisFactory(Configuration configuration,
GriffonApplication application) |
Modifier and Type | Method and Description |
---|---|
org.apache.ibatis.session.SqlSessionFactory |
create(String name) |
void |
destroy(String name,
org.apache.ibatis.session.SqlSessionFactory instance) |
Map<String,Object> |
getConfigurationFor(String sessionFactoryName) |
protected String |
getPluralKey() |
Set<String> |
getSessionFactoryNames() |
protected String |
getSingleKey() |
protected Class<?> |
loadClass(String className,
ClassLoader classLoader) |
protected org.apache.ibatis.session.SqlSession |
openSession(String sessionFactoryName,
org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory) |
event, getApplication, getConfiguration, narrowConfig
@Inject public DefaultMybatisFactory(@Nonnull @Named(value="mybatis") Configuration configuration, @Nonnull GriffonApplication application)
@Nonnull public Set<String> getSessionFactoryNames()
getSessionFactoryNames
in interface MybatisFactory
@Nonnull public Map<String,Object> getConfigurationFor(@Nonnull String sessionFactoryName)
getConfigurationFor
in interface MybatisFactory
@Nonnull protected String getSingleKey()
getSingleKey
in class AbstractObjectFactory<org.apache.ibatis.session.SqlSessionFactory>
@Nonnull protected String getPluralKey()
getPluralKey
in class AbstractObjectFactory<org.apache.ibatis.session.SqlSessionFactory>
@Nonnull public org.apache.ibatis.session.SqlSessionFactory create(@Nonnull String name)
create
in interface ObjectFactory<org.apache.ibatis.session.SqlSessionFactory>
public void destroy(@Nonnull String name, @Nonnull org.apache.ibatis.session.SqlSessionFactory instance)
destroy
in interface ObjectFactory<org.apache.ibatis.session.SqlSessionFactory>
@Nonnull protected org.apache.ibatis.session.SqlSession openSession(@Nonnull String sessionFactoryName, @Nonnull org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
protected Class<?> loadClass(@Nonnull String className, @Nonnull ClassLoader classLoader) throws ClassNotFoundException
ClassNotFoundException