Package org.mongodb.morphia.query.Shape

Examples of org.mongodb.morphia.query.Shape.Point


    return query.criteria(fieldName).within(shape);
  }

  @Deprecated
  public Criteria within(double x, double y, double radius) {
    return within(center(new Point(x, y), radius));
  }
View Full Code Here


    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));
  }
View Full Code Here

    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)));
  }
View Full Code Here

    return criteria;
  }

  @Deprecated
  public T within(double x, double y, double radius) {
    within(center(new Point(x, y), radius));
    return criteria;
  }
View Full Code Here

    return criteria;
  }

  @Deprecated
  public T within(double x, double y, double radius, boolean spherical) {
    within(centerSphere(new Point(x, y), radius));
    return criteria;
  }
View Full Code Here

    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;
  }
View Full Code Here

        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);
    }
View Full Code Here

        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);
    }
View Full Code Here

        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);
    }
View Full Code Here

        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);
    }
View Full Code Here

TOP

Related Classes of org.mongodb.morphia.query.Shape.Point

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.