Package org.fenixedu.academic.domain.space

Examples of org.fenixedu.academic.domain.space.WrittenEvaluationSpaceOccupation


                OccupationType occupationType = getType(occupation);
                if (!types.contains(occupationType)) {
                    continue;
                }
                if (occupation instanceof WrittenEvaluationSpaceOccupation) {
                    WrittenEvaluationSpaceOccupation evalOccupation = (WrittenEvaluationSpaceOccupation) occupation;
                    for (WrittenEvaluation eval : evalOccupation.getWrittenEvaluationsSet()) {
                        final Interval durationInterval = eval.getDurationInterval();
                        if (searchInterval.overlaps(durationInterval)) {
                            String desc;
                            if (eval instanceof WrittenTest) {
                                desc =
View Full Code Here


            }
        }

        // Delete Rooms
        for (Iterator<WrittenEvaluationSpaceOccupation> iter = roomOccupationsToDelete.iterator(); iter.hasNext();) {
            WrittenEvaluationSpaceOccupation occupation = iter.next();
            occupation.removeWrittenEvaluations(this);
            iter.remove();
            occupation.delete();
        }
    }
View Full Code Here

        return true;
    }

    private void deleteAllRoomOccupations() {
        while (!getWrittenEvaluationSpaceOccupationsSet().isEmpty()) {
            WrittenEvaluationSpaceOccupation occupation = getWrittenEvaluationSpaceOccupationsSet().iterator().next();
            occupation.removeWrittenEvaluations(this);
            occupation.delete();
        }
    }
View Full Code Here

        }
    }

    public void removeRoomOccupation(Space room) {
        if (hasOccupationForRoom(room)) {
            WrittenEvaluationSpaceOccupation occupation =
                    (WrittenEvaluationSpaceOccupation) SpaceUtils.getFirstOccurrenceOfResourceAllocationByClass(room, this);
            removeWrittenEvaluationSpaceOccupations(occupation);
        }
    }
View Full Code Here

    protected List<WrittenEvaluationSpaceOccupation> associateNewRooms(final List<Space> rooms) {

        List<WrittenEvaluationSpaceOccupation> newInsertedOccupations = new ArrayList<WrittenEvaluationSpaceOccupation>();
        for (final Space room : rooms) {
            WrittenEvaluationSpaceOccupation spaceOccupation = associateNewRoom(room);
            if (spaceOccupation != null) {
                newInsertedOccupations.add(spaceOccupation);
            }
        }
        return newInsertedOccupations;
View Full Code Here

    }

    protected WrittenEvaluationSpaceOccupation associateNewRoom(Space room) {
        if (!hasOccupationForRoom(room)) {

            WrittenEvaluationSpaceOccupation occupation =
                    (WrittenEvaluationSpaceOccupation) SpaceUtils.getFirstOccurrenceOfResourceAllocationByClass(room, this);

            occupation = occupation == null ? new WrittenEvaluationSpaceOccupation(room) : occupation;
            occupation.edit(this);
            return occupation;
        } else {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.space.WrittenEvaluationSpaceOccupation

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.