public class SpringSessionFactory extends Object implements SqlSessionFactory
SqlSessionFactory
for the Spring stack.
For more info please see the Tutorials.
Modifier and Type | Field and 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 and 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.
|
Modifier and Type | Method and Description |
---|---|
SqlSession |
getSqlSession() |
private org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
private String name
public SpringSessionFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
jdbcTemplate
- the Spring JdbcTemplatepublic SpringSessionFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String name)
jdbcTemplate
- the Spring JdbcTemplatename
- the name of the database related to this sessionpublic SqlSession getSqlSession()
getSqlSession
in interface SqlSessionFactory
Copyright © 2019. All rights reserved.