public List < T > fetchList ( int limit ) throws SQLException , InstantiationException , IllegalAccessException { ArrayList < T > result = new ArrayList < T > ( ) ; if ( primitive ) { for ( int i = 0 ; i < limit ; i ++ ) { if ( ! finished ) { result . add ( fetchSingleInternal ( ) ) ; next ( ) ; } else { break ; } } } else { for ( int i = 0 ; i < limit ; i ++ ) { if ( ! finished ) { result . add ( fetchSingleInternal ( ) ) ; next ( ) ; } else { break ; } } } return result ; }
Fetches limited list of entities .