org.sqlproc.engine.jdbc
Class JdbcSessionFactory

java.lang.Object
  extended by org.sqlproc.engine.jdbc.JdbcSessionFactory
All Implemented Interfaces:
SqlSessionFactory

public class JdbcSessionFactory
extends Object
implements SqlSessionFactory

The simple implementation of the factory SqlSessionFactory for the JDBC stack.

For more info please see the Tutorials.

Author:
Vladimir Hudec

Field Summary
private  Connection connection
          The connection to the database.
 
Constructor Summary
JdbcSessionFactory(Connection connection)
          Creates a new instance.
 
Method Summary
 SqlSession getSqlSession()
          The main contract of this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

private Connection connection
The connection to the database. It should be opened.

Constructor Detail

JdbcSessionFactory

public JdbcSessionFactory(Connection connection)
Creates a new instance.

Parameters:
connection - the connection to the database
Method Detail

getSqlSession

public SqlSession getSqlSession()
The main contract of this factory.

Specified by:
getSqlSession in interface SqlSessionFactory
Returns:
the instance of the SqlSession


Copyright © 2013. All Rights Reserved.