Class MongodbExpressions


  • public final class MongodbExpressions
    extends java.lang.Object
    Mongodb Document-API-specific operations.
    Author:
    tiwe, Mark Paluch
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BooleanExpression near​(Expression<java.lang.Double[]> expr, double latVal, double longVal)
      Finds the closest points relative to the given location and orders the results with decreasing proximity
      static BooleanExpression nearSphere​(Expression<java.lang.Double[]> expr, double latVal, double longVal)
      Finds the closest points relative to the given location on a sphere and orders the results with decreasing proximity
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • near

        public static BooleanExpression near​(Expression<java.lang.Double[]> expr,
                                             double latVal,
                                             double longVal)
        Finds the closest points relative to the given location and orders the results with decreasing proximity
        Parameters:
        expr - location
        latVal - latitude
        longVal - longitude
        Returns:
        predicate
      • nearSphere

        public static BooleanExpression nearSphere​(Expression<java.lang.Double[]> expr,
                                                   double latVal,
                                                   double longVal)
        Finds the closest points relative to the given location on a sphere and orders the results with decreasing proximity
        Parameters:
        expr - location
        latVal - latitude
        longVal - longitude
        Returns:
        predicate