If my query contains one class, like:
query = session.createQuery(\"select u from User as u\");
queryResult = query.list();
then I iterate
Also you can create a constructor and return a object:
Assuming that the class Family has an appropriate constructor - as an actual typesafe Java object:
select new Family(mother, mate, offspr)
from DomesticCat as mother
join mother.mate as mate
left join mother.kittens as offspr
Or a list:
select new list(mother, offspr, mate.name)
from DomesticCat as mother
inner join mother.mate as mate
left outer join mother.kittens as offspr
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-select