Population metrics using JPA/Hibernate