public class ExecutionDegreeProviderForExecutionCourseSearchBean implements DataProvider {
@Override
public Object provide(Object source, Object currentValue) {
final ExecutionCourseSearchBean executionCourseSearchBean = (ExecutionCourseSearchBean) source;
final ExecutionSemester executionSemester = executionCourseSearchBean.getExecutionPeriod();
final ExecutionYear executionYear = executionSemester.getExecutionYear();
final List<ExecutionDegree> executionDegrees = new ArrayList<ExecutionDegree>(executionYear.getExecutionDegreesSet());
Collections.sort(executionDegrees, ExecutionDegree.EXECUTION_DEGREE_COMPARATORY_BY_DEGREE_TYPE_AND_NAME);
return executionDegrees;
}