|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ResultComponent | Line # 44 | 16 | 0% | 16 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (23) | |||
| Result | |||
|
1.0
|
org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testResultComponentCrud
org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testResultComponentCrud
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testUpdateCourse
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testUpdateCourse
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreateCourse
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreateCourse
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate
|
1 PASS | |
|
0.5
|
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.5
|
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.5
|
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.5
|
org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponent
org.kuali.student.lum.lrc.service.impl.TestLrcServiceImpl.testGetResultComponent
|
1 PASS | |
|
0.5
|
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.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange
|
1 PASS | |
|
0.5
|
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.5
|
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.5
|
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.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseVersioning
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseVersioning
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse
|
1 PASS | |
|
0.5
|
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.5
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse
|
1 PASS | |
|
0.5
|
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 | |
| 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.entity; | |
| 17 | ||
| 18 | import java.util.Date; | |
| 19 | import java.util.List; | |
| 20 | ||
| 21 | import javax.persistence.CascadeType; | |
| 22 | import javax.persistence.Column; | |
| 23 | import javax.persistence.Entity; | |
| 24 | import javax.persistence.JoinColumn; | |
| 25 | import javax.persistence.ManyToOne; | |
| 26 | import javax.persistence.NamedQueries; | |
| 27 | import javax.persistence.NamedQuery; | |
| 28 | import javax.persistence.OneToMany; | |
| 29 | import javax.persistence.Table; | |
| 30 | import javax.persistence.Temporal; | |
| 31 | import javax.persistence.TemporalType; | |
| 32 | ||
| 33 | import org.kuali.student.core.entity.AttributeOwner; | |
| 34 | import org.kuali.student.core.entity.MetaEntity; | |
| 35 | ||
| 36 | @Entity | |
| 37 | @Table(name = "KSLR_RESCOMP") | |
| 38 | @NamedQueries( { | |
| 39 | @NamedQuery(name = "ResultComponent.getResultComponentIdsByResult", query = "SELECT rc.id FROM ResultComponent rc JOIN rc.resultValues rv WHERE rv.id = :resultValueId AND rc.type.id = :resultComponentTypeKey"), | |
| 40 | @NamedQuery(name = "ResultComponent.getResultComponentIdsByResultComponentType", query = "SELECT rc.id FROM ResultComponent rc WHERE rc.type.id = :resultComponentTypeKey"), | |
| 41 | @NamedQuery(name = "ResultComponent.getResultComponentType", query = "SELECT rc.type FROM ResultComponent rc WHERE rc.type.id = :resultComponentTypeKey") | |
| 42 | }) | |
| 43 | ||
| 44 | public class ResultComponent extends MetaEntity implements AttributeOwner<ResultComponentAttribute> { | |
| 45 | private static final long serialVersionUID = 1L; | |
| 46 | ||
| 47 | @Column(name = "NAME") | |
| 48 | private String name; | |
| 49 | ||
| 50 | @ManyToOne(cascade = CascadeType.ALL) | |
| 51 | @JoinColumn(name = "RT_DESCR_ID") | |
| 52 | private LrcRichText descr; | |
| 53 | ||
| 54 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "resultComponent") | |
| 55 | private List<ResultValue> resultValues; | |
| 56 | ||
| 57 | @Temporal(TemporalType.TIMESTAMP) | |
| 58 | @Column(name = "EFF_DT") | |
| 59 | private Date effectiveDate; | |
| 60 | ||
| 61 | @Temporal(TemporalType.TIMESTAMP) | |
| 62 | @Column(name = "EXPIR_DT") | |
| 63 | private Date expirationDate; | |
| 64 | ||
| 65 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") | |
| 66 | private List<ResultComponentAttribute> attributes; | |
| 67 | ||
| 68 | @ManyToOne | |
| 69 | @JoinColumn(name = "TYPE") | |
| 70 | private ResultComponentType type; | |
| 71 | ||
| 72 | @Column(name = "STATE") | |
| 73 | private String state; | |
| 74 | ||
| 75 | /** | |
| 76 | * @return the name | |
| 77 | */ | |
| 78 | 109 |
public String getName() { |
| 79 | 109 | return name; |
| 80 | } | |
| 81 | ||
| 82 | /** | |
| 83 | * @param name the name to set | |
| 84 | */ | |
| 85 | 7 |
public void setName(String name) { |
| 86 | 7 | this.name = name; |
| 87 | } | |
| 88 | ||
| 89 | /** | |
| 90 | * @return the descr | |
| 91 | */ | |
| 92 | 109 |
public LrcRichText getDescr() { |
| 93 | 109 | return descr; |
| 94 | } | |
| 95 | ||
| 96 | /** | |
| 97 | * @param descr the descr to set | |
| 98 | */ | |
| 99 | 7 |
public void setDescr(LrcRichText descr) { |
| 100 | 7 | this.descr = descr; |
| 101 | } | |
| 102 | ||
| 103 | /** | |
| 104 | * @return the resultValues | |
| 105 | */ | |
| 106 | 227 |
public List<ResultValue> getResultValues() { |
| 107 | 227 | return resultValues; |
| 108 | } | |
| 109 | ||
| 110 | /** | |
| 111 | * @param resultValues the resultValues to set | |
| 112 | */ | |
| 113 | 7 |
public void setResultValues(List<ResultValue> resultValues) { |
| 114 | 7 | this.resultValues = resultValues; |
| 115 | } | |
| 116 | ||
| 117 | /** | |
| 118 | * @return the effectiveDate | |
| 119 | */ | |
| 120 | 109 |
public Date getEffectiveDate() { |
| 121 | 109 | return effectiveDate; |
| 122 | } | |
| 123 | ||
| 124 | /** | |
| 125 | * @param effectiveDate the effectiveDate to set | |
| 126 | */ | |
| 127 | 7 |
public void setEffectiveDate(Date effectiveDate) { |
| 128 | 7 | this.effectiveDate = effectiveDate; |
| 129 | } | |
| 130 | ||
| 131 | /** | |
| 132 | * @return the expirationDate | |
| 133 | */ | |
| 134 | 109 |
public Date getExpirationDate() { |
| 135 | 109 | return expirationDate; |
| 136 | } | |
| 137 | ||
| 138 | /** | |
| 139 | * @param expirationDate the expirationDate to set | |
| 140 | */ | |
| 141 | 7 |
public void setExpirationDate(Date expirationDate) { |
| 142 | 7 | this.expirationDate = expirationDate; |
| 143 | } | |
| 144 | ||
| 145 | /** | |
| 146 | * @return the type | |
| 147 | */ | |
| 148 | 109 |
public ResultComponentType getType() { |
| 149 | 109 | return type; |
| 150 | } | |
| 151 | ||
| 152 | /** | |
| 153 | * @param type the type to set | |
| 154 | */ | |
| 155 | 7 |
public void setType(ResultComponentType type) { |
| 156 | 7 | this.type = type; |
| 157 | } | |
| 158 | ||
| 159 | /** | |
| 160 | * @return the state | |
| 161 | */ | |
| 162 | 109 |
public String getState() { |
| 163 | 109 | return state; |
| 164 | } | |
| 165 | ||
| 166 | /** | |
| 167 | * @param state the state to set | |
| 168 | */ | |
| 169 | 7 |
public void setState(String state) { |
| 170 | 7 | this.state = state; |
| 171 | } | |
| 172 | ||
| 173 | 130 |
@Override |
| 174 | public List<ResultComponentAttribute> getAttributes() { | |
| 175 | 130 | return attributes; |
| 176 | } | |
| 177 | ||
| 178 | 12 |
@Override |
| 179 | public void setAttributes(List<ResultComponentAttribute> attributes) { | |
| 180 | 12 | this.attributes = attributes; |
| 181 | } | |
| 182 | ||
| 183 | } | |
|
||||||||||||