DON'T: In the example, below, the call to listSize() is unnessary. In most cases, you shouldn't need to write something to loop over a collection:
if(query.listSize() > 0) {
while (iter.next()) { .... }
}
The call to listSize() will make an unnecessary call to "select count(*)". Let the iterator do the work. Avoid the extra call to the database.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Documentation build: 7.30.2019 15:44:44 [SDK_1564515884000]