/** * Go to a location just before first result (this is the initial location) */ public void beforeFirst() throws HibernateException { try { getResultSet().beforeFirst(); } catch( SQLException e ) { throw JDBCExceptionHelper.convert( getSession().getFactory().getSQLExceptionConverter(), e, "exception calling beforeFirst()" ); } currentRow = null; currentPosition = 0; }
/** * Retreat to the previous result * * @return <tt>true</tt> if there is a previous result */ public boolean previous() throws HibernateException { if ( currentPosition <= 1 ) { currentPosition = 0; currentRow = null; return false; } Object loadResult = getLoader().loadSequentialRowsReverse( getResultSet(), getSession(), getQueryParameters(), false, ( maxPosition != null && currentPosition > maxPosition.intValue() ) ); currentRow = new Object[] { loadResult }; currentPosition--; afterScrollOperation(); return true; }
getResultSet(), getSession(), getQueryParameters(), afterLast = getResultSet().isAfterLast();
if ( getResultSet().isAfterLast() ) { while ( !getResultSet().isAfterLast() ) { more = next();