public List<Category> getAll() throws SQLException {
		    Session session = null;
		    List<Category> cats = new ArrayList<Category>();
		    try {
                session = HibernateUtil.getSessionFactory().openSession();
                Class tmmp = Category.class;
		    	cats = session.createCriteria(Category.class).list();
		    } catch (Exception e) {
		    	JOptionPane.showMessageDialog(null, e.getMessage(), "Ошибка данных I/O", JOptionPane.OK_OPTION);
		    } finally {
		    	if (session != null && session.isOpen()) {
		    		session.close();
		    	}
		    }
		    return cats;
	  }