pessoal estou com dúvida nesses dois métodos templates do Hibernate
public List<T> findByExample(final T example, final int first, final int max) {
try {
final Criteria c = this.getSession().createCriteria(this.objectClass);
c.add(Example.create(example));
if (first != 0) {
c.setFirstResult(first);
}
if (max != 0) {
c.setMaxResults(max);
}
return c.list();
} catch (final HibernateException e) {
throw this.convertHibernateAccessException(e);
}
}
não entendi o que são esses parâmetros int first, e int max…
e nesse metodo
public int listAllPageCount() {
try {
final List<T> l = this.listAll();
final Integer i = new Integer(l.size());
return i.intValue();
} catch (final HibernateException e) {
throw this.convertHibernateAccessException(e);
}
}
ele serve pra quê…