View Javadoc
1   package org.kuali.kpme.edo.checklist.service;
2   
3   import java.util.List;
4   
5   import org.joda.time.LocalDate;
6   import org.kuali.kpme.edo.api.checklist.EdoChecklist;
7   import org.kuali.kpme.edo.checklist.EdoChecklistBo;
8   import org.kuali.kpme.edo.checklist.dao.EdoChecklistDao;
9   import org.kuali.rice.core.api.mo.ModelObjectUtils;
10  
11  public class EdoChecklistServiceImpl implements EdoChecklistService {
12      private EdoChecklistDao edoChecklistDao;
13      
14      protected List<EdoChecklist> convertToImmutable(List<EdoChecklistBo> bos) {
15  		return ModelObjectUtils.transform(bos, EdoChecklistBo.toImmutable);
16  	}
17  
18      public EdoChecklistDao getEdoChecklistDao() {
19          return edoChecklistDao;
20      }
21  
22      public void setEdoChecklistDao(EdoChecklistDao edoChecklistDao) {
23          this.edoChecklistDao = edoChecklistDao;
24      }
25  
26      public EdoChecklist getChecklistById(String edoChecklistId) {
27      	return EdoChecklistBo.to(edoChecklistDao.getChecklistById(edoChecklistId));
28      }
29  
30      public List<EdoChecklist> getChecklists(String groupKey, String organizationCode, String departmentId, LocalDate asOfDate) {
31      	List<EdoChecklistBo> bos = edoChecklistDao.getChecklists(groupKey, organizationCode, departmentId, asOfDate);
32      	return convertToImmutable(bos);
33  	}
34  }