public boolean translatesFilter(Filter filter) {
return filter instanceof Like;
}
public String getWhereStringForFilter(Filter filter, StatementHelper sh) {
Like like = (Like) filter;
if (like.isCaseSensitive()) {
sh.addParameterValue(like.getValue());
return QueryBuilder.quote(like.getPropertyId()) + " LIKE ?";
} else {
sh.addParameterValue(like.getValue().toUpperCase());
return "UPPER(" + QueryBuilder.quote(like.getPropertyId())
+ ") LIKE ?";
}
}