I'm facing the following problem:
    Criteria criteria = getSession().createCriteria(User.class);
    ProjectionList projectionList = Projections.projectionList();
    projectionList.add(Projections.property("id"));
    projectionList.add(Projections.countDistinct("friend_id"));
    projectionList.add(Projections.property("registrationDate"));
    projectionList.add(Projections.property("lastLoginDate"));
    criteria.setProjection(projectionList);
this piece of code returns me a couple of entries with the data I require. However, I need the rowcount for it. Is there a clean way of doing this, rather than just doing a:
return criteria.list().size();
?