use of com.querydsl.jpa.impl.JPAQueryFactory in project jeeshop by remibantos.
the class MailTemplateFinder method findAll.
public List<MailTemplate> findAll(Integer offset, Integer limit, String orderBy, Boolean isDesc) {
JPAQuery<MailTemplate> query = new JPAQueryFactory(entityManager).selectFrom(mailTemplate);
if (offset != null)
query.offset(offset);
if (limit != null)
query.limit(limit);
sortBy(orderBy, isDesc, query);
return query.fetch();
}
Aggregations