use of org.jumpmind.symmetric.config.IParameterFilter in project symmetric-ds by JumpMind.
the class ParameterService method readParametersFromDatabase.
protected TypedProperties readParametersFromDatabase(String sqlKey, Object... values) {
final TypedProperties properties = new TypedProperties();
final IParameterFilter filter = extensionService != null ? extensionService.getExtensionPoint(IParameterFilter.class) : null;
sqlTemplate.query(sql.getSql(sqlKey), new ISqlRowMapper<Object>() {
public Object mapRow(Row row) {
String key = row.getString("param_key");
String value = row.getString("param_value");
if (filter != null) {
value = filter.filterParameter(key, value);
}
if (value != null) {
properties.setProperty(key, value);
}
return row;
}
}, values);
return properties;
}
Aggregations