
org.sqlproc.engine.jdbc.JdbcSessionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sql-processor Show documentation
Show all versions of sql-processor Show documentation
SQL Processor - Data Driven Queries
package org.sqlproc.engine.jdbc;
import java.sql.Connection;
import org.sqlproc.engine.SqlSession;
import org.sqlproc.engine.SqlSessionFactory;
/**
* The simple implementation of the factory {@link SqlSessionFactory} for the JDBC stack.
*
*
* For more info please see the Tutorials.
*
* @author Vladimir Hudec
*/
public class JdbcSessionFactory implements SqlSessionFactory {
/**
* The connection to the database. It should be opened.
*/
private Connection connection;
/**
* Creates a new instance.
*
* @param connection
* the connection to the database
*/
public JdbcSessionFactory(Connection connection) {
super();
this.connection = connection;
}
/**
* {@inheritDoc}
*/
@Override
public SqlSession getSqlSession() {
return JdbcSession.generateProxy(connection);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy