|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CluCluRelation | Line # 48 | 16 | 0% | 16 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (30) | |||
| Result | |||
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDiscipline
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDiscipline
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDisciplineRemoveRule
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateMajorDisciplineRemoveRule
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionsInDateRange
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateBaccCredentialProgram
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateBaccCredentialProgram
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteVariationsByMajorDiscipline
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteVariationsByMajorDiscipline
|
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.program.service.impl.TestProgramServiceImpl.testMajorDisciplineVersioning
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testMajorDisciplineVersioning
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDiscipline
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDiscipline
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDeleteCourse
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCreditOptions
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDisciplineDeleteRule
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateMajorDisciplineDeleteRule
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseCrossListing
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testCourseCrossListing
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCourse
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateCoreProgram
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateCoreProgram
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateVariationsByMajorDiscipline
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testCreateVariationsByMajorDiscipline
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersion
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteCoreProgram
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testDeleteCoreProgram
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateVariationsByMajorDiscipline
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateVariationsByMajorDiscipline
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetFirstVersion
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDynamicAttributes
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testDynamicAttributes
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersions
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetCurrentVersionOnDate
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber
org.kuali.student.lum.course.service.impl.TestCourseServiceImpl.testGetVersionBySequenceNumber
|
1 PASS | |
|
1.0
|
org.kuali.student.lum.lu.service.impl.TestLuServiceImpl.testCluCluRelationCrud
org.kuali.student.lum.lu.service.impl.TestLuServiceImpl.testCluCluRelationCrud
|
1 PASS | |
|
1.0
|
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.program.service.impl.TestProgramServiceImpl.testUpdateBaccCredentialProgram
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testUpdateBaccCredentialProgram
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetMajorDiscipline
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetMajorDiscipline
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetVariationsByMajorDisciplineId
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl.testGetVariationsByMajorDisciplineId
|
1 PASS | |
|
0.5
|
org.kuali.student.lum.lu.service.impl.TestLuServiceImpl.testCluCluRelation
org.kuali.student.lum.lu.service.impl.TestLuServiceImpl.testCluCluRelation
|
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.lu.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.common.entity.AttributeOwner; | |
| 34 | import org.kuali.student.common.entity.MetaEntity; | |
| 35 | ||
| 36 | @Entity | |
| 37 | @Table(name = "KSLU_CLUCLU_RELTN") | |
| 38 | @NamedQueries({ | |
| 39 | @NamedQuery(name="CluCluRelation.getCluCluRelation", query="SELECT rel FROM CluCluRelation rel WHERE rel.clu.id = :cluId or rel.relatedClu.id = :cluId"), | |
| 40 | @NamedQuery(name="CluCluRelation.getRelatedCluIdsByCluId", query="SELECT rel.relatedClu.id FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.luLuRelationType.id = :luLuRelationTypeId"), | |
| 41 | @NamedQuery(name="CluCluRelation.getCluIdsByRelatedCluId", query = "SELECT rel.clu.id FROM CluCluRelation rel WHERE rel.relatedClu.id = :relatedCluId AND rel.luLuRelationType.id = :luLuRelationTypeId"), | |
| 42 | @NamedQuery(name="CluCluRelation.getRelationTypeByCluId", query="SELECT distinct rel.luLuRelationType.id FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.relatedClu.id = :relatedCluId"), | |
| 43 | @NamedQuery(name="CluCluRelation.getRelatedClusByCluId", query="SELECT rel.relatedClu FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.luLuRelationType.id = :luLuRelationTypeId"), | |
| 44 | @NamedQuery(name="CluCluRelation.getClusByRelatedCluId", query="SELECT rel.clu FROM CluCluRelation rel WHERE rel.relatedClu.id = :relatedCluId AND rel.luLuRelationType.id = :luLuRelationTypeId"), | |
| 45 | @NamedQuery(name="CluCluRelation.getRelatedClusByCluIdSt", query="SELECT rel.relatedClu FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.luLuRelationType.id = :luLuRelationTypeId AND rel.relatedClu.state in (:luStateList)"), | |
| 46 | @NamedQuery(name="CluCluRelation.getClusByRelatedCluIdSt", query="SELECT rel.clu FROM CluCluRelation rel WHERE rel.relatedClu.id = :relatedCluId AND rel.luLuRelationType.id = :luLuRelationTypeId AND rel.clu.state in (:luStateList)") | |
| 47 | }) | |
| 48 | public class CluCluRelation extends MetaEntity implements | |
| 49 | AttributeOwner<CluCluRelationAttribute> { | |
| 50 | ||
| 51 | @ManyToOne | |
| 52 | @JoinColumn(name="CLU_ID") | |
| 53 | private Clu clu; | |
| 54 | ||
| 55 | @ManyToOne | |
| 56 | @JoinColumn(name="RELATED_CLU_ID") | |
| 57 | private Clu relatedClu; | |
| 58 | ||
| 59 | @ManyToOne | |
| 60 | @JoinColumn(name="LU_RELTN_TYPE_ID") | |
| 61 | private LuLuRelationType luLuRelationType; | |
| 62 | ||
| 63 | @Column(name = "CLU_RELTN_REQ") | |
| 64 | private boolean cluRelationRequired; | |
| 65 | ||
| 66 | @Temporal(TemporalType.TIMESTAMP) | |
| 67 | @Column(name = "EFF_DT") | |
| 68 | private Date effectiveDate; | |
| 69 | ||
| 70 | @Temporal(TemporalType.TIMESTAMP) | |
| 71 | @Column(name = "EXPIR_DT") | |
| 72 | private Date expirationDate; | |
| 73 | ||
| 74 | @Column(name = "ST") | |
| 75 | private String state; | |
| 76 | ||
| 77 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") | |
| 78 | private List<CluCluRelationAttribute> attributes; | |
| 79 | ||
| 80 | 391 |
public Clu getClu() { |
| 81 | 391 | return clu; |
| 82 | } | |
| 83 | ||
| 84 | 184 |
public void setClu(Clu clu) { |
| 85 | 184 | this.clu = clu; |
| 86 | } | |
| 87 | ||
| 88 | 391 |
public Clu getRelatedClu() { |
| 89 | 391 | return relatedClu; |
| 90 | } | |
| 91 | ||
| 92 | 184 |
public void setRelatedClu(Clu relatedClu) { |
| 93 | 184 | this.relatedClu = relatedClu; |
| 94 | } | |
| 95 | ||
| 96 | 391 |
public LuLuRelationType getLuLuRelationType() { |
| 97 | 391 | return luLuRelationType; |
| 98 | } | |
| 99 | ||
| 100 | 184 |
public void setLuLuRelationType(LuLuRelationType luLuRelationType) { |
| 101 | 184 | this.luLuRelationType = luLuRelationType; |
| 102 | } | |
| 103 | ||
| 104 | 391 |
public boolean isCluRelationRequired() { |
| 105 | 391 | return cluRelationRequired; |
| 106 | } | |
| 107 | ||
| 108 | 184 |
public void setCluRelationRequired(boolean cluRelationRequired) { |
| 109 | 184 | this.cluRelationRequired = cluRelationRequired; |
| 110 | } | |
| 111 | ||
| 112 | 391 |
public Date getEffectiveDate() { |
| 113 | 391 | return effectiveDate; |
| 114 | } | |
| 115 | ||
| 116 | 184 |
public void setEffectiveDate(Date effectiveDate) { |
| 117 | 184 | this.effectiveDate = effectiveDate; |
| 118 | } | |
| 119 | ||
| 120 | 391 |
public Date getExpirationDate() { |
| 121 | 391 | return expirationDate; |
| 122 | } | |
| 123 | ||
| 124 | 184 |
public void setExpirationDate(Date expirationDate) { |
| 125 | 184 | this.expirationDate = expirationDate; |
| 126 | } | |
| 127 | ||
| 128 | 391 |
public String getState() { |
| 129 | 391 | return state; |
| 130 | } | |
| 131 | ||
| 132 | 184 |
public void setState(String state) { |
| 133 | 184 | this.state = state; |
| 134 | } | |
| 135 | ||
| 136 | 943 |
@Override |
| 137 | public List<CluCluRelationAttribute> getAttributes() { | |
| 138 | 943 | return attributes; |
| 139 | } | |
| 140 | ||
| 141 | 366 |
@Override |
| 142 | public void setAttributes(List<CluCluRelationAttribute> attributes) { | |
| 143 | 366 | this.attributes = attributes; |
| 144 | } | |
| 145 | } | |
|
||||||||||||