Package org.sqlproc.engine.jdbc
Class JdbcSessionFactory
java.lang.Object
org.sqlproc.engine.jdbc.JdbcSessionFactory
- All Implemented Interfaces:
SqlSessionFactory
The simple implementation of the factory
SqlSessionFactory for the JDBC stack.
For more info please see the Tutorials.
- Author:
- Vladimir Hudec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectionThe connection to the database.private StringThe name of the database related to this session. -
Constructor Summary
ConstructorsConstructorDescriptionJdbcSessionFactory(Connection connection) Creates a new instance.JdbcSessionFactory(Connection connection, String name) Creates a new instance. -
Method Summary
-
Field Details
-
connection
The connection to the database. It should be opened. -
name
The name of the database related to this session. It's usage is implementation specific.
-
-
Constructor Details
-
JdbcSessionFactory
Creates a new instance.- Parameters:
connection- the connection to the database
-
JdbcSessionFactory
Creates a new instance.- Parameters:
connection- the connection to the databasename- the name of the database related to this session
-
-
Method Details
-
getSqlSession
The main contract of this factory.- Specified by:
getSqlSessionin interfaceSqlSessionFactory- Returns:
- the instance of the SqlSession
-