Annotation Type GeoPointBinding
-
@Retention(RUNTIME) @Target({METHOD,FIELD,TYPE}) @Documented @Repeatable(List.class) @TypeMapping(processor=@TypeMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.bridge.builtin.annotation.processor.impl.GeoPointBindingProcessor.class,retrieval=CONSTRUCTOR)) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.bridge.builtin.annotation.processor.impl.GeoPointBindingProcessor.class,retrieval=CONSTRUCTOR)) public @interface GeoPointBinding
Defines aGeoPoint
binding from a type or a property to aGeoPoint
field representing a point on earth.If the longitude and latitude information is hosted on two different properties,
@GeoPointBinding
must be used on the entity (class level). TheLatitude
andLongitude
annotations must mark the properties.@GeoPointBinding(name="home") public class User { @Latitude public Double getHomeLatitude() { ... } @Longitude public Double getHomeLongitude() { ... } }
Alternatively,
@GeoPointBinding
can be used on a type that implementsGeoPoint
:@GeoPointBinding(name="location") public class Home implements GeoPoint { @Override public Double getLatitude() { ... } @Override public Double getLongitude() { ... } }
... or on a property of type
GeoPoint
:public class User { @GeoPointBinding public GeoPoint getHome() { ... } }
- Author:
- Nicolas Helleringer
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
fieldName
The name of the index field holding spatial information.String
markerSet
Projectable
projectable
Sortable
sortable
-
-
-
Element Detail
-
fieldName
String fieldName
The name of the index field holding spatial information. If@GeoPoint
is hosted on a property, defaults to the property name. If@GeoPoint
is hosted on a class, the name must be provided.- Returns:
- the field name
- Default:
- ""
-
-
-
projectable
Projectable projectable
- Returns:
- Returns an instance of the
Projectable
enum, indicating whether projections are enabled for this field. Defaults toProjectable.DEFAULT
.
- Default:
- org.hibernate.search.engine.backend.types.Projectable.DEFAULT
-
-