dismissal.setUsedInSeparationCycle(true);
return;
}
dismissal.setUsedInSeparationCycle(true);
final Credits credits = dismissal.getCredits();
final Credits newCredits;
if (credits.isTemporary()) {
newCredits = new TemporarySubstitution();
} else if (credits.isSubstitution()) {
newCredits = new Substitution();
} else if (credits.isEquivalence()) {
final Equivalence equivalence = (Equivalence) credits;
final Equivalence newEquivalence = new Equivalence();
newEquivalence.setGrade(equivalence.getGrade());
newCredits = newEquivalence;
} else {
newCredits = new Credits();
}
newCredits.setStudentCurricularPlan(parent.getStudentCurricularPlan());
newCredits.setExecutionPeriod(getExecutionPeriod());
newCredits.setGivenCredits(credits.getGivenCredits());
for (final IEnrolment enrolment : credits.getIEnrolments()) {
EnrolmentWrapper.create(newCredits, enrolment);
}