Annotation Interface 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 a Point binding from a type or a property to a Point 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). The Latitude and Longitude 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 type Point:


 public class User {
     @GeoCoordinates
     public Point getHome() { ... }
 }
 

Infinispan version of GeoPointBinding

Since:
14.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the index field holding spatial information.
     
    boolean
     
    boolean
     
  • Element Details

    • 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:
      Default:
      false
    • sortable

      boolean sortable
      Returns:
      Whether this field should be sortable.
      See Also:
      Default:
      false
    • marker

      String marker
      Returns:
      The name of the marker this spatial should look into when looking for the Latitude and Longitude markers.
      Default:
      ""