if (value == null) {
return null;
}
final DomainObjectKeyConverter converter = new DomainObjectKeyConverter();
final List<SelectedOptionalCurricularCourse> result = new ArrayList<SelectedOptionalCurricularCourse>();
final String[] values = (String[]) value;
for (String key : values) {
String[] parts = key.split(",");
if (parts.length < 3) {
throw new ConversionException("invalid key format: " + key);
}
final OptionalCurricularCourse curricularCourse = (OptionalCurricularCourse) converter.convert(type, parts[0]);
final CurriculumGroup curriculumGroup = (CurriculumGroup) converter.convert(type, parts[1]);
final StudentCurricularPlan studentCurricularPlan = (StudentCurricularPlan) converter.convert(type, parts[2]);
final SelectedOptionalCurricularCourse selectedCurricularCourse =
new SelectedOptionalCurricularCourse(curricularCourse, studentCurricularPlan);
selectedCurricularCourse.setCurriculumGroup(curriculumGroup);
result.add(selectedCurricularCourse);