Annotation Interface GeoPoint
@Retention(RUNTIME)
@Target({METHOD,FIELD,TYPE})
@Documented
@Repeatable(GeoPoint.GeoPoints.class)
@TypeMapping(processor=@TypeMappingAnnotationProcessorRef(type=GeoPointProcessor.class,retrieval=CONSTRUCTOR))
public @interface GeoPoint
Defines a
LatLng binding from a type or a property
to a LatLng field representing a point on earth.
If the longitude and latitude information is hosted on two different properties,
@GeoPoint must be used on the entity (class level).
The Latitude and Longitude annotations must mark the properties.
@GeoPoint(fieldName="home")
public class User {
@Latitude(fieldName="home")
public Double getHomeLatitude() { ... }
@Longitude(fieldName="home")
public Double getHomeLongitude() { ... }
}
More geo fields can be defined, using multiple GeoPoint annotations
having different field names.- Since:
- 15.1
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe name of the index field holding spatial information.booleanboolean
-
Element Details
-
fieldName
String fieldNameThe name of the index field holding spatial information.the name must be provided
- Returns:
- the field name
- Default:
""
-
projectable
boolean projectable- Returns:
- Whether projections are enabled for this field.
- See Also:
- Default:
false
-
sortable
boolean sortable- Returns:
- Whether this field should be sortable.
- See Also:
- Default:
false
-