-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
applyPagination 메소드 관련 질문입니다.
22.03.29 21:40 작성 조회수 249
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);
}
답변을 작성해보세요.
답변 2