Package jpa.controllers

Examples of jpa.controllers.CoursesJpaController


       
        Integer userID;
        userID = Integer.valueOf(request.getParameter("userID"));
       
        // First generate a array list with maps containing courseIDs and their descriptions
        CoursesJpaController coursesJpaController = new CoursesJpaController();
        List<Integer> recommendedCourseIDList;

        RecommendationBean bean = new RecommendationBean();
        recommendedCourseIDList = bean.getRecommendedCoursesForUserID(userID);
       
        //********************************
       
        // Second generate an ArrayList consist of course objects
        ArrayList coursesMapList = new ArrayList();
        for (Iterator<Integer> it = recommendedCourseIDList.iterator(); it.hasNext();) {
            Integer courseID = it.next();           
            Courses course = coursesJpaController.findCourses(courseID);           
           
            Map courseMap = new HashMap();
            courseMap.put("courseID", new Integer(course.getCourseId()));
            courseMap.put("courseName", new String(course.getName()));
            coursesMapList.add(courseMap);
View Full Code Here


        Integer userID;
        userID = Integer.valueOf(request.getParameter("userID"));
            
       
        // 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();
        for (Iterator<Integer> it = searchedCourseIDList.iterator(); it.hasNext();) {
            Integer courseID = it.next();           
            Courses course = coursesJpaController.findCourses(courseID);           
           
            Map courseMap = new HashMap();
            courseMap.put("courseID", new Integer(course.getCourseId()));
            courseMap.put("courseName", new String(course.getName()));
            coursesMapList.add(courseMap);
View Full Code Here

        }
       
        //********************************
       
        // Third generate a array list with maps containing courseIDs and their descriptions
        CoursesJpaController coursesJpaController = new CoursesJpaController();
        ArrayList coursesMapList = new ArrayList();
        for (Iterator<Integer> it = courseIDList.iterator(); it.hasNext();) {
            Integer courseID = it.next();
            Courses course = coursesJpaController.findCourses(courseID);
           
            Map courseMap = new HashMap();
            courseMap.put("courseID", new Integer(courseID));
            courseMap.put("courseName", new String(course.getName()));
            coursesMapList.add(courseMap);
View Full Code Here

        }
       
        //********************************
       
        // Third get basic course details
        CoursesJpaController coursesJpaController = new CoursesJpaController();
        Courses course = coursesJpaController.findCourses(courseID);
       
        courseDetailMap.put("courseID", new Integer(courseID));
        courseDetailMap.put("courseName", new String(course.getName()));
        courseDetailMap.put("courseDescription", new String(course.getDescription()));
        courseDetailMap.put("courseCreatorName", new String(course.getCreaterUserId().getName()));
View Full Code Here

    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        if (value == null || value.length() == 0) {
            return null;
        }
        Integer id = new Integer(value);
        CoursesJpaController controller = (CoursesJpaController) context.getApplication().getELResolver().getValue(context.getELContext(), null, "coursesJpa");
        return controller.findCourses(id);
    }
View Full Code Here

TOP

Related Classes of jpa.controllers.CoursesJpaController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.