Listorders = session.createCriteria(Order.class) .add(Restrictions.between("totalPrice", 100, 200)) .list();
Listcustomers = session.createCriteria(Customer.class) .add(Restrictions.between("birthYear", 1980, 1990)) .list();
ListAll of these examples use the 'org.hibernate.criterion.Restrictions' package library in Java, which provides a set of static methods for creating Criterion instances to use in Hibernate queries.products = session.createCriteria(Product.class) .add(Restrictions.between("weight", 1.0, 2.0)) .list();