// First generate a array list with maps containing courseIDs and their descriptions
CoursesJpaController coursesJpaController = new CoursesJpaController();
List<Integer> searchedCourseIDList;
SearchBean bean = new SearchBean();
searchedCourseIDList = bean.getSearchedCoursesForSearchKeyAndUserID(key, userID);
//********************************
// Second generate an ArrayList consist of course objects
ArrayList coursesMapList = new ArrayList();