private static OrderField<?> getOrderField(final Map<String, Field<?>> fieldMap,
                                               final CriteriaFieldSort sort) {
        final Field<?> field = NullSafe.map(fieldMap)
                .get(sort.getId());
        return NullSafe.get(
                field,
                fld -> (sort.isDesc()
                        ? fld.desc()
                        : fld.asc()));
    }
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/JooqUtil.java