/** * {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public List<Addresses> findFirstAndSecondRingNeighbourhood(String geohash) { Map<String, String> adjacentAreas = null; if (geohash != null && !geohash.isEmpty()) { adjacentAreas = GeoHashExtensions.getTwentyFiveAreasMap(geohash); } String hqlString = HqlStringCreator.getGeohashFirstAndSecondRingQuery(true); final Query query = getQuery(hqlString); for (Entry<String, String> entry : adjacentAreas.entrySet()) { query.setParameter(entry.getKey(), entry.getValue() + "%"); } List<Addresses> addresses = query.getResultList(); return addresses; }
if (geohash != null && !geohash.trim().isEmpty()) adjacentAreas = GeoHashExtensions.getTwentyFiveAreasMap(geohash);
if (geohash != null && !geohash.trim().isEmpty()) adjacentAreas = GeoHashExtensions.getTwentyFiveAreasMap(geohash);