FilterToSQL filterToSQL = dataStore.createFilterToSQL(null);
StringWriter w = new StringWriter();
filterToSQL.setWriter(w);
filterToSQL.visit(literal,type);
sql.append( w.getBuffer().toString() );
// if (CharSequence.class.isAssignableFrom(type)) {
// sql.append("'").append(value).append("'");
// } else {