@Test(expected = NumberFormatException.class) public void buildInvalidPointGeometry() { RequestHelper.parseSpatialSearchParams(new HashMap<String, String[]>() { { put("g", new String[]{"POINT(bla blah)"}); } }); }
public static List<LatLng> parseSpatialSearchParams(Map<String, String[]> parameterMap) { ArrayList<LatLng> latLngs = new ArrayList<LatLng>(); addBoundingBox(parameterMap, latLngs); if (hasNoSpatialParams(latLngs)) { addPointGeometry(parameterMap, latLngs); } if (hasNoSpatialParams(latLngs)) { addPoints(parameterMap, latLngs, POINT_PARAM); } return latLngs; }
RequestHelper { public static List<LatLng> parseSpatialSearchParams(Map<String, String[]> parameterMap) { ArrayList<LatLng> latLngs = new ArrayList<LatLng>(); addBoundingBox(parameterMap, latLngs); if (hasNoSpatialParams(latLngs)) { addPointGeometry(parameterMap, latLngs); } if (hasNoSpatialParams(latLngs)) { addPoints(parameterMap, latLngs, POINT_PARAM); } return latLngs; } }
RequestHelper { public static List<LatLng> parseSpatialSearchParams(Map<String, String[]> parameterMap) { ArrayList<LatLng> latLngs = new ArrayList<LatLng>(); addBoundingBox(parameterMap, latLngs); if (hasNoSpatialParams(latLngs)) { addPointGeometry(parameterMap, latLngs); } if (hasNoSpatialParams(latLngs)) { addPoints(parameterMap, latLngs, POINT_PARAM); } return latLngs; }  }
RequestHelper { public static List<LatLng> parseSpatialSearchParams(Map<String, String[]> parameterMap) { ArrayList<LatLng> latLngs = new ArrayList<LatLng>(); addBoundingBox(parameterMap, latLngs); if (hasNoSpatialParams(latLngs)) { addPointGeometry(parameterMap, latLngs); } if (hasNoSpatialParams(latLngs)) { addPoints(parameterMap, latLngs, POINT_PARAM); } return latLngs; }  static boolean isSpatialSearch(Map<String, String[]> parameterMap); static List<LatLng> parseSpatialSearchParams(Map<String, String[]> parameterMap); static void appendSpatialClauses(Map<String, String[]> paramMap, StringBuilder query, QueryType queryType); static void addSpatialClause(List<LatLng> points, StringBuilder query, QueryType queryType); static void addSpatialWhereClause(List<LatLng> points, StringBuilder query); static JsonNode parse(String content); static boolean emptyData(String body); static boolean nonEmptyData(String body); }
RequestHelper { public static List<LatLng> parseSpatialSearchParams(Map<String, String[]> parameterMap) { ArrayList<LatLng> latLngs = new ArrayList<LatLng>(); addBoundingBox(parameterMap, latLngs); if (hasNoSpatialParams(latLngs)) { addPointGeometry(parameterMap, latLngs); } if (hasNoSpatialParams(latLngs)) { addPoints(parameterMap, latLngs, POINT_PARAM); } return latLngs; }  static boolean isSpatialSearch(Map<String, String[]> parameterMap); static List<LatLng> parseSpatialSearchParams(Map<String, String[]> parameterMap); static void appendSpatialClauses(Map<String, String[]> paramMap, StringBuilder query, QueryType queryType); static void addSpatialClause(List<LatLng> points, StringBuilder query, QueryType queryType); static void addSpatialWhereClause(List<LatLng> points, StringBuilder query); static JsonNode parse(String content); static boolean emptyData(String body); static boolean nonEmptyData(String body); static final String BOUNDING_BOX_PARAMETER_NAME; static final String GEOMETRY_PARAMETER; }