public synchronized boolean hasNext ( ) { try { if ( ! isHasCalledCheck ( ) ) { setHasCalledCheck ( true ) ; setHasNext ( getRsAndStmt ( ) . m_rs . next ( ) ) ; if ( ! getHasNext ( ) ) { autoReleaseDbResources ( ) ; } } } catch ( Exception ex ) { setHasNext ( false ) ; autoReleaseDbResources ( ) ; if ( ex instanceof ResourceClosedException ) { throw ( ResourceClosedException ) ex ; } if ( ex instanceof SQLException ) { throw new PersistenceBrokerSQLException ( "Calling ResultSet.next() failed" , ( SQLException ) ex ) ; } else { throw new PersistenceBrokerException ( "Can't get next row from ResultSet" , ex ) ; } } if ( logger . isDebugEnabled ( ) ) logger . debug ( "hasNext() -> " + getHasNext ( ) ) ; return getHasNext ( ) ; }
returns true if there are still more rows in the underlying ResultSet . Returns false if ResultSet is exhausted .