Package org.sqlproc.engine.spring
Class SpringSessionFactory
- java.lang.Object
-
- org.sqlproc.engine.spring.SpringSessionFactory
-
- All Implemented Interfaces:
SqlSessionFactory
public class SpringSessionFactory extends Object implements SqlSessionFactory
The simple implementation of the factorySqlSessionFactory
for the Spring stack.For more info please see the Tutorials.
- Author:
- Vladimir Hudec
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.jdbc.core.JdbcTemplate
jdbcTemplate
The Spring JdbcTemplate, the central class for all Spring database operations.private String
name
The name of the database related to this session.
-
Constructor Summary
Constructors Constructor Description SpringSessionFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Creates a new instance.SpringSessionFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String name)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlSession
getSqlSession()
-
-
-
Field Detail
-
jdbcTemplate
private org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
The Spring JdbcTemplate, the central class for all Spring database operations.
-
name
private String name
The name of the database related to this session. It's usage is implementation specific.
-
-
Constructor Detail
-
SpringSessionFactory
public SpringSessionFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Creates a new instance.- Parameters:
jdbcTemplate
- the Spring JdbcTemplate
-
SpringSessionFactory
public SpringSessionFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String name)
Creates a new instance.- Parameters:
jdbcTemplate
- the Spring JdbcTemplatename
- the name of the database related to this session
-
-
Method Detail
-
getSqlSession
public SqlSession getSqlSession()
- Specified by:
getSqlSession
in interfaceSqlSessionFactory
-
-