hibernate getlist d'une table
(List<Products>)session.createSQLQuery("SELECT * FROM Products").addEntity(Products.class).list();
Happy Hamster
(List<Products>)session.createSQLQuery("SELECT * FROM Products").addEntity(Products.class).list();
CriteriaBuilder builder = session.getCriteriaBuilder();
CriteriaQuery<Products> criteria = builder.createQuery(Products.class);
criteria.from(Products.class);
List<Products> products = session.createQuery(criteria).getResultList();