I have this code to get all transaction between 2 dates. I would like to get a desc sorted list. What are the possibilities?
@Override public List<Transaction> searchBySubmitDate(final Date startDate, final Date endDate) { return transactionRepository.findAll(new Specification<Transaction>() { @Override public Predicate toPredicate(Root<Transaction> transaction, CriteriaQuery<?> q, CriteriaBuilder cb) { Predicate between = cb.between(transaction.get(Transaction_.dateSubmit), startDate, endDate); return between; } });