code: public <T> List<T> query(String sql, RowMapper<T> rowMapper) throws SQLException{
  		if (logger.isDebugEnabled()) {
  			logger.debug("Executing SQL statement [" + sql + "]");
  		}
  		
  		Connection connection = null;
  		Statement stm = null;
  		ResultSet rs = null;
  		
  		ArrayList<T> result = new ArrayList<T>();
  		
  		try{
  			connection = ds.getConnection();
  			stm = connection.createStatement();			
  			rs = stm.executeQuery(sql);
  			
  			while(rs.next()){
  				result.add( rowMapper.map(rs) );
  			}
  			
  		} catch (SQLException e) {
  			throw e;
  		}finally{
  			if(rs!=null) rs.close();
  			if(stm!=null) stm.close();
  			if(connection!=null) connection.close();			
  		}
  		
  		return result;
  	}
docs: Return a list of objects obtained applying the given {@link RowMapper} to each record.
  @return	A not null empty list when the result set is empty.
  @throws SQLException