Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoSiteGroupsByShift


                infoSiteShift.setNrOfGroups(Integer.valueOf(vagas));
            } else {
                infoSiteShift.setNrOfGroups("Sem limite");
            }
        }
        InfoSiteGroupsByShift infoSiteGroupsByShift = new InfoSiteGroupsByShift();
        infoSiteGroupsByShift.setInfoSiteShift(infoSiteShift);

        List<InfoSiteStudentGroup> infoSiteStudentGroupsList = null;
        if (allStudentGroups.size() != 0) {
            infoSiteStudentGroupsList = new ArrayList<InfoSiteStudentGroup>();
            Iterator iterGroups = allStudentGroups.iterator();
            while (iterGroups.hasNext()) {
                InfoSiteStudentGroup infoSiteStudentGroup = new InfoSiteStudentGroup();
                InfoStudentGroup infoStudentGroup = new InfoStudentGroup();
                infoStudentGroup = InfoStudentGroup.newInfoFromDomain((StudentGroup) iterGroups.next());
                infoSiteStudentGroup.setInfoStudentGroup(infoStudentGroup);
                infoSiteStudentGroupsList.add(infoSiteStudentGroup);
            }
            Collections.sort(infoSiteStudentGroupsList, InfoSiteStudentGroup.COMPARATOR_BY_NUMBER);
        }
        infoSiteGroupsByShift.setInfoSiteStudentGroupsList(infoSiteStudentGroupsList);

        infoSiteGroupsByShiftList.add(infoSiteGroupsByShift);
        infoSiteShiftsAndGroups.setInfoSiteGroupsByShiftList(infoSiteGroupsByShiftList);

        return infoSiteShiftsAndGroups;
View Full Code Here


        return infoSiteShiftsAndGroups;

    }

    private static InfoSiteGroupsByShift createInfoSiteGroupByShift(final Shift shift, final Grouping grouping) {
        final InfoSiteGroupsByShift infoSiteGroupsByShift = new InfoSiteGroupsByShift();

        final InfoSiteShift infoSiteShift = new InfoSiteShift();
        infoSiteGroupsByShift.setInfoSiteShift(infoSiteShift);
        infoSiteShift.setInfoShift(InfoShift.newInfoFromDomain(shift));
        Collections.sort(infoSiteShift.getInfoShift().getInfoLessons());
        final List<StudentGroup> studentGroups = grouping.readAllStudentGroupsBy(shift);
        Integer capacity;
        if (grouping.getDifferentiatedCapacity()) {
            if (shift.getShiftGroupingProperties() == null) {
                new ShiftGroupingProperties(shift, grouping, 0);
            }
            capacity = shift.getShiftGroupingProperties().getCapacity();
        } else {
            capacity = grouping.getGroupMaximumNumber();
        }
        infoSiteShift.setNrOfGroups(calculateVacancies(capacity, studentGroups.size()));

        infoSiteGroupsByShift.setInfoSiteStudentGroupsList(createInfoStudentGroupsList(studentGroups));

        return infoSiteGroupsByShift;
    }
View Full Code Here

        return infoSiteGroupsByShift;
    }

    private static InfoSiteGroupsByShift createInfoSiteGroupByShift(final Grouping grouping) {
        final InfoSiteGroupsByShift infoSiteGroupsByShift = new InfoSiteGroupsByShift();

        final InfoSiteShift infoSiteShift = new InfoSiteShift();
        infoSiteGroupsByShift.setInfoSiteShift(infoSiteShift);
        final List<StudentGroup> studentGroups = grouping.getStudentGroupsWithoutShift();
        infoSiteShift.setNrOfGroups(calculateVacancies(grouping.getGroupMaximumNumber(), studentGroups.size()));

        infoSiteGroupsByShift.setInfoSiteStudentGroupsList(createInfoStudentGroupsList(studentGroups));

        return infoSiteGroupsByShift;
    }
View Full Code Here

TOP

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

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.