T - the Location (sub)typepublic interface LocationService<T extends Location>
Location. It is able to return Locations in the proximity of the given GPS that
are sorted in terms of distances.| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteLocation(T location)
Delete the given IAddress from the collection of stored addresses
|
T |
getLocation(java.lang.String streetName,
java.lang.String streetNumber,
java.lang.String postalCode,
java.lang.String town,
java.lang.String countryCode,
boolean geocode)
Get temporary, non-persisted location
|
T |
getLocationByName(java.lang.String name)
Returns persisted Location by name
|
java.util.List<T> |
getLocationsForPoint(GPS gps,
int limitLocationsCount,
BaseStoreModel baseStore)
Method returns the nearest locations (points of interest) to the given coordinates, in the number adequate to user
definition.
|
java.util.List<T> |
getLocationsForPostcode(java.lang.String postalCode,
java.lang.String countryCode,
int limitLocationsCount,
BaseStoreModel baseStore)
Method looks for nearest locations (points of interest) to the place defined by postal code and country.
|
java.util.List<T> |
getLocationsForSearch(java.lang.String searchTerm,
java.lang.String countryCode,
int limitLocationsCount,
BaseStoreModel baseStore)
Method looks for nearby locations (points of interest) in the place defined by search term (that can be postal
code or town name) and country.
|
java.util.List<T> |
getLocationsForTown(java.lang.String town,
int limitLocationsCount,
BaseStoreModel baseStore)
Method looks for nearest locations (points of interest) to the place defined by city name.
|
java.util.List<T> |
getLocationsNearby(GPS gps,
double distance)
Get all known addresses which are located in the circle centered in the given gps location and a given radius
|
java.util.List<T> |
getLocationsNearby(GPS gps,
double distance,
BaseStoreModel baseStore)
Get all known addresses which are located in the circle centered in the given gps location and a given radius,
which belong to a given store
|
java.util.List<T> |
getSortedLocationsNearby(GPS gps,
double distance,
BaseStoreModel baseStore)
Returns list of sorted
DistanceAwareLocations. |
boolean |
saveOrUpdateLocation(T location)
Adds a new address or update existing one
|
java.util.List<T> getLocationsNearby(GPS gps, double distance)
gps - GPS coordinatesdistance - in kilometersjava.util.List<T> getLocationsNearby(GPS gps, double distance, BaseStoreModel baseStore)
gps - GPS coordinatesdistance - in kilometersbaseStore - base storeboolean saveOrUpdateLocation(T location)
location - GPS coordinatesboolean deleteLocation(T location)
location - GPS coordinatesT getLocationByName(java.lang.String name)
name - name of locationLocation matched by unique nameT getLocation(java.lang.String streetName, java.lang.String streetNumber, java.lang.String postalCode, java.lang.String town, java.lang.String countryCode, boolean geocode)
java.util.List<T> getLocationsForPoint(GPS gps, int limitLocationsCount, BaseStoreModel baseStore)
gps - coordinates of center pointlimitLocationsCount - number of POIs chosen by userbaseStore - if set, method will return locations bound to the given BaseStoreModeljava.util.List<T> getLocationsForSearch(java.lang.String searchTerm, java.lang.String countryCode, int limitLocationsCount, BaseStoreModel baseStore)
searchTerm - the search term - can be postal code or town namecountryCode - the country code - country code to look for (valid if given value is postal code)limitLocationsCount - number of locations to returnbaseStore - if set, method will return locations bound to the given BaseStoreModeljava.util.List<T> getLocationsForPostcode(java.lang.String postalCode, java.lang.String countryCode, int limitLocationsCount, BaseStoreModel baseStore)
postalCode - searching condition for locations - postal codecountryCode - searching condition for locations - country codelimitLocationsCount - number of locations to returnbaseStore - if set, method will return locations bound to the given BaseStoreModeljava.util.List<T> getLocationsForTown(java.lang.String town, int limitLocationsCount, BaseStoreModel baseStore)
town - searching condition for locationslimitLocationsCount - number of locations to returnbaseStore - if set, method will return locations bound to the given BaseStoreModeljava.util.List<T> getSortedLocationsNearby(GPS gps, double distance, BaseStoreModel baseStore)
DistanceAwareLocations. Sorting order is ascending - the closest locations come
first.gps - - reference location. Center.distance - - radius in [km]. The returned locations are contained in the square that the circle describes.baseStore - - if set, method will return locations bound to the given BaseStoreModelCopyright © 2018 SAP SE. All Rights Reserved.