|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LrcDaoImpl | Line # 31 | 16 | 0% | 6 | 1 | 95% |
0.95
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(29) | |||
Result | |||
0.3
|
org.kuali.student.lum.lrc.dao.impl.TestLrcDaoImpl.testGetResultComponentIdsByResult org.kuali.student.lum.lrc.dao.impl.TestLrcDaoImpl.testGetResultComponentIdsByResult | 1 PASS | |
0.3
|
org.kuali.student.lum.lrc.dao.impl.TestLrcDaoImpl.testGetResultComponentType org.kuali.student.lum.lrc.dao.impl.TestLrcDaoImpl.testGetResultComponentType | 1 PASS | |
0.3
|
org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponentType org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponentType | 1 PASS | |
0.3
|
org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponentIdsByResult org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponentIdsByResult | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_max_GradeType_Letter org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_max_GradeType_Letter | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testUpdateCourse org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testUpdateCourse | 1 PASS | |
0.25
|
org.kuali.student.lum.lrc.dao.impl.TestLrcDaoImpl.testGetResultComponentIdsByResultComponentType org.kuali.student.lum.lrc.dao.impl.TestLrcDaoImpl.testGetResultComponentIdsByResultComponentType | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseCrossListing org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseCrossListing | 1 PASS | |
0.25
|
org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponentIdsByResultComponentType org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponentIdsByResultComponentType | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_max_GradeType_CompletedNotation org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_max_GradeType_CompletedNotation | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_MinCoursesMinGradeTest_GradeType_Letter org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_MinCoursesMinGradeTest_GradeType_Letter | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_CompletedNotation org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_CompletedNotation | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_MinCoursesMinGradeTest_GradeType_CompletedNotation org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_MinCoursesMinGradeTest_GradeType_CompletedNotation | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDynamicAttributes org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDynamicAttributes | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseVersioning org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseVersioning | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_Letter org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_Letter | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_PassFail org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_PassFail | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_Percentage org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_Percentage | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreateCourse org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreateCourse | 1 PASS | |
0.25
|
org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_Satisfactory org.kuali.student.lum.statement.service.impl.TestStatementServiceImplForCourse.testGetNaturalLanguageForReqComponent_grade_min_GradeType_Satisfactory | 1 PASS | |
0.25
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse | 1 PASS | |
1 | /** | |
2 | * Copyright 2010 The Kuali Foundation Licensed under the | |
3 | * Educational Community License, Version 2.0 (the "License"); you may | |
4 | * not use this file except in compliance with the License. You may | |
5 | * obtain a copy of the License at | |
6 | * | |
7 | * http://www.osedu.org/licenses/ECL-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, | |
10 | * software distributed under the License is distributed on an "AS IS" | |
11 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
12 | * or implied. See the License for the specific language governing | |
13 | * permissions and limitations under the License. | |
14 | */ | |
15 | ||
16 | package org.kuali.student.lum.lrc.dao.impl; | |
17 | ||
18 | import java.util.List; | |
19 | ||
20 | import javax.persistence.EntityManager; | |
21 | import javax.persistence.EntityNotFoundException; | |
22 | import javax.persistence.NoResultException; | |
23 | import javax.persistence.PersistenceContext; | |
24 | import javax.persistence.Query; | |
25 | ||
26 | import org.kuali.student.common.dao.impl.AbstractSearchableCrudDaoImpl; | |
27 | import org.kuali.student.common.exceptions.DoesNotExistException; | |
28 | import org.kuali.student.lum.lrc.dao.LrcDao; | |
29 | import org.kuali.student.lum.lrc.entity.ResultComponentType; | |
30 | ||
31 | public class LrcDaoImpl extends AbstractSearchableCrudDaoImpl implements LrcDao { | |
32 | 8 | @PersistenceContext(unitName = "Lrc") |
33 | @Override | |
34 | public void setEm(EntityManager em) { | |
35 | 8 | super.setEm(em); |
36 | } | |
37 | ||
38 | 6 | @Override |
39 | public List<String> getResultComponentIdsByResult(String resultValueId, String resultComponentTypeKey) { | |
40 | 6 | Query query = em.createNamedQuery("ResultComponent.getResultComponentIdsByResult"); |
41 | 6 | query.setParameter("resultValueId", resultValueId); |
42 | 6 | query.setParameter("resultComponentTypeKey", resultComponentTypeKey); |
43 | 6 | @SuppressWarnings("unchecked") |
44 | List<String> resultList = query.getResultList(); | |
45 | 6 | return resultList; |
46 | } | |
47 | ||
48 | 121 | @Override |
49 | public List<String> getResultComponentIdsByResultComponentType(String resultComponentTypeKey) { | |
50 | 121 | Query query = em.createNamedQuery("ResultComponent.getResultComponentIdsByResultComponentType"); |
51 | 121 | query.setParameter("resultComponentTypeKey", resultComponentTypeKey); |
52 | 121 | @SuppressWarnings("unchecked") |
53 | List<String> resultList = query.getResultList(); | |
54 | 121 | return resultList; |
55 | } | |
56 | ||
57 | 4 | @Override |
58 | public ResultComponentType getResultComponentType(String resultComponentTypeKey) throws DoesNotExistException { | |
59 | 4 | Query query = em.createNamedQuery("ResultComponent.getResultComponentType"); |
60 | 4 | query.setParameter("resultComponentTypeKey", resultComponentTypeKey); |
61 | 4 | try { |
62 | 4 | return (ResultComponentType)query.getSingleResult(); |
63 | } catch (NoResultException e) { | |
64 | 2 | throw new DoesNotExistException(); |
65 | } catch (EntityNotFoundException e){ | |
66 | 0 | throw new DoesNotExistException(); |
67 | } | |
68 | } | |
69 | } |
|