Class SpringSessionFactory

java.lang.Object
org.sqlproc.engine.spring.SpringSessionFactory
All Implemented Interfaces:
org.sqlproc.engine.SqlSessionFactory

public class SpringSessionFactory extends Object implements org.sqlproc.engine.SqlSessionFactory
The simple implementation of the factory SqlSessionFactory 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
    The Spring JdbcTemplate, the central class for all Spring database operations.
    private String
    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

    Modifier and Type
    Method
    Description
    org.sqlproc.engine.SqlSession

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Details

    • 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 JdbcTemplate
      name - the name of the database related to this session
  • Method Details

    • getSqlSession

      public org.sqlproc.engine.SqlSession getSqlSession()
      Specified by:
      getSqlSession in interface org.sqlproc.engine.SqlSessionFactory