use of eu.esdihumboldt.hale.common.core.io.project.ProjectVariableReplacer in project hale by halestudio.
the class JDBCUtil method replaceVariables.
/**
* Replace variables in an SQL query.
*
* @param query the query
* @param services the service provider
* @return the query with variables replaced
*/
public static String replaceVariables(String query, ServiceProvider services) {
if (services != null) {
ProjectInfoService projectInfo = services.getService(ProjectInfoService.class);
ProjectVariableReplacer replacer = new ProjectVariableReplacer(projectInfo);
return replacer.replaceVariables(query, true);
}
return query;
}
Aggregations