System.out
.println("Filtering on criteria " + key + "=" + value);
if (value != null
&& List.class.isAssignableFrom(value.getClass())) {
if (((List) value).size() > 0)
query.filter(key + " IN", value);
else
System.out.println("Ignoring criteria : " + key
+ " because it was an empty list");
} else
query.filter((String) key, value);