(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();