public class SpringSimpleSession extends Object implements SqlSession
JdbcTemplate.
It's the first parameter to all primary methods in the SqlQueryEngine and SqlCrudEngine.
The primary contract is the method for the SqlQuery instance creation.
For more info please see the Tutorials.
| Modifier and Type | Field and Description |
|---|---|
(package 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 |
|---|
SpringSimpleSession(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Creates a new instance.
|
SpringSimpleSession(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
String name)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
SqlQuery |
createSqlQuery(String queryString) |
int[] |
executeBatch(String[] statements) |
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate()
Returns the internal Spring JdbcTemplate instance.
|
String |
getName() |
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
private String name
public SpringSimpleSession(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
jdbcTemplate - the Spring JdbcTemplate instancepublic SpringSimpleSession(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
String name)
jdbcTemplate - the Spring JdbcTemplate instancename - the name of the databasepublic org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
public SqlQuery createSqlQuery(String queryString) throws SqlProcessorException
createSqlQuery in interface SqlSessionSqlProcessorExceptionpublic int[] executeBatch(String[] statements) throws SqlProcessorException
executeBatch in interface SqlSessionSqlProcessorExceptionpublic String getName()
getName in interface SqlSessionCopyright © 2016. All rights reserved.