package net.sourceforge.fenixedu.domain.student.curriculum; import java.math.BigDecimal; import net.sourceforge.fenixedu.domain.DomainReference; import net.sourceforge.fenixedu.domain.Enrolment; import net.sourceforge.fenixedu.domain.ExecutionSemester; import net.sourceforge.fenixedu.domain.Grade; import org.joda.time.DateTime; import org.joda.time.YearMonthDay; import com.linkare.commons.metainfo.Linkare; public class NotInDegreeCurriculumCurriculumEntry extends CurriculumEntry { private final DomainReference enrolmentDomainReference; public NotInDegreeCurriculumCurriculumEntry(final Enrolment enrolment) { super(); this.enrolmentDomainReference = new DomainReference(enrolment); } @Override public boolean isNotInDegreeCurriculumEnrolmentEntry() { return true; } public Enrolment getEnrolment() { return enrolmentDomainReference.getObject(); } public BigDecimal getEctsCreditsForCurriculum() { return BigDecimal.valueOf(getEnrolment().getEctsCredits()); } public BigDecimal getWeigthForCurriculum() { return BigDecimal.valueOf(getEnrolment().getWeigth()); } @Override public Grade getGrade() { return getEnrolment().getGrade(); } @Linkare(author = "Paulo Zenida", comments = "Changed the modifiers order according to the JLS suggestions") @Override public final ExecutionSemester getExecutionPeriod() { return getEnrolment().getExecutionPeriod(); } public Integer getIdInternal() { return getEnrolment().getIdInternal(); } @Override public DateTime getCreationDateDateTime() { return getEnrolment().getCreationDateDateTime(); } @Override public YearMonthDay getApprovementDate() { return getEnrolment().getApprovementDate(); } }