Package com.darkhonor.rage.model

Examples of com.darkhonor.rage.model.Instructor.addSection()


        EntityTransaction tx = em.getTransaction();
        Section dbSection = em.find(Section.class, section.getId());
        Course dbCourse = em.find(Course.class, section.getCourse().getId());
        Instructor dbInstructor = em.find(Instructor.class, instructor.getId());
        dbSection.setInstructor(dbInstructor);
        dbInstructor.addSection(dbSection);
        if (dbCourse.getInstructors().contains(dbInstructor))
        {
            LOGGER.warn("Instructor already in the course");
        } else
        {
View Full Code Here


                            instructors.get(instructorIndex).addSection(sections.get(sectionIndex));
                            sections.get(sectionIndex).setInstructor(instructors.get(instructorIndex));
                        } else
                        {
                            LOGGER.debug("Instructor is not in system");
                            instructor.addSection(sections.get(sectionIndex));
                            instructors.add(instructor);
                            sections.get(sectionIndex).setInstructor(instructor);
                        }
                        LOGGER.debug(instructor.getFirstName() + " "
                                + instructor.getLastName() + " teaches Section "
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.