class SqlTranslator implements ISqlTranslator {

	@Override
	public String translate(String original) {
		String query = original;
		if (sources!=null) {
			for (String label:sources.keySet()) {
				Matcher matcher = sources.get(label).matcher(query);
				if (matcher.find()) {
					if (log.isTraceEnabled()) log.trace(String.format("Found a match for label [%s] pattern [%s]",label, sources.get(label)));
					String replacement = targets.get(label);
					if (StringUtils.isNotEmpty(replacement)) {
						query = matcher.replaceAll(replacement);
					} else {
						query = matcher.replaceAll("");
					}
				}
			}
		}
		if (StringUtils.isEmpty(query)) {
			return null;
		}
		return query;
	}

	public  SqlTranslator(String source, String target);

}