인프런 커뮤니티 질문&답변
applyPagination 메소드 관련 질문입니다.
작성
·
417
0
JPAQuery를 raw 타입으로 쓰지 말고 <T>를 붙여서 쓰면 더 좋지 않나요?
protected <T> Page<T> applyPagination(Pageable pageable, Function<JPAQueryFactory, JPAQuery<T>> contentQuery) {
JPAQuery<T> jpaQuery = contentQuery.apply(getQueryFactory());
List<T> content = getQuerydsl().applyPagination(pageable, jpaQuery).fetch();
return PageableExecutionUtils.getPage(content, pageable, jpaQuery::fetchCount);
}





