class AbstractQueryTranslator implements QueryTranslator<Q,O,P> {

    @Override
    public <T, R> O translateOrder(Query<T, R> query) {
        List<Ordering> orderingList = query.getOrder().get();
        @SuppressWarnings("unchecked")
        O[] orders = (O[]) Array.newInstance(orderClass, orderingList.size());
        for (int i = 0; i < orders.length; i++) {
            Ordering ordering = orderingList.get(i);
            orders[i] = order(
                    propertyResolver.resolve(ordering.getPropertyName(),
                            query.getEntityClass()), ordering.getOrder());
        }
        return order(orders);
    }

    public  AbstractQueryTranslator(Class<Q> queryClass,
            Class<O> orderClass,
            PropertyResolver propertyResolver);

}