code: private static Map<String, String> attributeCriterionToFilters(AttributeCriterion criterion) {
  		Map<String, String> filters = new LinkedHashMap<String, String>();
  		String filter = criterion.getAttributeName() + " " + criterion.getOperator() + " ";
  		if (criterion.getValue() != null
  				&& ((criterion.getValue().contains("\"") || criterion.getValue().contains(" ") || !criterion.getValue()
  						.matches("(\\.|\\-|[0-9])*")) || "LIKE".equalsIgnoreCase(criterion.getOperator()))
  				&& ((!"DURING".equals(criterion.getOperator().toUpperCase())
  						&& !"BEFORE".equals(criterion.getOperator().toUpperCase()) && !"AFTER".equals(criterion
  						.getOperator().toUpperCase())))) {
  			filter += "\'" + criterion.getValue().replaceAll("\\*", "%") + "\'";
  		} else {
  			filter += criterion.getValue();
  		}
  		filters.put(criterion.getServerLayerId(), filter);
  		return filters;
  	}
docs: ----------------------------------------------------------