public ParameterMapping getStoredQueryParameterMapping(String parameterName) { ParameterMapping ret = null; if (this.config == null || this.config.getStoredQueryParameterMappings() == null) { return ret; } for (ParameterMapping sqpm : this.config.getStoredQueryParameterMappings()) { if (sqpm.getParameterName().equals(parameterName)) { ret = sqpm; break; } } return ret; }
public ParameterMapping getStoredQueryParameterMapping(String parameterName) { ParameterMapping ret = null; if (this.config == null || this.config.getStoredQueryParameterMappings() == null) { return ret; } for (ParameterMapping sqpm : this.config.getStoredQueryParameterMappings()) { if (sqpm.getParameterName().equals(parameterName)) { ret = sqpm; break; } } return ret; }
if (configuration.getStoredQueryParameterMappings() != null) { for (ParameterMapping pm : configuration.getStoredQueryParameterMappings()) { if (pm.getParameterName().equals(pet.getName())) { mapping = pm;
+ "',', strConCat(" + "numberFormat('0.00000000000', bboxMaxX), ',EPSG:4258')))))))"); mockConfiguration.getStoredQueryParameterMappings().add(param1); mockConfiguration.getStoredQueryParameterMappings().add(param2);
assertEquals(2, configuration.getStoredQueryParameterMappings().size()); assertEquals( ParameterMappingExpressionValue.class, configuration.getStoredQueryParameterMappings().get(0).getClass()); assertEquals( ParameterMappingDefaultValue.class, configuration.getStoredQueryParameterMappings().get(1).getClass()); configuration.getStoredQueryParameterMappings().get(0); assertEquals("bbox", map1.getParameterName()); assertEquals("CQL", map1.getExpressionLanguage()); configuration.getStoredQueryParameterMappings().get(1); assertEquals("timestep", map2.getParameterName()); assertEquals("720", map2.getDefaultValue());
static StoredQueryConfiguration createStoredQueryConfiguration( List<StoredQueryParameterAttribute> items, String storedQueryId) { StoredQueryConfiguration ret = new StoredQueryConfiguration(); ret.setStoredQueryId(storedQueryId); for (StoredQueryParameterAttribute i : items) { ParameterMapping mapping; String name = i.getParameterName(); switch (i.getMappingType()) { case BLOCKED: mapping = new ParameterMappingBlockValue(name); break; case DEFAULT: mapping = new ParameterMappingDefaultValue(name, false, i.getValue()); break; case STATIC: mapping = new ParameterMappingDefaultValue(name, true, i.getValue()); break; case EXPRESSION_CQL: mapping = new ParameterMappingExpressionValue(name, "CQL", i.getValue()); break; case NONE: default: mapping = null; } if (mapping != null) { ret.getStoredQueryParameterMappings().add(mapping); } } return ret; }