You ought to have told the
full details; it is very different to use Hibernate, which I don't know about.
I couldn't find a list() method in the
API index matching yours. It does seem peculiar that a method called list() returns an Iterator, rather than a "list". If "list" means java.util.List, that is an Iterable and you can get an Iterator for that.
ResultSet doesn't seem to have an isEmpty() method, but you can try declaring a
boolean isEmpty and you can set
isEmpty to
false inside the
while (rs.next())... loop.