DATAJPA-1594 - Polishing.
Formatting and whitespace.
This commit is contained in:
@@ -156,6 +156,7 @@ public class Querydsl {
|
||||
private <T> JPQLQuery<T> addOrderByFrom(QSort qsort, JPQLQuery<T> query) {
|
||||
|
||||
List<OrderSpecifier<?>> orderSpecifiers = qsort.getOrderSpecifiers();
|
||||
|
||||
return query.orderBy(orderSpecifiers.toArray(new OrderSpecifier[0]));
|
||||
}
|
||||
|
||||
@@ -234,12 +235,9 @@ public class Querydsl {
|
||||
|
||||
while (path != null) {
|
||||
|
||||
if (!path.hasNext() && order.isIgnoreCase()) {
|
||||
// if order is ignore-case we have to treat the last path segment as a String.
|
||||
sortPropertyExpression = Expressions.stringPath((Path<?>) sortPropertyExpression, path.getSegment()).lower();
|
||||
} else {
|
||||
sortPropertyExpression = Expressions.path(path.getType(), (Path<?>) sortPropertyExpression, path.getSegment());
|
||||
}
|
||||
sortPropertyExpression = !path.hasNext() && order.isIgnoreCase() //
|
||||
? Expressions.stringPath((Path<?>) sortPropertyExpression, path.getSegment()).lower() //
|
||||
: Expressions.path(path.getType(), (Path<?>) sortPropertyExpression, path.getSegment());
|
||||
|
||||
path = path.next();
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class QuerydslJpaPredicateExecutor<T> implements QuerydslPredicateExecuto
|
||||
/**
|
||||
* Creates a new {@link QuerydslJpaPredicateExecutor} from the given domain class and {@link EntityManager} and uses
|
||||
* the given {@link EntityPathResolver} to translate the domain class into an {@link EntityPath}.
|
||||
*
|
||||
*
|
||||
* @param entityInformation must not be {@literal null}.
|
||||
* @param entityManager must not be {@literal null}.
|
||||
* @param resolver must not be {@literal null}.
|
||||
@@ -121,7 +121,7 @@ public class QuerydslJpaPredicateExecutor<T> implements QuerydslPredicateExecuto
|
||||
return executeSorted(createQuery(predicate).select(path), orders);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.querydsl.QuerydslPredicateExecutor#findAll(com.mysema.query.types.Predicate, org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@@ -134,7 +134,7 @@ public class QuerydslJpaPredicateExecutor<T> implements QuerydslPredicateExecuto
|
||||
return executeSorted(createQuery(predicate).select(path), sort);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.querydsl.QuerydslPredicateExecutor#findAll(com.mysema.query.types.OrderSpecifier[])
|
||||
*/
|
||||
@@ -171,7 +171,7 @@ public class QuerydslJpaPredicateExecutor<T> implements QuerydslPredicateExecuto
|
||||
return createQuery(predicate).fetchCount();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.querydsl.QueryDslPredicateExecutor#exists(com.mysema.query.types.Predicate)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user