public Sort toSort(List<? extends OrderSpecifier<?>> orderBys) {
        List<SortField> sorts = new ArrayList<SortField>(orderBys.size());
        for (OrderSpecifier<?> order : orderBys) {
            if (!(order.getTarget() instanceof Path<?>)) {
                throw new IllegalArgumentException("argument was not of type Path.");
            }
            Class<?> type = order.getTarget().getType();
            boolean reverse = !order.isAscending();
            Path<?> path = getPath(order.getTarget());
            if (Number.class.isAssignableFrom(type)) {
                sorts.add(new SortField(toField(path), sortFields.get(type), reverse));
            } else {
                sorts.add(new SortField(toField(path), sortLocale, reverse));
            }
        }
        Sort sort = new Sort();
        sort.setSort(sorts.toArray(new SortField[0]));
        return sort;
    }
template method

@param leftHandSide left hand side
@param rightHandSide right hand side
@return results
querydsl-lucene3/src/main/java/com/querydsl/lucene3/LuceneSerializer.java