ITEM - distance to point of servicepublic class DefaultStoreFinderService<ITEM extends PointOfServiceDistanceData> extends java.lang.Object implements StoreFinderService<ITEM,StoreFinderSearchPageData<ITEM>>
StoreFinderService| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultStoreFinderService.Boundary<T> |
static class |
DefaultStoreFinderService.StoreFinderResultDataComparator |
| Constructor and Description |
|---|
DefaultStoreFinderService() |
| Modifier and Type | Method and Description |
|---|---|
protected DefaultStoreFinderService.Boundary<GeoPoint> |
calculateBounds(java.util.List<ITEM> results,
GeoPoint centerPoint) |
protected double |
calculateDistance(GeoPoint centerPoint,
PointOfServiceModel posModel) |
protected java.util.List<ITEM> |
calculateDistances(GeoPoint centerPoint,
java.util.Collection<PointOfServiceModel> pointsOfService) |
protected PaginationData |
createPagination(PageableData pageableData,
long totalNumberOfResults) |
protected PaginationData |
createPaginationData() |
protected StoreFinderSearchPageData<ITEM> |
createSearchResult(java.lang.String locationText,
GeoPoint centerPoint,
java.util.List<ITEM> results,
PaginationData paginationData) |
protected ITEM |
createStoreFinderResultData() |
protected StoreFinderSearchPageData<ITEM> |
createStoreFinderSearchPageData() |
protected StoreFinderSearchPageData<ITEM> |
doSearch(BaseStoreModel baseStore,
java.lang.String locationText,
GeoPoint centerPoint,
PageableData pageableData,
java.lang.Double maxRadiusKm) |
protected AddressData |
generateGeoAddressForSearchQuery(BaseStoreModel baseStore,
java.lang.String locationText)
This method generates an
AddressData object based on a search location text. |
StoreFinderSearchPageData<ITEM> |
getAllPos(BaseStoreModel baseStore,
PageableData pageableData)
Gets the locations retrieved basing on the given arguments.
|
protected GeoWebServiceWrapper |
getGeoWebServiceWrapper() |
protected PointOfServiceDao |
getPointOfServiceDao() |
ITEM |
getPointOfServiceDistanceForName(BaseStoreModel baseStore,
java.lang.String name,
GeoPoint geoPoint)
Gets the location for the given name that should be unique.
|
PointOfServiceModel |
getPointOfServiceForName(BaseStoreModel baseStore,
java.lang.String name)
Gets the
PointOfServiceModel for the given name that should be unique |
protected GenericDao<PointOfServiceModel> |
getPointOfServiceGenericDao() |
protected PagedGenericDao<PointOfServiceModel> |
getPointOfServicePagedGenericDao() |
protected java.util.Collection<PointOfServiceModel> |
getPointsOfServiceNear(GeoPoint centerPoint,
double radiusKm,
BaseStoreModel baseStore) |
StoreFinderSearchPageData<ITEM> |
locationSearch(BaseStoreModel baseStore,
java.lang.String locationText,
PageableData pageableData)
Gets the locations retrieved based on the given arguments.
|
StoreFinderSearchPageData<ITEM> |
locationSearch(BaseStoreModel baseStore,
java.lang.String locationText,
PageableData pageableData,
double maxRadiusKm)
Gets the locations retrieved based on the given arguments.
|
StoreFinderSearchPageData<ITEM> |
positionSearch(BaseStoreModel baseStore,
GeoPoint geoPoint,
PageableData pageableData)
Gets the locations retrieved basing on the given arguments.
|
StoreFinderSearchPageData<ITEM> |
positionSearch(BaseStoreModel baseStore,
GeoPoint geoPoint,
PageableData pageableData,
double maxRadius)
Gets the locations retrieved basing on the given arguments.
|
protected DefaultStoreFinderService.Boundary<java.lang.Double> |
recalculateSpanAgainstCenter(double leftBorder,
double rightBorder,
double centerPosition) |
void |
setGeoWebServiceWrapper(GeoWebServiceWrapper geoWebServiceWrapper) |
void |
setPointOfServiceDao(PointOfServiceDao pointOfServiceDao) |
void |
setPointOfServiceGenericDao(GenericDao<PointOfServiceModel> pointOfServiceGenericDao) |
void |
setPointOfServicePagedGenericDao(PagedGenericDao<PointOfServiceModel> pointOfServicePagedGenericDao) |
protected GenericDao<PointOfServiceModel> getPointOfServiceGenericDao()
public void setPointOfServiceGenericDao(GenericDao<PointOfServiceModel> pointOfServiceGenericDao)
protected PointOfServiceDao getPointOfServiceDao()
public void setPointOfServiceDao(PointOfServiceDao pointOfServiceDao)
protected GeoWebServiceWrapper getGeoWebServiceWrapper()
public void setGeoWebServiceWrapper(GeoWebServiceWrapper geoWebServiceWrapper)
protected PagedGenericDao<PointOfServiceModel> getPointOfServicePagedGenericDao()
public void setPointOfServicePagedGenericDao(PagedGenericDao<PointOfServiceModel> pointOfServicePagedGenericDao)
public StoreFinderSearchPageData<ITEM> locationSearch(BaseStoreModel baseStore, java.lang.String locationText, PageableData pageableData)
StoreFinderServicelocationSearch in interface StoreFinderService<ITEM extends PointOfServiceDistanceData,StoreFinderSearchPageData<ITEM extends PointOfServiceDistanceData>>baseStore - BaseStoreModel instance that returned locations belongs tolocationText - text that will be used for locations searchpageableData - PageableData object that contains basing information for search result setpublic StoreFinderSearchPageData<ITEM> locationSearch(BaseStoreModel baseStore, java.lang.String locationText, PageableData pageableData, double maxRadiusKm)
StoreFinderServicelocationSearch in interface StoreFinderService<ITEM extends PointOfServiceDistanceData,StoreFinderSearchPageData<ITEM extends PointOfServiceDistanceData>>baseStore - BaseStoreModel instance that returned locations belongs tolocationText - text that will be used for locations searchpageableData - PageableData object that contains basing information for search result setmaxRadiusKm - the maximum radius from the location that results should be returned for.public StoreFinderSearchPageData<ITEM> positionSearch(BaseStoreModel baseStore, GeoPoint geoPoint, PageableData pageableData)
StoreFinderServicepositionSearch in interface StoreFinderService<ITEM extends PointOfServiceDistanceData,StoreFinderSearchPageData<ITEM extends PointOfServiceDistanceData>>baseStore - BaseStoreModel instance that returned locations belongs togeoPoint - geographical point that search is performed forpageableData - PageableData object that contains basing information for search result setpublic StoreFinderSearchPageData<ITEM> positionSearch(BaseStoreModel baseStore, GeoPoint geoPoint, PageableData pageableData, double maxRadius)
StoreFinderServicepositionSearch in interface StoreFinderService<ITEM extends PointOfServiceDistanceData,StoreFinderSearchPageData<ITEM extends PointOfServiceDistanceData>>baseStore - BaseStoreModel instance that returned locations belongs togeoPoint - geographical point that search is performed forpageableData - PageableData object that contains basing information for search result setmaxRadius - the maximum radius from the location that results should be returned for.public PointOfServiceModel getPointOfServiceForName(BaseStoreModel baseStore, java.lang.String name)
StoreFinderServicePointOfServiceModel for the given name that should be uniquegetPointOfServiceForName in interface StoreFinderService<ITEM extends PointOfServiceDistanceData,StoreFinderSearchPageData<ITEM extends PointOfServiceDistanceData>>baseStore - BaseStoreModel instance that returned location belongs toname - the requested point of service namePointOfServiceModel for the given parameterpublic ITEM getPointOfServiceDistanceForName(BaseStoreModel baseStore, java.lang.String name, GeoPoint geoPoint)
StoreFinderServicegetPointOfServiceDistanceForName in interface StoreFinderService<ITEM extends PointOfServiceDistanceData,StoreFinderSearchPageData<ITEM extends PointOfServiceDistanceData>>baseStore - BaseStoreModel instance that returned location belongs toname - name of the requested point of servicegeoPoint - geographical point of the origin pointpublic StoreFinderSearchPageData<ITEM> getAllPos(BaseStoreModel baseStore, PageableData pageableData)
StoreFinderServicegetAllPos in interface StoreFinderService<ITEM extends PointOfServiceDistanceData,StoreFinderSearchPageData<ITEM extends PointOfServiceDistanceData>>baseStore - BaseStoreModel instance that returned locations belongs topageableData - PageableData object that contains basing information for search result setprotected AddressData generateGeoAddressForSearchQuery(BaseStoreModel baseStore, java.lang.String locationText)
AddressData object based on a search location text. It sets country to the
AddressData object from the first POS country in the list of base store POS. Adding the country to the
AddressData object will help to narrow the search region. It must be noted however that the country is
only set if the search text does not contains any comma separators whose presence indicates that the user is
attempting to enter multiple fields, post code, country, etc in an attempt to narrow the search area.baseStore - - the base store for the current site.locationText - - the search location text to base the search upon.AddressData object.protected StoreFinderSearchPageData<ITEM> doSearch(BaseStoreModel baseStore, java.lang.String locationText, GeoPoint centerPoint, PageableData pageableData, java.lang.Double maxRadiusKm)
protected PaginationData createPagination(PageableData pageableData, long totalNumberOfResults)
protected StoreFinderSearchPageData<ITEM> createSearchResult(java.lang.String locationText, GeoPoint centerPoint, java.util.List<ITEM> results, PaginationData paginationData)
protected DefaultStoreFinderService.Boundary<GeoPoint> calculateBounds(java.util.List<ITEM> results, GeoPoint centerPoint)
protected DefaultStoreFinderService.Boundary<java.lang.Double> recalculateSpanAgainstCenter(double leftBorder, double rightBorder, double centerPosition) throws GeoLocatorException
GeoLocatorExceptionprotected java.util.Collection<PointOfServiceModel> getPointsOfServiceNear(GeoPoint centerPoint, double radiusKm, BaseStoreModel baseStore) throws PointOfServiceDaoException
PointOfServiceDaoExceptionprotected java.util.List<ITEM> calculateDistances(GeoPoint centerPoint, java.util.Collection<PointOfServiceModel> pointsOfService)
protected double calculateDistance(GeoPoint centerPoint, PointOfServiceModel posModel) throws GeoLocatorException, LocationServiceException
protected StoreFinderSearchPageData<ITEM> createStoreFinderSearchPageData()
protected ITEM createStoreFinderResultData()
protected PaginationData createPaginationData()
Copyright © 2018 SAP SE. All Rights Reserved.