Documentation for QueryProducer's method:
states for parameter: resultClass - The Java type to map results to.
Trying to use it with Integer type results in the following error:
org.hibernate.MappingException: Unknown entity: java.lang.Integer
The documentation should be changed to reflect that the result class must be a valid JPA Entity.