Package org.fenixedu.academic.domain.space

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


        for (final LessonInstance lessonInstance : getLessonInstancesSet()) {
            if (lessonInstance.getDay().isAfter(new LocalDate())) {
                if (newRoom == null) {
                    lessonInstance.setLessonInstanceSpaceOccupation(null);
                } else {
                    LessonInstanceSpaceOccupation allocation =
                            (LessonInstanceSpaceOccupation) SpaceUtils.getFirstOccurrenceOfResourceAllocationByClass(newRoom,
                                    this);
                    if (allocation == null) {
                        allocation = new LessonInstanceSpaceOccupation(newRoom);
                    }
                    allocation.edit(lessonInstance);
                }
            }
        }
    }
View Full Code Here


    public void delete() {
        check(this, ResourceAllocationRolePredicates.checkPermissionsToManageLessonInstances);
        DomainException.throwWhenDeleteBlocked(getDeletionBlockers());

        LessonInstanceSpaceOccupation occupation = getLessonInstanceSpaceOccupation();
        if (occupation != null) {
            occupation.removeLessonInstances(this);
            occupation.delete();
        }

        super.setCourseLoad(null);
        super.setLesson(null);
        setRootDomainObject(null);
View Full Code Here

    }

    private void lessonInstanceSpaceOccupationManagement(Space space) {
        if (space != null) {
            final Lesson lesson = getLesson();
            LessonInstanceSpaceOccupation instanceSpaceOccupation =
                    (LessonInstanceSpaceOccupation) SpaceUtils.getFirstOccurrenceOfResourceAllocationByClass(space, lesson);

            instanceSpaceOccupation =
                    instanceSpaceOccupation == null ? new LessonInstanceSpaceOccupation(space) : instanceSpaceOccupation;
            instanceSpaceOccupation.edit(this);
        }
    }
View Full Code Here

TOP

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

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.