Code example for SessionFactory

Methods: getCurrentSession

0
            throw e;
        } 
    } 
 
    public void flush() { 
        sessionFactory.getCurrentSession().flush();
    } 
 
    public void evict(final Object object) { 
        sessionFactory.getCurrentSession().evict(object);
    } 
 
    @SuppressWarnings("unchecked") 
    public <T> List<T> findAll(final Class<T> _class) {
        final Criteria criteria = createCriteria(_class);
        return criteria.list();
    } 
 
    @SuppressWarnings("unchecked") 
    public <T> List<T> findAll(final Class<T> _class, final int maxResults, final int firstResult) {