Package dev.morphia.query
Class Shape
- java.lang.Object
-
- dev.morphia.query.Shape
-
- Direct Known Subclasses:
Shape.Center
@Deprecated(since="2.0", forRemoval=true) public class Shape extends Object
Deprecated, for removal: This API element is subject to removal in a future version.use the driver provide facilities instead.This encapsulates the data necessary to define a shape for queries.- See Also:
Filters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Shape.Center
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Shape
box(com.mongodb.client.model.geojson.Point bottomLeft, com.mongodb.client.model.geojson.Point upperRight)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a rectangle for a geospatial $geoWithin query to return documents that are within the bounds of the rectangle, according to their point-based location data.static Shape
center(com.mongodb.client.model.geojson.Point center, double radius)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a circle for a $geoWithin query.static Shape
centerSphere(com.mongodb.client.model.geojson.Point center, double radius)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a circle for a geospatial query that uses spherical geometry.String
getGeometry()
Deprecated, for removal: This API element is subject to removal in a future version.com.mongodb.client.model.geojson.Point[]
getPoints()
Deprecated, for removal: This API element is subject to removal in a future version.static Shape
polygon(com.mongodb.client.model.geojson.Point... points)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a polygon for a geospatial $geoWithin query on legacy coordinate pairs.
-
-
-
Method Detail
-
box
public static Shape box(com.mongodb.client.model.geojson.Point bottomLeft, com.mongodb.client.model.geojson.Point upperRight)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a rectangle for a geospatial $geoWithin query to return documents that are within the bounds of the rectangle, according to their point-based location data.- Parameters:
bottomLeft
- the bottom left boundupperRight
- the upper right bound- Returns:
- the box
- MongoDB documentation
- $box
- $geoWithin
-
center
public static Shape center(com.mongodb.client.model.geojson.Point center, double radius)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a circle for a $geoWithin query.- Parameters:
center
- the center of the circleradius
- the radius circle- Returns:
- the box
- MongoDB documentation
- $center
- $geoWithin
-
centerSphere
public static Shape centerSphere(com.mongodb.client.model.geojson.Point center, double radius)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a circle for a geospatial query that uses spherical geometry.- Parameters:
center
- the center of the circleradius
- the radius circle- Returns:
- the box
- MongoDB documentation
- $centerSphere
-
polygon
public static Shape polygon(com.mongodb.client.model.geojson.Point... points)
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a polygon for a geospatial $geoWithin query on legacy coordinate pairs.- Parameters:
points
- the points of the polygon- Returns:
- the box
- MongoDB documentation
- $polygon
- $geoWithin
-
getGeometry
public String getGeometry()
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- the geometry of the shape
-
getPoints
public com.mongodb.client.model.geojson.Point[] getPoints()
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- the points of the shape
-
-