@Retention(value=RUNTIME) @Target(value={METHOD,FIELD,TYPE}) @Documented @Repeatable(value=GeoPointBinding.List.class) @TypeMapping(processor=@TypeMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.bridge.builtin.annotation.processor.impl.GeoPointBindingProcessor.class)) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.bridge.builtin.annotation.processor.impl.GeoPointBindingProcessor.class)) public @interface GeoPointBinding
GeoPoint binding from a type or a property
to a GeoPoint 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).
The Latitude and Longitude 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 implements GeoPoint:
@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() { ... }
}
| Modifier and Type | Optional Element and Description |
|---|---|
String |
fieldName
The name of the index field holding spatial information.
|
String |
markerSet |
Projectable |
projectable |
Sortable |
sortable |
public abstract String fieldName
@GeoPoint is hosted on a property, defaults to the property name.
If @GeoPoint is hosted on a class, the name must be provided.public abstract Projectable projectable
Projectable enum, indicating whether projections are enabled for this
field. Defaults to Projectable.DEFAULT.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.