Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoExecutionCourseOccupancy


    }

    public ActionForward showOccupancyLevels(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        InfoExecutionCourseOccupancy infoExecutionCourseOccupancy =
                ReadShiftsByExecutionCourseID.runReadShiftsByExecutionCourseID(request.getParameter("executionCourseOID"));

        arranjeShifts(infoExecutionCourseOccupancy);

        // Collections.sort(infoExecutionCourseOccupancy.getInfoShifts(), new
View Full Code Here


public class ReadShiftsByExecutionCourseID {

    protected InfoExecutionCourseOccupancy run(String executionCourseID) {

        final InfoExecutionCourseOccupancy infoExecutionCourseOccupancy = new InfoExecutionCourseOccupancy();
        infoExecutionCourseOccupancy.setInfoShifts(new ArrayList());

        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);
        final Set<Shift> shifts = executionCourse.getAssociatedShifts();

        infoExecutionCourseOccupancy.setInfoExecutionCourse(InfoExecutionCourse.newInfoFromDomain(executionCourse));

        for (final Shift shift : shifts) {
            Integer capacity = Integer.valueOf(1);
            if (shift.getLotacao() != null && shift.getLotacao().intValue() != 0) {
                capacity = shift.getLotacao();
            }

            final InfoShift infoShift = InfoShift.newInfoFromDomain(shift);

            infoExecutionCourseOccupancy.getInfoShifts().add(infoShift);
        }

        return infoExecutionCourseOccupancy;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.InfoExecutionCourseOccupancy

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.