| 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Lo | Line # 55 | 18 | 0% | 18 | 4 | 88.9% | 0.8888889 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (41) | |||
| Result | |||
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateVariationsByMajorDiscipline  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateVariationsByMajorDiscipline | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreateCourse  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreateCourse | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreditsProgramRequirement  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreditsProgramRequirement | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testMajorDisciplineVersioning  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testMajorDisciplineVersioning | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDiscipline  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDiscipline | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateCoreProgram  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateCoreProgram | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDiscipline  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDiscipline | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDisciplineDeleteRule  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDisciplineDeleteRule | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateProgramRequirement  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateProgramRequirement | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseVersioning  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseVersioning | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateCoreProgram  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateCoreProgram | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseCrossListing  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseCrossListing | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDisciplineRemoveRule  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDisciplineRemoveRule | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testUpdateCourse  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testUpdateCourse | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteProgramRequirement  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteProgramRequirement | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateProgramRequirement  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateProgramRequirement | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteCoreProgram  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteCoreProgram | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateVariationsByMajorDiscipline  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateVariationsByMajorDiscipline | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testLo  org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testLo | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteVariationsByMajorDiscipline  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteVariationsByMajorDiscipline | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDynamicAttributes  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDynamicAttributes | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCoreProgramVersioning  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCoreProgramVersioning | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse  org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse | 1 PASS | |
| 0.8888889 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateBaccCredentialProgram  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateBaccCredentialProgram | 1 PASS | |
| 0.44444445 | org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testGetRelatedLosByLoId  org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testGetRelatedLosByLoId | 1 PASS | |
| 0.44444445 | org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testGetLoByIdList  org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testGetLoByIdList | 1 PASS | |
| 0.44444445 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetVariationsByMajorDisciplineId  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetVariationsByMajorDisciplineId | 1 PASS | |
| 0.44444445 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetMajorDiscipline  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetMajorDiscipline | 1 PASS | |
| 0.44444445 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetProgramRequirement  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetProgramRequirement | 1 PASS | |
| 0.44444445 | org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testLoCategory  org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testLoCategory | 1 PASS | |
| 0.44444445 | org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetCoreProgram  org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetCoreProgram | 1 PASS | |
| 0.16666667 | org.kuali.student.lum.lo.dao.impl.TestLoDaoImpl.testGetLo  org.kuali.student.lum.lo.dao.impl.TestLoDaoImpl.testGetLo | 1 PASS | |
| 0.055555556 | org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testAddRemoveLoCategoryToFromLo  org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testAddRemoveLoCategoryToFromLo | 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.lo.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.FetchType; | |
| 25 | import javax.persistence.JoinColumn; | |
| 26 | import javax.persistence.JoinTable; | |
| 27 | import javax.persistence.ManyToOne; | |
| 28 | import javax.persistence.NamedQueries; | |
| 29 | import javax.persistence.NamedQuery; | |
| 30 | import javax.persistence.OneToMany; | |
| 31 | import javax.persistence.Table; | |
| 32 | import javax.persistence.Temporal; | |
| 33 | import javax.persistence.TemporalType; | |
| 34 | ||
| 35 | import org.kuali.student.common.entity.AttributeOwner; | |
| 36 | import org.kuali.student.common.entity.MetaEntity; | |
| 37 | ||
| 38 | /** | |
| 39 | * @author Kuali Student Team | |
| 40 | */ | |
| 41 | @Entity | |
| 42 | @Table(name = "KSLO_LO") | |
| 43 | @NamedQueries( { | |
| 44 | @NamedQuery(name = "Lo.getAllowedLoLoRelationTypes", query = "SELECT relType.relationTypeId FROM AllowedLoLoRelationType relType WHERE relType.loTypeId = :loTypeKey AND relType.relatedLoTypeId = :relatedLoTypeKey"), | |
| 45 | @NamedQuery(name = "Lo.getRelatedLosByLoId", query = "SELECT rel.relatedLo FROM LoLoRelation rel WHERE rel.lo.id = :loId AND rel.loLoRelationType.id = :loLoRelationTypeId"), | |
| 46 | @NamedQuery(name = "Lo.getLosByRelatedLoId", query = "SELECT rel.lo FROM LoLoRelation rel WHERE rel.relatedLo.id = :relatedLoId AND rel.loLoRelationType.id = :loLoRelationTypeId"), | |
| 47 | @NamedQuery(name = "Lo.getLoCategories", query = "SELECT c FROM LoCategory c WHERE c.loRepository.id = :repositoryId"), | |
| 48 | @NamedQuery(name = "Lo.findLosByIdList", query = "SELECT l FROM Lo l WHERE l.id IN (:idList)"), | |
| 49 | @NamedQuery(name = "Lo.getLoCategoriesForLo", query = "SELECT j.loCategory FROM LoLoCategoryJoin j WHERE j.lo.id = :loId"), | |
| 50 | @NamedQuery(name = "Lo.getLosByLoCategory", query = "SELECT j.lo FROM LoLoCategoryJoin j WHERE j.loCategory.id = :loCategoryId"), | |
| 51 | @NamedQuery(name = "Lo.getLosByRepository", query = "SELECT l FROM Lo l WHERE l.loRepository.id = :loRepositoryId"), | |
| 52 | @NamedQuery(name = "Lo.getLoLoRelationsByLoId", query = "SELECT llRel FROM LoLoRelation llRel WHERE llRel.lo.id = :loId OR llRel.relatedLo.id = :loId"), | |
| 53 | @NamedQuery(name = "Lo.getLoCategoryJoin", query = "SELECT j FROM LoLoCategoryJoin j WHERE j.lo.id = :loId AND j.loCategory.id = :loCategoryId") | |
| 54 | }) | |
| 55 | public class Lo extends MetaEntity implements AttributeOwner<LoAttribute> { | |
| 56 | ||
| 57 | @Column(name = "NAME") | |
| 58 | private | |
| 59 | String name; | |
| 60 | ||
| 61 | @ManyToOne(cascade = CascadeType.ALL) // { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH } ) // CascadeType.ALL) | |
| 62 | @JoinColumn(name = "RT_DESCR_ID") | |
| 63 | private LoRichText descr; | |
| 64 | ||
| 65 | @ManyToOne | |
| 66 | @JoinColumn(name = "LO_REPO_ID") | |
| 67 | private LoRepository loRepository; | |
| 68 | ||
| 69 | @Temporal(TemporalType.TIMESTAMP) | |
| 70 | @Column(name = "EFF_DT") | |
| 71 | private Date effectiveDate; | |
| 72 | ||
| 73 | @Temporal(TemporalType.TIMESTAMP) | |
| 74 | @Column(name = "EXPIR_DT") | |
| 75 | private Date expirationDate; | |
| 76 | ||
| 77 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") | |
| 78 | private List<LoAttribute> attributes; | |
| 79 | ||
| 80 | @OneToMany(fetch=FetchType.LAZY, mappedBy="lo") | |
| 81 | @JoinTable( | |
| 82 | name="KSLO_LO_JN_LOCATEGORY", | |
| 83 | joinColumns=@JoinColumn(name="LO_ID", insertable=false, updatable=false), | |
| 84 | inverseJoinColumns=@JoinColumn(name="ID", insertable=false, updatable=false) | |
| 85 | ) | |
| 86 | private List<LoLoCategoryJoin> categories; | |
| 87 | ||
| 88 | @ManyToOne | |
| 89 | @JoinColumn(name = "LOTYPE_ID") | |
| 90 | private LoType loType; | |
| 91 | ||
| 92 | @Column(name = "ST") | |
| 93 | private String state; | |
| 94 | ||
| 95 | /** | |
| 96 | * @param name the name to set | |
| 97 | */ | |
| 98 | 674 |  public void setName(String name) { | 
| 99 | 674 | this.name = name; | 
| 100 | } | |
| 101 | ||
| 102 | /** | |
| 103 | * @return the name | |
| 104 | */ | |
| 105 | 1074 |  public String getName() { | 
| 106 | 1074 | return name; | 
| 107 | } | |
| 108 | ||
| 109 | 1074 |  public LoRichText getDescr() { | 
| 110 | 1074 | return descr; | 
| 111 | } | |
| 112 | ||
| 113 | 674 |  public void setDescr(LoRichText descr) { | 
| 114 | 674 | this.descr = descr; | 
| 115 | } | |
| 116 | ||
| 117 | /** | |
| 118 | * @param loHierarchy the loHierarchy to set | |
| 119 | */ | |
| 120 | 1326 |  public void setLoRepository(LoRepository loRepository) { | 
| 121 | 1326 | this.loRepository = loRepository; | 
| 122 | } | |
| 123 | ||
| 124 | /** | |
| 125 | * @return the loHierarchy | |
| 126 | */ | |
| 127 | 3440 |  public LoRepository getLoRepository() { | 
| 128 | 3440 | return loRepository; | 
| 129 | } | |
| 130 | ||
| 131 | 1073 |  public Date getEffectiveDate() { | 
| 132 | 1073 | return effectiveDate; | 
| 133 | } | |
| 134 | ||
| 135 | 674 |  public void setEffectiveDate(Date effectiveDate) { | 
| 136 | 674 | this.effectiveDate = effectiveDate; | 
| 137 | } | |
| 138 | ||
| 139 | 1073 |  public Date getExpirationDate() { | 
| 140 | 1073 | return expirationDate; | 
| 141 | } | |
| 142 | ||
| 143 | 674 |  public void setExpirationDate(Date expirationDate) { | 
| 144 | 674 | this.expirationDate = expirationDate; | 
| 145 | } | |
| 146 | ||
| 147 | /* (non-Javadoc) | |
| 148 | * @see org.kuali.student.common.entity.AttributeOwner#getAttributes() | |
| 149 | */ | |
| 150 | 3095 |  @Override | 
| 151 | public List<LoAttribute> getAttributes() { | |
| 152 | 3095 | return attributes; | 
| 153 | } | |
| 154 | ||
| 155 | /* (non-Javadoc) | |
| 156 | * @see org.kuali.student.common.entity.AttributeOwner#setAttributes(java.util.List) | |
| 157 | */ | |
| 158 | 1326 |  @Override | 
| 159 | public void setAttributes(List<LoAttribute> attributes) { | |
| 160 | 1326 | this.attributes = attributes; | 
| 161 | } | |
| 162 | ||
| 163 | /** | |
| 164 | * @param loType the loType to set | |
| 165 | */ | |
| 166 | 1326 |  public void setLoType(LoType loType) { | 
| 167 | 1326 | this.loType = loType; | 
| 168 | } | |
| 169 | ||
| 170 | /** | |
| 171 | * @return the loType | |
| 172 | */ | |
| 173 | 1073 |  public LoType getLoType() { | 
| 174 | 1073 | return loType; | 
| 175 | } | |
| 176 | ||
| 177 | /** | |
| 178 | * @param state the state to set | |
| 179 | */ | |
| 180 | 674 |  public void setState(String state) { | 
| 181 | 674 | this.state = state; | 
| 182 | } | |
| 183 | ||
| 184 | /** | |
| 185 | * @return the state | |
| 186 | */ | |
| 187 | 1073 |  public String getState() { | 
| 188 | 1073 | return state; | 
| 189 | } | |
| 190 | ||
| 191 | 0 |  public void setCategories(List<LoLoCategoryJoin> categories) { | 
| 192 | 0 | this.categories = categories; | 
| 193 | } | |
| 194 | ||
| 195 | 0 |  public List<LoLoCategoryJoin> getCategories() { | 
| 196 | 0 | return categories; | 
| 197 | } | |
| 198 | } | |
| 
 | ||||||||||||