HqlQueryTranslator extends
        AbstractHibernateQueryTranslator<String, String, String> implements
        QueryTranslator<String, String, String> { @Override public <N extends Number & Comparable<N>> String within(String xFieldName, String yFieldName, Box<N> box) { return and( between(xFieldName, box.getA().getX(), box.getB().getX()), between(yFieldName, box.getA().getY(), box.getB().getY()) ); } HqlQueryTranslator(HibernatePropertyResolver propertyResolver,
            BoxMaker boxMaker,
            ContainsExpressionHandler<String> containsExpressionHandler);  HqlQueryTranslator(HibernatePropertyResolver propertyResolver,
            BoxMaker boxMaker);  HqlQueryTranslator(HibernatePropertyResolver propertyResolver); @Override String eq(String fieldName, Object value); @Override String ne(String fieldName, Object value); @Override String lt(String fieldName, Object value); @Override String lte(String fieldName, Object value); @Override String gt(String fieldName, Object value); @Override String gte(String fieldName, Object value); @Override String between(String fieldName, Object from, Object to); @Override String in(String fieldName, Object[] values); @Override String notIn(String fieldName, Object[] values); @Override String isNull(String fieldName); @Override String notNull(String fieldName); @Override String isEmpty(String fieldName); @Override String notEmpty(String fieldName); @Override String within(String xFieldName,
            String yFieldName, Box<N> box); @Override String and(String... subqueries); @Override String or(String... subqueries); @Override String order(String fieldName, Order o); @Override String order(String... orders); @Override String translateProjection(Query<T, R> query); static final String TIMESTAMP_FORMAT; }
@Test public void within() { String xprop = "property.x"; String yprop = "property.y"; String expected = "(" + join(xprop, HibernateOperator.BETWEEN, box.getA().getX(), HibernateOperator.AND, box.getB().getX()) + ") " + HibernateOperator.AND + " (" + join(yprop, HibernateOperator.BETWEEN, box.getA().getY(), HibernateOperator.AND, box.getB().getY()) + ")"; assertEquals(expected, translator.within(xprop, yprop, box)); }