|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Lo | Line # 53 | 16 | 0% | 16 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(40) | |||
Result | |||
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateCoreProgram
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDynamicAttributes
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateProgramRequirement
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testMajorDisciplineVersioning
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreditsProgramRequirement
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateVariationsByMajorDiscipline
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateBaccCredentialProgram
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateProgramRequirement
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteVariationsByMajorDiscipline
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateVariationsByMajorDiscipline
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreateCourse
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDiscipline
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDisciplineDeleteRule
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCoreProgramVersioning
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDisciplineRemoveRule
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteProgramRequirement
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateCoreProgram
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteCoreProgram
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testUpdateCourse
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testLo
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseVersioning
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDiscipline
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse
![]() |
1 PASS | |
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse
![]() |
1 PASS | |
0.5
|
org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testLoCategory
![]() |
1 PASS | |
0.5
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetMajorDiscipline
![]() |
1 PASS | |
0.5
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetProgramRequirement
![]() |
1 PASS | |
0.5
|
org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testGetLoByIdList
![]() |
1 PASS | |
0.5
|
org.kuali.student.lum.lo.service.impl.TestLearningObjectiveServiceImpl.testGetRelatedLosByLoId
![]() |
1 PASS | |
0.5
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetCoreProgram
![]() |
1 PASS | |
0.5
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetVariationsByMajorDisciplineId
![]() |
1 PASS | |
0.1875
|
org.kuali.student.lum.lo.dao.impl.TestLoDaoImpl.testGetLo
![]() |
1 PASS | |
0.0625
|
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.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 | /** | |
37 | * @author Kuali Student Team | |
38 | */ | |
39 | @Entity | |
40 | @Table(name = "KSLO_LO") | |
41 | @NamedQueries( { | |
42 | @NamedQuery(name = "Lo.getAllowedLoLoRelationTypes", query = "SELECT relType.relationTypeId FROM AllowedLoLoRelationType relType WHERE relType.loTypeId = :loTypeKey AND relType.relatedLoTypeId = :relatedLoTypeKey"), | |
43 | @NamedQuery(name = "Lo.getRelatedLosByLoId", query = "SELECT rel.relatedLo FROM LoLoRelation rel WHERE rel.lo.id = :loId AND rel.loLoRelationType.id = :loLoRelationTypeId"), | |
44 | @NamedQuery(name = "Lo.getLosByRelatedLoId", query = "SELECT rel.lo FROM LoLoRelation rel WHERE rel.relatedLo.id = :relatedLoId AND rel.loLoRelationType.id = :loLoRelationTypeId"), | |
45 | @NamedQuery(name = "Lo.getLoCategories", query = "SELECT c FROM LoCategory c WHERE c.loRepository.id = :repositoryId"), | |
46 | @NamedQuery(name = "Lo.findLosByIdList", query = "SELECT l FROM Lo l WHERE l.id IN (:idList)"), | |
47 | @NamedQuery(name = "Lo.getLoCategoriesForLo", query = "SELECT j.loCategory FROM LoLoCategoryJoin j WHERE j.lo.id = :loId"), | |
48 | @NamedQuery(name = "Lo.getLosByLoCategory", query = "SELECT j.lo FROM LoLoCategoryJoin j WHERE j.loCategory.id = :loCategoryId"), | |
49 | @NamedQuery(name = "Lo.getLosByRepository", query = "SELECT l FROM Lo l WHERE l.loRepository.id = :loRepositoryId"), | |
50 | @NamedQuery(name = "Lo.getLoLoRelationsByLoId", query = "SELECT llRel FROM LoLoRelation llRel WHERE llRel.lo.id = :loId OR llRel.relatedLo.id = :loId"), | |
51 | @NamedQuery(name = "Lo.getLoCategoryJoin", query = "SELECT j FROM LoLoCategoryJoin j WHERE j.lo.id = :loId AND j.loCategory.id = :loCategoryId") | |
52 | }) | |
53 | public class Lo extends MetaEntity implements AttributeOwner<LoAttribute> { | |
54 | ||
55 | @Column(name = "NAME") | |
56 | private | |
57 | String name; | |
58 | ||
59 | @ManyToOne(cascade = CascadeType.ALL) // { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH } ) // CascadeType.ALL) | |
60 | @JoinColumn(name = "RT_DESCR_ID") | |
61 | private LoRichText descr; | |
62 | ||
63 | @ManyToOne | |
64 | @JoinColumn(name = "LO_REPO_ID") | |
65 | private LoRepository loRepository; | |
66 | ||
67 | @Temporal(TemporalType.TIMESTAMP) | |
68 | @Column(name = "EFF_DT") | |
69 | private Date effectiveDate; | |
70 | ||
71 | @Temporal(TemporalType.TIMESTAMP) | |
72 | @Column(name = "EXPIR_DT") | |
73 | private Date expirationDate; | |
74 | ||
75 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") | |
76 | private List<LoAttribute> attributes; | |
77 | ||
78 | @ManyToOne | |
79 | @JoinColumn(name = "LOTYPE_ID") | |
80 | private LoType loType; | |
81 | ||
82 | @Column(name = "ST") | |
83 | private String state; | |
84 | ||
85 | /** | |
86 | * @param name the name to set | |
87 | */ | |
88 | 660 |
![]() |
89 | 660 | this.name = name; |
90 | } | |
91 | ||
92 | /** | |
93 | * @return the name | |
94 | */ | |
95 | 1046 |
![]() |
96 | 1046 | return name; |
97 | } | |
98 | ||
99 | 1046 |
![]() |
100 | 1046 | return descr; |
101 | } | |
102 | ||
103 | 660 |
![]() |
104 | 660 | this.descr = descr; |
105 | } | |
106 | ||
107 | /** | |
108 | * @param loHierarchy the loHierarchy to set | |
109 | */ | |
110 | 1298 |
![]() |
111 | 1298 | this.loRepository = loRepository; |
112 | } | |
113 | ||
114 | /** | |
115 | * @return the loHierarchy | |
116 | */ | |
117 | 3356 |
![]() |
118 | 3356 | return loRepository; |
119 | } | |
120 | ||
121 | 1045 |
![]() |
122 | 1045 | return effectiveDate; |
123 | } | |
124 | ||
125 | 660 |
![]() |
126 | 660 | this.effectiveDate = effectiveDate; |
127 | } | |
128 | ||
129 | 1045 |
![]() |
130 | 1045 | return expirationDate; |
131 | } | |
132 | ||
133 | 660 |
![]() |
134 | 660 | this.expirationDate = expirationDate; |
135 | } | |
136 | ||
137 | /* (non-Javadoc) | |
138 | * @see org.kuali.student.core.entity.AttributeOwner#getAttributes() | |
139 | */ | |
140 | 3025 |
![]() |
141 | public List<LoAttribute> getAttributes() { | |
142 | 3025 | return attributes; |
143 | } | |
144 | ||
145 | /* (non-Javadoc) | |
146 | * @see org.kuali.student.core.entity.AttributeOwner#setAttributes(java.util.List) | |
147 | */ | |
148 | 1298 |
![]() |
149 | public void setAttributes(List<LoAttribute> attributes) { | |
150 | 1298 | this.attributes = attributes; |
151 | } | |
152 | ||
153 | /** | |
154 | * @param loType the loType to set | |
155 | */ | |
156 | 1298 |
![]() |
157 | 1298 | this.loType = loType; |
158 | } | |
159 | ||
160 | /** | |
161 | * @return the loType | |
162 | */ | |
163 | 1045 |
![]() |
164 | 1045 | return loType; |
165 | } | |
166 | ||
167 | /** | |
168 | * @param state the state to set | |
169 | */ | |
170 | 660 |
![]() |
171 | 660 | this.state = state; |
172 | } | |
173 | ||
174 | /** | |
175 | * @return the state | |
176 | */ | |
177 | 1045 |
![]() |
178 | 1045 | return state; |
179 | } | |
180 | } |
|