Example usage for org.hibernate Session getSessionFactory

List of usage examples for org.hibernate Session getSessionFactory

Introduction

In this page you can find the example usage for org.hibernate Session getSessionFactory.

Prototype

SessionFactory getSessionFactory();

Source Link

Document

Get the session factory which created this session.

Usage

From source file:storybook.model.dao.SbGenericDAOImpl.java

License:Open Source License

public void setSession(Session session) {
    this.session = session;
    setSessionFactory(session.getSessionFactory());
}

From source file:uk.ac.ebi.ep.data.dataconfig.DataConfig.java

private SessionFactory sessionFactory() {
    EntityManager em = entityManagerFactory().getObject().createEntityManager();
    Session session = em.unwrap(Session.class);

    return session.getSessionFactory();
}