public Collection<OrderField<?>> getOrderFields(final Map<String, Field<?>> fieldMap,
                                                    final BaseCriteria criteria) {
        if (criteria.getSortList() == null) {
            return Collections.emptyList();
        }

        return criteria.getSortList()
                .stream()
                .map(s -> getOrderField(fieldMap, s))
                .filter(Optional::isPresent)
                .map(Optional::get)
                .collect(Collectors.toList());
    }
Used to build jOOQ conditions from string criteria

@param field    The jOOQ field being queried
@param criteria The criteria to apply
@return A condition that applies the given criteria
stroom-db-util/src/main/java/stroom/db/util/JooqHelper.java