StudentCandidacy studentCandidacy = null;
if (registration.getDegree().getDegreeType().isIntegratedMasterDegree()) {
studentCandidacy = new IMDCandidacy(registration.getPerson(), executionDegree);
} else if (registration.getDegree().getDegreeType().isDegree()) {
studentCandidacy = new DegreeCandidacy(registration.getPerson(), executionDegree);
} else if (registration.getDegree().getDegreeType().isMasterDegree()) {
studentCandidacy = new MDCandidacy(registration.getPerson(), executionDegree);
}
studentCandidacy.getPrecedentDegreeInformation().delete();