Class MongodbExpressions


  • public final class MongodbExpressions
    extends java.lang.Object
    Mongodb specific operations
    Author:
    tiwe, sangyong choi
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​Q extends SimpleExpression<? super T>>
      BooleanExpression
      all​(ListPath<T,​Q> expr, java.util.Collection<T> params)
      Find documents where the value of a field is an array that contains all the specific elements.
      static BooleanExpression geoIntersects​(Expression<java.lang.Double[]> expr, double latVal, double longVal)
      Finds documents whose geospatial data intersects
      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
      static BooleanExpression withinBox​(Expression<java.lang.Double[]> expr, double blLongVal, double blLatVal, double urLongVal, double urLatVal)
      Finds points within bounds of the rectangle
      • 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
      • withinBox

        public static BooleanExpression withinBox​(Expression<java.lang.Double[]> expr,
                                                  double blLongVal,
                                                  double blLatVal,
                                                  double urLongVal,
                                                  double urLatVal)
        Finds points within bounds of the rectangle
        Parameters:
        blLatVal - bottom left latitude
        blLongVal - bottom left longitude
        urLatVal - upper right latitude
        urLongVal - upper right longitude
        Returns:
        predicate
      • geoIntersects

        public static BooleanExpression geoIntersects​(Expression<java.lang.Double[]> expr,
                                                      double latVal,
                                                      double longVal)
        Finds documents whose geospatial data intersects
        Parameters:
        expr - location
        latVal - latitude
        longVal - longitude
        Returns:
        predicate
      • all

        public static <T,​Q extends SimpleExpression<? super T>> BooleanExpression all​(ListPath<T,​Q> expr,
                                                                                            java.util.Collection<T> params)
        Find documents where the value of a field is an array that contains all the specific elements.
        Parameters:
        expr - expression
        params - params