I made this method:
@SuppressWarnings("rawtypes")
public static boolean hasItems(Query query) {
Iterator it = query.iterator();
return it.hasNext();
}
I'm using it to define, if there is at least one element on the query without using count(). Still would like to know how can I use count() and how can not...