public List<Consumption> findEntries(int firstResult, int maxResults) throws Exception {
try {
return (Collections.unmodifiableList(entityManager.createQuery("SELECT o FROM " + IModel.DATABASE_PRE + "Consumption o")
.setFirstResult(firstResult).setMaxResults(maxResults).getResultList()));
} catch (Exception ex) {
throw new CustomException(ex);
}
}