View Javadoc

1   package org.kuali.student.enrollment.class2.courseoffering.service.impl;
2   
3   import org.kuali.rice.krad.inquiry.InquirableImpl;
4   import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingConstants;
5   import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingResourceLoader;
6   import org.kuali.student.enrollment.courseofferingset.dto.SocRolloverResultInfo;
7   import org.kuali.student.enrollment.courseofferingset.service.CourseOfferingSetService;
8   import org.kuali.student.r2.common.util.ContextUtils;
9   
10  import java.util.Map;
11  
12  public class SocRolloverResultInfoInquirableImpl extends InquirableImpl {
13      private transient CourseOfferingSetService courseOfferingSetService = null;
14      private static final long serialVersionUID = 1L;
15      @Override
16      public SocRolloverResultInfo retrieveDataObject(Map<String, String> parameters) {
17          try {
18              SocRolloverResultInfo socRolloverResultInfo = getCourseOfferingSetService().getSocRolloverResult(
19                                      parameters.get(CourseOfferingConstants.SOCROLLOVERRESULTINFO_ID), ContextUtils.createDefaultContextInfo());
20              return socRolloverResultInfo;
21          } catch (Exception e) {
22              throw new RuntimeException("Errir looking up rollover results", e);
23          }
24  
25      }
26  
27      public CourseOfferingSetService getCourseOfferingSetService() {
28          if(courseOfferingSetService == null)
29              courseOfferingSetService= CourseOfferingResourceLoader.loadCourseOfferingSetService();
30          return courseOfferingSetService;
31      }
32  
33  }