predicates.add(matchAuthor);
}
// for price fields, also the comparison operation changes based on whether
// minimum or maximum price or both have been filled.
if (minPrice != null && maxPrice != null) {
Predicate matchPrice = cb.between(book.get(Book_.price), minPrice, maxPrice);
predicates.add(matchPrice);
} else if (minPrice != null && maxPrice == null) {
Predicate matchPrice = cb.ge(book.get(Book_.price), minPrice);
predicates.add(matchPrice);
} else if (minPrice == null && maxPrice != null) {