175176177178179180181
return query.criteria(fieldName).within(shape); } @Deprecated public Criteria within(double x, double y, double radius) { return within(center(new Point(x, y), radius)); }
180181182183184185186
return within(center(new Point(x, y), radius)); } @Deprecated public Criteria within(double x, double y, double radius, boolean spherical) { return within(centerSphere(new Point(x, y), radius)); }
185186187188189190191
return within(centerSphere(new Point(x, y), radius)); } @Deprecated public Criteria within(double x1, double y1, double x2, double y2) { return within(box(new Point(x1, y1), new Point(x2, y2))); }
199200201202203204205206
return criteria; } @Deprecated public T within(double x, double y, double radius) { within(center(new Point(x, y), radius)); return criteria; }
205206207208209210211212
return criteria; } @Deprecated public T within(double x, double y, double radius, boolean spherical) { within(centerSphere(new Point(x, y), radius)); return criteria; }
211212213214215216217218
return criteria; } @Deprecated public T within(double x1, double y1, double x2, double y2) { within(box(new Point(x1, y1), new Point(x2, y2))); return criteria; }
96979899100101102103104
getDs().ensureIndexes(); final Place place1 = new Place("place1", new double[]{1, 1}); getDs().save(place1); final Place found = getDs().find(Place.class) .field("loc") .within(Shape.center(new Point(0, 1), 1.1)) .get(); Assert.assertNotNull(found); }
109110111112113114115116117
getDs().ensureIndexes(); final Place place1 = new Place("place1", new double[]{1, 1}); getDs().save(place1); final Place found = getDs().find(Place.class) .field("loc") .within(Shape.center(new Point(0.5, 0.5), 0.77)) .get(); Assert.assertNotNull(found); }
122123124125126127128129130
135136137138139140141142143