Annotation Type GeoCoordinates
-
@Retention(RUNTIME) @Target({METHOD,FIELD,TYPE}) @Documented @Repeatable(List.class) @TypeMapping(processor=@TypeMappingAnnotationProcessorRef(type=GeoCoordinatesProcessor.class,retrieval=CONSTRUCTOR)) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=GeoCoordinatesProcessor.class,retrieval=CONSTRUCTOR)) public @interface GeoCoordinates
Defines aPoint
binding from a type or a property to aPoint
field representing a point on earth.If the longitude and latitude information is hosted on two different properties,
@GeoCoordinates
must be used on the entity (class level). TheLatitude
andLongitude
annotations must mark the properties.@GeoCoordinates(name="home") public class User { @Latitude public Double getHomeLatitude() { ... } @Longitude public Double getHomeLongitude() { ... } }
Alternatively,
@GeoCoordinates
can be used on a property of typePoint
:public class User { @GeoCoordinates public Point getHome() { ... } }
Infinispan version of
GeoPointBinding
- Since:
- 14.0
-
-
Element Detail
-
fieldName
String fieldName
The name of the index field holding spatial information.If
@Point
is hosted on a property, defaults to the property name. If@Point
is hosted on a class, the name must be provided.- Returns:
- the field name
- Default:
- ""
-
-
-
projectable
boolean projectable
- Returns:
- Whether projections are enabled for this field.
- See Also:
Basic.projectable()
- Default:
- false
-
-
-
sortable
boolean sortable
- Returns:
- Whether this field should be sortable.
- See Also:
Basic.sortable()
- Default:
- false
-
-