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 aGeoPointbinding from a type or a property to aGeoPointfield representing a point on earth.If the longitude and latitude information is hosted on two different properties,
@GeoPointBindingmust be used on the entity (class level). TheLatitudeandLongitudeannotations must mark the properties.@GeoPointBinding(name="home") public class User { @Latitude public Double getHomeLatitude() { ... } @Longitude public Double getHomeLongitude() { ... } }Alternatively,
@GeoPointBindingcan 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 StringfieldNameThe name of the index field holding spatial information.StringmarkerSetProjectableprojectableSortablesortable
-
-
-
Element Detail
-
fieldName
String fieldName
The name of the index field holding spatial information. If@GeoPointis hosted on a property, defaults to the property name. If@GeoPointis hosted on a class, the name must be provided.- Returns:
- the field name
- Default:
- ""
-
-
-
projectable
Projectable projectable
- Returns:
- Returns an instance of the
Projectableenum, indicating whether projections are enabled for this field. Defaults toProjectable.DEFAULT.
- Default:
- org.hibernate.search.engine.backend.types.Projectable.DEFAULT
-
-