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

    @Override
    protected <T, N extends Number & Comparable<N>> Q translate(Distance2dExpression<N> e, Class<T> entityClass) {
        Operator operator = e.getOperator();
        String xFieldName = getPropertyResolver().resolveXField(e.getPropertyName(), entityClass);
        String yFieldName = getPropertyResolver().resolveYField(e.getPropertyName(), entityClass);
        if (Operator.WITHIN.equals(operator)) {
            Box<N> box = boxMaker.make(new Point<N>(e.getX(), e.getY()), e.getDistance());
            return within(xFieldName, yFieldName, box);
        } else {
            throw unsupported(operator, UnaryExpression.class);
        }
    }

    public  AbstractHibernateQueryTranslator(Class<Q> queryClass,
            Class<O> orderClass, HibernatePropertyResolver propertyResolver,
            BoxMaker boxMaker,
            ContainsExpressionHandler<Q> containsExpressionHandler);

}