Code example for SessionFactory

Methods: openSession

0
                ApplicationContextProvider 
                    .instance() 
                    .applicationContext() 
                    .getBean(aHibernateSessionFactoryName);
 
        return new PersistenceManagerProvider(sessionFactory.openSession());
    } 
 
    public PersistenceManagerProvider(Session aHibernateSession) {
        super(); 
 
        this.setHibernateSession(aHibernateSession);
    } 
 
    public Session hibernateSession() {
        return this.hibernateSession;
    } 
 
    public boolean hasHibernateSession() { 
        return this.hibernateSession() != null;