/** * Converts the {@link Order} items of the given {@link Sort} into {@link OrderSpecifier} and attaches those to the * given {@link JPQLQuery}. * * @param sort must not be {@literal null}. * @param query must not be {@literal null}. * @return */ private <T> JPQLQuery<T> addOrderByFrom(Sort sort, JPQLQuery<T> query) { Assert.notNull(sort, "Sort must not be null!"); Assert.notNull(query, "Query must not be null!"); for (Order order : sort) { query.orderBy(toOrderSpecifier(order)); } return query; }
/** * Converts the {@link Order} items of the given {@link Sort} into {@link OrderSpecifier} and attaches those to the * given {@link JPQLQuery}. * * @param sort must not be {@literal null}. * @param query must not be {@literal null}. * @return */ private <T> JPQLQuery<T> addOrderByFrom(Sort sort, JPQLQuery<T> query) { Assert.notNull(sort, "Sort must not be null!"); Assert.notNull(query, "Query must not be null!"); for (Order order : sort) { query.orderBy(toOrderSpecifier(order)); } return query; }