Examples of DetailedProfessorship


Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

        @Override
        public Object transform(Object input) {
            Professorship professorship = (Professorship) input;
            InfoProfessorship infoProfessorShip = InfoProfessorship.newInfoFromDomain(professorship);

            final DetailedProfessorship detailedProfessorship = new DetailedProfessorship();

            ExecutionCourse executionCourse = professorship.getExecutionCourse();
            List executionCourseCurricularCoursesList = getInfoCurricularCourses(detailedProfessorship, executionCourse);

            detailedProfessorship.setResponsibleFor(professorship.getResponsibleFor());

            detailedProfessorship.setInfoProfessorship(infoProfessorShip);
            detailedProfessorship.setExecutionCourseCurricularCoursesList(executionCourseCurricularCoursesList);

            return detailedProfessorship;
        }
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

                    @Override
                    public int compare(Object o1, Object o2) {

                        List list1 = (List) o1;
                        List list2 = (List) o2;
                        DetailedProfessorship dt1 = (DetailedProfessorship) list1.iterator().next();
                        DetailedProfessorship dt2 = (DetailedProfessorship) list2.iterator().next();

                        return Collator.getInstance().compare(dt1.getInfoProfessorship().getInfoExecutionCourse().getNome(),
                                dt2.getInfoProfessorship().getInfoExecutionCourse().getNome());
                    }

                });

                request.setAttribute("detailedProfessorShipsListofLists", detailedProfessorShipsListofLists);
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

                    @Override
                    public int compare(Object o1, Object o2) {

                        List list1 = (List) o1;
                        List list2 = (List) o2;
                        DetailedProfessorship dt1 = (DetailedProfessorship) list1.iterator().next();
                        DetailedProfessorship dt2 = (DetailedProfessorship) list2.iterator().next();

                        return Collator.getInstance().compare(dt1.getInfoProfessorship().getInfoExecutionCourse().getNome(),
                                dt2.getInfoProfessorship().getInfoExecutionCourse().getNome());
                    }

                });
                request.setAttribute("detailedProfessorShipsListofLists", detailedProfessorShipsListofLists);
            }
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

        List detailedProfessorshipList = (List) request.getAttribute("detailedProfessorshipList");

        List executionCourseIds = new ArrayList();
        Map hours = new HashMap();
        for (int i = 0; i < detailedProfessorshipList.size(); i++) {
            DetailedProfessorship dps = (DetailedProfessorship) detailedProfessorshipList.get(i);

            String executionCourseId = dps.getInfoProfessorship().getInfoExecutionCourse().getExternalId();
            if (dps.getResponsibleFor().booleanValue()) {
                executionCourseIds.add(executionCourseId);
            }
            if (dps.getMasterDegreeOnly().booleanValue()) {
                if (dps.getInfoProfessorship().getHours() != null) {
                    hours.put(executionCourseId.toString(), dps.getInfoProfessorship().getHours().toString());
                }
            }
        }

        dynaForm.set("executionCourseResponsability", executionCourseIds.toArray(new String[] {}));
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

        @Override
        public Object transform(Object input) {
            Professorship professorship = (Professorship) input;
            InfoProfessorship infoProfessorShip = InfoProfessorship.newInfoFromDomain(professorship);

            final DetailedProfessorship detailedProfessorship = new DetailedProfessorship();

            ExecutionCourse executionCourse = professorship.getExecutionCourse();
            List executionCourseCurricularCoursesList = getInfoCurricularCourses(detailedProfessorship, executionCourse);

            detailedProfessorship.setResponsibleFor(professorship.getResponsibleFor());

            detailedProfessorship.setInfoProfessorship(infoProfessorShip);
            detailedProfessorship.setExecutionCourseCurricularCoursesList(executionCourseCurricularCoursesList);

            return detailedProfessorship;
        }
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

        Collections.sort(detailedProfessorships, new Comparator() {

            @Override
            public int compare(Object o1, Object o2) {
                DetailedProfessorship detailedProfessorship1 = (DetailedProfessorship) o1;
                DetailedProfessorship detailedProfessorship2 = (DetailedProfessorship) o2;
                int result =
                        detailedProfessorship1
                                .getInfoProfessorship()
                                .getInfoExecutionCourse()
                                .getExternalId()
                                .compareTo(detailedProfessorship2.getInfoProfessorship().getInfoExecutionCourse().getExternalId());
                if (result == 0
                        && (detailedProfessorship1.getResponsibleFor().booleanValue() || detailedProfessorship2
                                .getResponsibleFor().booleanValue())) {
                    if (detailedProfessorship1.getResponsibleFor().booleanValue()) {
                        return -1;
                    }
                    if (detailedProfessorship2.getResponsibleFor().booleanValue()) {
                        return 1;
                    }
                }

                return result;
            }

        });

        List result = new ArrayList();
        Iterator iter = detailedProfessorships.iterator();
        List temp = new ArrayList();
        while (iter.hasNext()) {
            DetailedProfessorship detailedProfessorship = (DetailedProfessorship) iter.next();
            if (temp.isEmpty()
                    || ((DetailedProfessorship) temp.get(temp.size() - 1)).getInfoProfessorship().getInfoExecutionCourse()
                            .equals(detailedProfessorship.getInfoProfessorship().getInfoExecutionCourse())) {
                temp.add(detailedProfessorship);
            } else {
                result.add(temp);
                temp = new ArrayList();
                temp.add(detailedProfessorship);
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

                InfoProfessorship infoProfessorShip = InfoProfessorship.newInfoFromDomain(professorship);

                List executionCourseCurricularCoursesList = getInfoCurricularCourses(professorship.getExecutionCourse());

                DetailedProfessorship detailedProfessorship = new DetailedProfessorship();

                Boolean isResponsible = Boolean.valueOf(professorship.getResponsibleFor());

                if ((teacherType.intValue() == 1) && (!isResponsible.booleanValue())) {
                    return null;
                }

                detailedProfessorship.setResponsibleFor(isResponsible);

                detailedProfessorship.setInfoProfessorship(infoProfessorShip);
                detailedProfessorship.setExecutionCourseCurricularCoursesList(executionCourseCurricularCoursesList);

                return detailedProfessorship;
            }

            private List getInfoCurricularCourses(ExecutionCourse executionCourse) {
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

        Collections.sort(detailedProfessorships, new Comparator() {

            @Override
            public int compare(Object o1, Object o2) {

                DetailedProfessorship detailedProfessorship1 = (DetailedProfessorship) o1;
                DetailedProfessorship detailedProfessorship2 = (DetailedProfessorship) o2;
                int result =
                        detailedProfessorship1
                                .getInfoProfessorship()
                                .getInfoExecutionCourse()
                                .getExternalId()
                                .compareTo(detailedProfessorship2.getInfoProfessorship().getInfoExecutionCourse().getExternalId());
                if (result == 0
                        && (detailedProfessorship1.getResponsibleFor().booleanValue() || detailedProfessorship2
                                .getResponsibleFor().booleanValue())) {
                    if (detailedProfessorship1.getResponsibleFor().booleanValue()) {
                        return -1;
                    }
                    if (detailedProfessorship2.getResponsibleFor().booleanValue()) {
                        return 1;
                    }
                }

                return result;
            }

        });

        List result = new ArrayList();
        iter = detailedProfessorships.iterator();
        List temp = new ArrayList();
        while (iter.hasNext()) {
            DetailedProfessorship detailedProfessorship = (DetailedProfessorship) iter.next();
            if (temp.isEmpty()
                    || ((DetailedProfessorship) temp.get(temp.size() - 1)).getInfoProfessorship().getInfoExecutionCourse()
                            .equals(detailedProfessorship.getInfoProfessorship().getInfoExecutionCourse())) {
                temp.add(detailedProfessorship);
            } else {
                result.add(temp);
                temp = new ArrayList();
                temp.add(detailedProfessorship);
View Full Code Here

Examples of org.fenixedu.academic.dto.teacher.professorship.DetailedProfessorship

                InfoProfessorship infoProfessorShip = InfoProfessorship.newInfoFromDomain(professorship);

                List executionCourseCurricularCoursesList = getInfoCurricularCourses(professorship.getExecutionCourse());

                DetailedProfessorship detailedProfessorship = new DetailedProfessorship();

                Boolean isResponsible = Boolean.valueOf(professorship.getResponsibleFor());

                if ((teacherType.intValue() == 1) && (!isResponsible.booleanValue())) {
                    return null;
                }

                detailedProfessorship.setResponsibleFor(isResponsible);

                detailedProfessorship.setInfoProfessorship(infoProfessorShip);
                detailedProfessorship.setExecutionCourseCurricularCoursesList(executionCourseCurricularCoursesList);

                return detailedProfessorship;
            }

            private List getInfoCurricularCourses(ExecutionCourse executionCourse) {
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.