private List<StudentCurricularPlan> getSelectedStudentCurricularPlans(final Registration registration,
final String studentCPID) {
final List<StudentCurricularPlan> result;
final StudentCurricularPlanIDDomainType scpIdType = new StudentCurricularPlanIDDomainType(studentCPID);
if (scpIdType.isNewest()) {
result = Collections.singletonList(registration.getLastStudentCurricularPlan());
} else if (scpIdType.isAll()) {
result = getSortedStudentCurricularPlans(registration);
} else {
result = Collections.singletonList(getStudentCurricularPlan(registration, studentCPID));
}