Package com.querydsl.mongodb
Class MongodbExpressions
java.lang.Object
com.querydsl.mongodb.MongodbExpressions
Mongodb specific operations
- Author:
- tiwe, sangyong choi
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,Q extends SimpleExpression<? super T>>
BooleanExpressionall(ListPath<T, Q> expr, Collection<T> params) Find documents where the value of a field is an array that contains all the specific elements.static BooleanExpressiongeoIntersects(Expression<Double[]> expr, double latVal, double longVal) Finds documents whose geospatial data intersectsstatic BooleanExpressionnear(Expression<Double[]> expr, double latVal, double longVal) Finds the closest points relative to the given location and orders the results with decreasing proximitystatic BooleanExpressionnearSphere(Expression<Double[]> expr, double latVal, double longVal) Finds the closest points relative to the given location on a sphere and orders the results with decreasing proximitystatic BooleanExpressionwithinBox(Expression<Double[]> expr, double blLongVal, double blLatVal, double urLongVal, double urLatVal) Finds points within bounds of the rectangle
-
Method Details
-
near
Finds the closest points relative to the given location and orders the results with decreasing proximity- Parameters:
expr- locationlatVal- latitudelongVal- longitude- Returns:
- predicate
-
nearSphere
public static BooleanExpression nearSphere(Expression<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- locationlatVal- latitudelongVal- longitude- Returns:
- predicate
-
withinBox
public static BooleanExpression withinBox(Expression<Double[]> expr, double blLongVal, double blLatVal, double urLongVal, double urLatVal) Finds points within bounds of the rectangle- Parameters:
blLatVal- bottom left latitudeblLongVal- bottom left longitudeurLatVal- upper right latitudeurLongVal- upper right longitude- Returns:
- predicate
-
geoIntersects
public static BooleanExpression geoIntersects(Expression<Double[]> expr, double latVal, double longVal) Finds documents whose geospatial data intersects- Parameters:
expr- locationlatVal- latitudelongVal- longitude- Returns:
- predicate
-
all
public static <T,Q extends SimpleExpression<? super T>> BooleanExpression all(ListPath<T, Q> expr, Collection<T> params) Find documents where the value of a field is an array that contains all the specific elements.- Parameters:
expr- expressionparams- params
-