@Override
    public List Listar() {
        Session session = null;
        List<Cuentas> cuenta = null;
        try {
            session = NewHibernateUtil.getSessionFactory().openSession();
            Query query = session.createQuery("from Cuentas");
            cuenta = (List<Cuentas>) query.list();
            session.getTransaction().commit();
        } catch (HibernateException e) {
            System.out.println(e.toString());
        } finally {
            if (session != null) {
             //  session.close();
            }
        }
        return cuenta;
    }