private List<TaskRecord> createRecordList(ResultSet rs,int offset,int limit) throws SQLException {
  List<TaskRecord> lst=new ArrayList<TaskRecord>();
  int i=0;
  while (rs.next()) {
    if (i >= offset && i < offset + limit)     lst.add(readTaskRecord(rs));
    i++;
  }
  return lst;
}

private List < TaskRecord > createRecordList ( ResultSet rs , int offset , int limit ) throws SQLException { List < TaskRecord > lst = new ArrayList < TaskRecord > ( ) ; int i = 0 ; while ( rs . next ( ) ) { if ( i >= offset && i < offset + limit ) lst . add ( readTaskRecord ( rs ) ) ; i ++ ; } return lst ; }
creates a list of taskrecord objects from a databse result set
