Package org.sqlproc.engine.hibernate
Class HibernateSessionFactory
- java.lang.Object
-
- org.sqlproc.engine.hibernate.HibernateSessionFactory
-
- All Implemented Interfaces:
SqlSessionFactory
public class HibernateSessionFactory extends Object implements SqlSessionFactory
The simple implementation of the factorySqlSessionFactoryfor the Hibernate stack.For more info please see the Tutorials.
- Author:
- Vladimir Hudec
-
-
Field Summary
Fields Modifier and Type Field Description private StringnameThe name of the database related to this session.private org.hibernate.SessionFactorysessionFactoryThe Hibernate session factory.
-
Constructor Summary
Constructors Constructor Description HibernateSessionFactory(org.hibernate.SessionFactory sessionFactory)Creates a new instance.HibernateSessionFactory(org.hibernate.SessionFactory sessionFactory, String name)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlSessiongetSqlSession()
-
-
-
Field Detail
-
sessionFactory
private org.hibernate.SessionFactory sessionFactory
The Hibernate session factory.
-
name
private String name
The name of the database related to this session. It's usage is implementation specific.
-
-
Constructor Detail
-
HibernateSessionFactory
public HibernateSessionFactory(org.hibernate.SessionFactory sessionFactory)
Creates a new instance.- Parameters:
sessionFactory- the Hibernate session factory
-
HibernateSessionFactory
public HibernateSessionFactory(org.hibernate.SessionFactory sessionFactory, String name)Creates a new instance.- Parameters:
sessionFactory- the Hibernate session factoryname- the name of the database related to this session
-
-
Method Detail
-
getSqlSession
public SqlSession getSqlSession()
- Specified by:
getSqlSessionin interfaceSqlSessionFactory
-
-