So right now I have a program containing a piece of code that looks like this…
Criteria crit = session.createCriteria(Product.class);
ProjectionList projList = Projections.projectionList();
projList.add(Projections.max("price"));
projList.add(Projections.min("price"));
projList.add(Projections.countDistinct("description"));
crit.setProjection(projList);
List results = crit.list();
I want to iterate results.So thank you in advance for any help/advice that is offered.
In this case you will have a list whose elements is an array of the following:
[maxPrice,minPrice,count].